use std::os::raw::c_char;
use std::ptr;
use std::mem;
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct StreamPeer {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
unsafe impl GodotObject for StreamPeer {
fn class_name() -> &'static str {
"StreamPeer"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for StreamPeer {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl StreamPeer {
#[inline]
pub fn put_data(&mut self, data: ByteArray) -> GodotResult {
unsafe { StreamPeer_put_data(self.this, data) }
}
#[inline]
pub fn put_partial_data(&mut self, data: ByteArray) -> VariantArray {
unsafe { StreamPeer_put_partial_data(self.this, data) }
}
#[inline]
pub fn get_data(&mut self, bytes: i64) -> VariantArray {
unsafe { StreamPeer_get_data(self.this, bytes) }
}
#[inline]
pub fn get_partial_data(&mut self, bytes: i64) -> VariantArray {
unsafe { StreamPeer_get_partial_data(self.this, bytes) }
}
#[inline]
pub fn get_available_bytes(&self) -> i64 {
unsafe { StreamPeer_get_available_bytes(self.this) }
}
#[inline]
pub fn set_big_endian(&mut self, enable: bool) -> () {
unsafe { StreamPeer_set_big_endian(self.this, enable) }
}
#[inline]
pub fn is_big_endian_enabled(&self) -> bool {
unsafe { StreamPeer_is_big_endian_enabled(self.this) }
}
#[inline]
pub fn put_8(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_8(self.this, value) }
}
#[inline]
pub fn put_u8(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u8(self.this, value) }
}
#[inline]
pub fn put_16(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_16(self.this, value) }
}
#[inline]
pub fn put_u16(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u16(self.this, value) }
}
#[inline]
pub fn put_32(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_32(self.this, value) }
}
#[inline]
pub fn put_u32(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u32(self.this, value) }
}
#[inline]
pub fn put_64(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_64(self.this, value) }
}
#[inline]
pub fn put_u64(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u64(self.this, value) }
}
#[inline]
pub fn put_float(&mut self, value: f64) -> () {
unsafe { StreamPeer_put_float(self.this, value) }
}
#[inline]
pub fn put_double(&mut self, value: f64) -> () {
unsafe { StreamPeer_put_double(self.this, value) }
}
#[inline]
pub fn put_utf8_string(&mut self, value: GodotString) -> () {
unsafe { StreamPeer_put_utf8_string(self.this, value) }
}
#[inline]
pub fn put_var(&mut self, value: Variant) -> () {
unsafe { StreamPeer_put_var(self.this, value) }
}
#[inline]
pub fn get_8(&mut self) -> i64 {
unsafe { StreamPeer_get_8(self.this) }
}
#[inline]
pub fn get_u8(&mut self) -> i64 {
unsafe { StreamPeer_get_u8(self.this) }
}
#[inline]
pub fn get_16(&mut self) -> i64 {
unsafe { StreamPeer_get_16(self.this) }
}
#[inline]
pub fn get_u16(&mut self) -> i64 {
unsafe { StreamPeer_get_u16(self.this) }
}
#[inline]
pub fn get_32(&mut self) -> i64 {
unsafe { StreamPeer_get_32(self.this) }
}
#[inline]
pub fn get_u32(&mut self) -> i64 {
unsafe { StreamPeer_get_u32(self.this) }
}
#[inline]
pub fn get_64(&mut self) -> i64 {
unsafe { StreamPeer_get_64(self.this) }
}
#[inline]
pub fn get_u64(&mut self) -> i64 {
unsafe { StreamPeer_get_u64(self.this) }
}
#[inline]
pub fn get_float(&mut self) -> f64 {
unsafe { StreamPeer_get_float(self.this) }
}
#[inline]
pub fn get_double(&mut self) -> f64 {
unsafe { StreamPeer_get_double(self.this) }
}
#[inline]
pub fn get_string(&mut self, bytes: i64) -> GodotString {
unsafe { StreamPeer_get_string(self.this, bytes) }
}
#[inline]
pub fn get_utf8_string(&mut self, bytes: i64) -> GodotString {
unsafe { StreamPeer_get_utf8_string(self.this, bytes) }
}
#[inline]
pub fn get_var(&mut self) -> Variant {
unsafe { StreamPeer_get_var(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct TCP_Server {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
unsafe impl GodotObject for TCP_Server {
fn class_name() -> &'static str {
"TCP_Server"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for TCP_Server {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl TCP_Server {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = TCP_ServerMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
TCP_Server {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn listen(&mut self, port: i64, bind_address: GodotString) -> GodotResult {
unsafe { TCP_Server_listen(self.this, port, bind_address) }
}
#[inline]
pub fn is_connection_available(&self) -> bool {
unsafe { TCP_Server_is_connection_available(self.this) }
}
#[inline]
pub fn take_connection(&mut self) -> Option<StreamPeerTCP> {
unsafe { TCP_Server_take_connection(self.this) }
}
#[inline]
pub fn stop(&mut self) -> () {
unsafe { TCP_Server_stop(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for TCP_Server {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct StreamPeerBuffer {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
unsafe impl GodotObject for StreamPeerBuffer {
fn class_name() -> &'static str {
"StreamPeerBuffer"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for StreamPeerBuffer {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl StreamPeerBuffer {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = StreamPeerBufferMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
StreamPeerBuffer {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn seek(&mut self, position: i64) -> () {
unsafe { StreamPeerBuffer_seek(self.this, position) }
}
#[inline]
pub fn get_size(&self) -> i64 {
unsafe { StreamPeerBuffer_get_size(self.this) }
}
#[inline]
pub fn get_position(&self) -> i64 {
unsafe { StreamPeerBuffer_get_position(self.this) }
}
#[inline]
pub fn resize(&mut self, size: i64) -> () {
unsafe { StreamPeerBuffer_resize(self.this, size) }
}
#[inline]
pub fn set_data_array(&mut self, data: ByteArray) -> () {
unsafe { StreamPeerBuffer_set_data_array(self.this, data) }
}
#[inline]
pub fn get_data_array(&self) -> ByteArray {
unsafe { StreamPeerBuffer_get_data_array(self.this) }
}
#[inline]
pub fn clear(&mut self) -> () {
unsafe { StreamPeerBuffer_clear(self.this) }
}
#[inline]
pub fn duplicate(&self) -> Option<StreamPeerBuffer> {
unsafe { StreamPeerBuffer_duplicate(self.this) }
}
#[inline]
pub fn put_data(&mut self, data: ByteArray) -> GodotResult {
unsafe { StreamPeer_put_data(self.this, data) }
}
#[inline]
pub fn put_partial_data(&mut self, data: ByteArray) -> VariantArray {
unsafe { StreamPeer_put_partial_data(self.this, data) }
}
#[inline]
pub fn get_data(&mut self, bytes: i64) -> VariantArray {
unsafe { StreamPeer_get_data(self.this, bytes) }
}
#[inline]
pub fn get_partial_data(&mut self, bytes: i64) -> VariantArray {
unsafe { StreamPeer_get_partial_data(self.this, bytes) }
}
#[inline]
pub fn get_available_bytes(&self) -> i64 {
unsafe { StreamPeer_get_available_bytes(self.this) }
}
#[inline]
pub fn set_big_endian(&mut self, enable: bool) -> () {
unsafe { StreamPeer_set_big_endian(self.this, enable) }
}
#[inline]
pub fn is_big_endian_enabled(&self) -> bool {
unsafe { StreamPeer_is_big_endian_enabled(self.this) }
}
#[inline]
pub fn put_8(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_8(self.this, value) }
}
#[inline]
pub fn put_u8(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u8(self.this, value) }
}
#[inline]
pub fn put_16(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_16(self.this, value) }
}
#[inline]
pub fn put_u16(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u16(self.this, value) }
}
#[inline]
pub fn put_32(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_32(self.this, value) }
}
#[inline]
pub fn put_u32(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u32(self.this, value) }
}
#[inline]
pub fn put_64(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_64(self.this, value) }
}
#[inline]
pub fn put_u64(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u64(self.this, value) }
}
#[inline]
pub fn put_float(&mut self, value: f64) -> () {
unsafe { StreamPeer_put_float(self.this, value) }
}
#[inline]
pub fn put_double(&mut self, value: f64) -> () {
unsafe { StreamPeer_put_double(self.this, value) }
}
#[inline]
pub fn put_utf8_string(&mut self, value: GodotString) -> () {
unsafe { StreamPeer_put_utf8_string(self.this, value) }
}
#[inline]
pub fn put_var(&mut self, value: Variant) -> () {
unsafe { StreamPeer_put_var(self.this, value) }
}
#[inline]
pub fn get_8(&mut self) -> i64 {
unsafe { StreamPeer_get_8(self.this) }
}
#[inline]
pub fn get_u8(&mut self) -> i64 {
unsafe { StreamPeer_get_u8(self.this) }
}
#[inline]
pub fn get_16(&mut self) -> i64 {
unsafe { StreamPeer_get_16(self.this) }
}
#[inline]
pub fn get_u16(&mut self) -> i64 {
unsafe { StreamPeer_get_u16(self.this) }
}
#[inline]
pub fn get_32(&mut self) -> i64 {
unsafe { StreamPeer_get_32(self.this) }
}
#[inline]
pub fn get_u32(&mut self) -> i64 {
unsafe { StreamPeer_get_u32(self.this) }
}
#[inline]
pub fn get_64(&mut self) -> i64 {
unsafe { StreamPeer_get_64(self.this) }
}
#[inline]
pub fn get_u64(&mut self) -> i64 {
unsafe { StreamPeer_get_u64(self.this) }
}
#[inline]
pub fn get_float(&mut self) -> f64 {
unsafe { StreamPeer_get_float(self.this) }
}
#[inline]
pub fn get_double(&mut self) -> f64 {
unsafe { StreamPeer_get_double(self.this) }
}
#[inline]
pub fn get_string(&mut self, bytes: i64) -> GodotString {
unsafe { StreamPeer_get_string(self.this, bytes) }
}
#[inline]
pub fn get_utf8_string(&mut self, bytes: i64) -> GodotString {
unsafe { StreamPeer_get_utf8_string(self.this, bytes) }
}
#[inline]
pub fn get_var(&mut self) -> Variant {
unsafe { StreamPeer_get_var(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_stream_peer(&self) -> StreamPeer {
unsafe {{ object::add_ref(self.this); }}
StreamPeer { this: self.this }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for StreamPeerBuffer {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct StreamPeerTCP {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
#[repr(u32)]
#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum StreamPeerTCPStatus {
None = 0,
Connecting = 1,
Connected = 2,
Error = 3,
}
unsafe impl GodotObject for StreamPeerTCP {
fn class_name() -> &'static str {
"StreamPeerTCP"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for StreamPeerTCP {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl StreamPeerTCP {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = StreamPeerTCPMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
StreamPeerTCP {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn connect_to_host(&mut self, host: GodotString, port: i64) -> GodotResult {
unsafe { StreamPeerTCP_connect_to_host(self.this, host, port) }
}
#[inline]
pub fn is_connected_to_host(&self) -> bool {
unsafe { StreamPeerTCP_is_connected_to_host(self.this) }
}
#[inline]
pub fn get_status(&self) -> StreamPeerTCPStatus {
unsafe { StreamPeerTCP_get_status(self.this) }
}
#[inline]
pub fn get_connected_host(&self) -> GodotString {
unsafe { StreamPeerTCP_get_connected_host(self.this) }
}
#[inline]
pub fn get_connected_port(&self) -> i64 {
unsafe { StreamPeerTCP_get_connected_port(self.this) }
}
#[inline]
pub fn disconnect_from_host(&mut self) -> () {
unsafe { StreamPeerTCP_disconnect_from_host(self.this) }
}
#[inline]
pub fn set_no_delay(&mut self, enabled: bool) -> () {
unsafe { StreamPeerTCP_set_no_delay(self.this, enabled) }
}
#[inline]
pub fn put_data(&mut self, data: ByteArray) -> GodotResult {
unsafe { StreamPeer_put_data(self.this, data) }
}
#[inline]
pub fn put_partial_data(&mut self, data: ByteArray) -> VariantArray {
unsafe { StreamPeer_put_partial_data(self.this, data) }
}
#[inline]
pub fn get_data(&mut self, bytes: i64) -> VariantArray {
unsafe { StreamPeer_get_data(self.this, bytes) }
}
#[inline]
pub fn get_partial_data(&mut self, bytes: i64) -> VariantArray {
unsafe { StreamPeer_get_partial_data(self.this, bytes) }
}
#[inline]
pub fn get_available_bytes(&self) -> i64 {
unsafe { StreamPeer_get_available_bytes(self.this) }
}
#[inline]
pub fn set_big_endian(&mut self, enable: bool) -> () {
unsafe { StreamPeer_set_big_endian(self.this, enable) }
}
#[inline]
pub fn is_big_endian_enabled(&self) -> bool {
unsafe { StreamPeer_is_big_endian_enabled(self.this) }
}
#[inline]
pub fn put_8(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_8(self.this, value) }
}
#[inline]
pub fn put_u8(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u8(self.this, value) }
}
#[inline]
pub fn put_16(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_16(self.this, value) }
}
#[inline]
pub fn put_u16(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u16(self.this, value) }
}
#[inline]
pub fn put_32(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_32(self.this, value) }
}
#[inline]
pub fn put_u32(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u32(self.this, value) }
}
#[inline]
pub fn put_64(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_64(self.this, value) }
}
#[inline]
pub fn put_u64(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u64(self.this, value) }
}
#[inline]
pub fn put_float(&mut self, value: f64) -> () {
unsafe { StreamPeer_put_float(self.this, value) }
}
#[inline]
pub fn put_double(&mut self, value: f64) -> () {
unsafe { StreamPeer_put_double(self.this, value) }
}
#[inline]
pub fn put_utf8_string(&mut self, value: GodotString) -> () {
unsafe { StreamPeer_put_utf8_string(self.this, value) }
}
#[inline]
pub fn put_var(&mut self, value: Variant) -> () {
unsafe { StreamPeer_put_var(self.this, value) }
}
#[inline]
pub fn get_8(&mut self) -> i64 {
unsafe { StreamPeer_get_8(self.this) }
}
#[inline]
pub fn get_u8(&mut self) -> i64 {
unsafe { StreamPeer_get_u8(self.this) }
}
#[inline]
pub fn get_16(&mut self) -> i64 {
unsafe { StreamPeer_get_16(self.this) }
}
#[inline]
pub fn get_u16(&mut self) -> i64 {
unsafe { StreamPeer_get_u16(self.this) }
}
#[inline]
pub fn get_32(&mut self) -> i64 {
unsafe { StreamPeer_get_32(self.this) }
}
#[inline]
pub fn get_u32(&mut self) -> i64 {
unsafe { StreamPeer_get_u32(self.this) }
}
#[inline]
pub fn get_64(&mut self) -> i64 {
unsafe { StreamPeer_get_64(self.this) }
}
#[inline]
pub fn get_u64(&mut self) -> i64 {
unsafe { StreamPeer_get_u64(self.this) }
}
#[inline]
pub fn get_float(&mut self) -> f64 {
unsafe { StreamPeer_get_float(self.this) }
}
#[inline]
pub fn get_double(&mut self) -> f64 {
unsafe { StreamPeer_get_double(self.this) }
}
#[inline]
pub fn get_string(&mut self, bytes: i64) -> GodotString {
unsafe { StreamPeer_get_string(self.this, bytes) }
}
#[inline]
pub fn get_utf8_string(&mut self, bytes: i64) -> GodotString {
unsafe { StreamPeer_get_utf8_string(self.this, bytes) }
}
#[inline]
pub fn get_var(&mut self) -> Variant {
unsafe { StreamPeer_get_var(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_stream_peer(&self) -> StreamPeer {
unsafe {{ object::add_ref(self.this); }}
StreamPeer { this: self.this }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for StreamPeerTCP {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct PacketPeerStream {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
unsafe impl GodotObject for PacketPeerStream {
fn class_name() -> &'static str {
"PacketPeerStream"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for PacketPeerStream {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl PacketPeerStream {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = PacketPeerStreamMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
PacketPeerStream {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn set_stream_peer(&mut self, peer: Option<StreamPeer>) -> () {
unsafe { PacketPeerStream_set_stream_peer(self.this, peer) }
}
#[inline]
pub fn get_stream_peer(&self) -> Option<StreamPeer> {
unsafe { PacketPeerStream_get_stream_peer(self.this) }
}
#[inline]
pub fn set_input_buffer_max_size(&mut self, max_size_bytes: i64) -> () {
unsafe { PacketPeerStream_set_input_buffer_max_size(self.this, max_size_bytes) }
}
#[inline]
pub fn set_output_buffer_max_size(&mut self, max_size_bytes: i64) -> () {
unsafe { PacketPeerStream_set_output_buffer_max_size(self.this, max_size_bytes) }
}
#[inline]
pub fn get_input_buffer_max_size(&self) -> i64 {
unsafe { PacketPeerStream_get_input_buffer_max_size(self.this) }
}
#[inline]
pub fn get_output_buffer_max_size(&self) -> i64 {
unsafe { PacketPeerStream_get_output_buffer_max_size(self.this) }
}
#[inline]
pub fn get_var(&mut self) -> Variant {
unsafe { PacketPeer_get_var(self.this) }
}
#[inline]
pub fn put_var(&mut self, var: Variant) -> GodotResult {
unsafe { PacketPeer_put_var(self.this, var) }
}
#[inline]
pub fn get_packet(&mut self) -> ByteArray {
unsafe { PacketPeer_get_packet(self.this) }
}
#[inline]
pub fn put_packet(&mut self, buffer: ByteArray) -> GodotResult {
unsafe { PacketPeer_put_packet(self.this, buffer) }
}
#[inline]
pub fn get_packet_error(&self) -> GodotResult {
unsafe { PacketPeer_get_packet_error(self.this) }
}
#[inline]
pub fn get_available_packet_count(&self) -> i64 {
unsafe { PacketPeer_get_available_packet_count(self.this) }
}
#[inline]
pub fn set_allow_object_decoding(&mut self, enable: bool) -> () {
unsafe { PacketPeer_set_allow_object_decoding(self.this, enable) }
}
#[inline]
pub fn is_object_decoding_allowed(&self) -> bool {
unsafe { PacketPeer_is_object_decoding_allowed(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_packet_peer(&self) -> PacketPeer {
unsafe {{ object::add_ref(self.this); }}
PacketPeer { this: self.this }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for PacketPeerStream {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct StreamPeerSSL {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
#[repr(u32)]
#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum StreamPeerSSLStatus {
Disconnected = 0,
Connected = 2,
Error = 3,
ErrorHostnameMismatch = 4,
}
unsafe impl GodotObject for StreamPeerSSL {
fn class_name() -> &'static str {
"StreamPeerSSL"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for StreamPeerSSL {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl StreamPeerSSL {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = StreamPeerSSLMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
StreamPeerSSL {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn poll(&mut self) -> () {
unsafe { StreamPeerSSL_poll(self.this) }
}
#[inline]
pub fn accept_stream(&mut self, arg0: Option<StreamPeer>) -> GodotResult {
unsafe { StreamPeerSSL_accept_stream(self.this, arg0) }
}
#[inline]
pub fn connect_to_stream(&mut self, stream: Option<StreamPeer>, validate_certs: bool, for_hostname: GodotString) -> GodotResult {
unsafe { StreamPeerSSL_connect_to_stream(self.this, stream, validate_certs, for_hostname) }
}
#[inline]
pub fn get_status(&self) -> StreamPeerSSLStatus {
unsafe { StreamPeerSSL_get_status(self.this) }
}
#[inline]
pub fn disconnect_from_stream(&mut self) -> () {
unsafe { StreamPeerSSL_disconnect_from_stream(self.this) }
}
#[inline]
pub fn set_blocking_handshake_enabled(&mut self, enabled: bool) -> () {
unsafe { StreamPeerSSL_set_blocking_handshake_enabled(self.this, enabled) }
}
#[inline]
pub fn is_blocking_handshake_enabled(&self) -> bool {
unsafe { StreamPeerSSL_is_blocking_handshake_enabled(self.this) }
}
#[inline]
pub fn put_data(&mut self, data: ByteArray) -> GodotResult {
unsafe { StreamPeer_put_data(self.this, data) }
}
#[inline]
pub fn put_partial_data(&mut self, data: ByteArray) -> VariantArray {
unsafe { StreamPeer_put_partial_data(self.this, data) }
}
#[inline]
pub fn get_data(&mut self, bytes: i64) -> VariantArray {
unsafe { StreamPeer_get_data(self.this, bytes) }
}
#[inline]
pub fn get_partial_data(&mut self, bytes: i64) -> VariantArray {
unsafe { StreamPeer_get_partial_data(self.this, bytes) }
}
#[inline]
pub fn get_available_bytes(&self) -> i64 {
unsafe { StreamPeer_get_available_bytes(self.this) }
}
#[inline]
pub fn set_big_endian(&mut self, enable: bool) -> () {
unsafe { StreamPeer_set_big_endian(self.this, enable) }
}
#[inline]
pub fn is_big_endian_enabled(&self) -> bool {
unsafe { StreamPeer_is_big_endian_enabled(self.this) }
}
#[inline]
pub fn put_8(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_8(self.this, value) }
}
#[inline]
pub fn put_u8(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u8(self.this, value) }
}
#[inline]
pub fn put_16(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_16(self.this, value) }
}
#[inline]
pub fn put_u16(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u16(self.this, value) }
}
#[inline]
pub fn put_32(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_32(self.this, value) }
}
#[inline]
pub fn put_u32(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u32(self.this, value) }
}
#[inline]
pub fn put_64(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_64(self.this, value) }
}
#[inline]
pub fn put_u64(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u64(self.this, value) }
}
#[inline]
pub fn put_float(&mut self, value: f64) -> () {
unsafe { StreamPeer_put_float(self.this, value) }
}
#[inline]
pub fn put_double(&mut self, value: f64) -> () {
unsafe { StreamPeer_put_double(self.this, value) }
}
#[inline]
pub fn put_utf8_string(&mut self, value: GodotString) -> () {
unsafe { StreamPeer_put_utf8_string(self.this, value) }
}
#[inline]
pub fn put_var(&mut self, value: Variant) -> () {
unsafe { StreamPeer_put_var(self.this, value) }
}
#[inline]
pub fn get_8(&mut self) -> i64 {
unsafe { StreamPeer_get_8(self.this) }
}
#[inline]
pub fn get_u8(&mut self) -> i64 {
unsafe { StreamPeer_get_u8(self.this) }
}
#[inline]
pub fn get_16(&mut self) -> i64 {
unsafe { StreamPeer_get_16(self.this) }
}
#[inline]
pub fn get_u16(&mut self) -> i64 {
unsafe { StreamPeer_get_u16(self.this) }
}
#[inline]
pub fn get_32(&mut self) -> i64 {
unsafe { StreamPeer_get_32(self.this) }
}
#[inline]
pub fn get_u32(&mut self) -> i64 {
unsafe { StreamPeer_get_u32(self.this) }
}
#[inline]
pub fn get_64(&mut self) -> i64 {
unsafe { StreamPeer_get_64(self.this) }
}
#[inline]
pub fn get_u64(&mut self) -> i64 {
unsafe { StreamPeer_get_u64(self.this) }
}
#[inline]
pub fn get_float(&mut self) -> f64 {
unsafe { StreamPeer_get_float(self.this) }
}
#[inline]
pub fn get_double(&mut self) -> f64 {
unsafe { StreamPeer_get_double(self.this) }
}
#[inline]
pub fn get_string(&mut self, bytes: i64) -> GodotString {
unsafe { StreamPeer_get_string(self.this, bytes) }
}
#[inline]
pub fn get_utf8_string(&mut self, bytes: i64) -> GodotString {
unsafe { StreamPeer_get_utf8_string(self.this, bytes) }
}
#[inline]
pub fn get_var(&mut self) -> Variant {
unsafe { StreamPeer_get_var(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_stream_peer(&self) -> StreamPeer {
unsafe {{ object::add_ref(self.this); }}
StreamPeer { this: self.this }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for StreamPeerSSL {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[derive(Copy, Clone)]
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct IP {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
#[repr(u32)]
#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum IPResolverStatus {
None = 0,
Waiting = 1,
Done = 2,
Error = 3,
}
#[repr(u32)]
#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum IPType {
None = 0,
Ipv4 = 1,
Ipv6 = 2,
Any = 3,
}
unsafe impl GodotObject for IP {
fn class_name() -> &'static str {
"IP"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for IP {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl IP {
#[inline]
pub fn godot_singleton() -> Self {
unsafe {
let this = (get_api().godot_global_get_singleton)(b"IP\0".as_ptr() as *mut _);
IP {
this
}
}
}
#[inline]
pub fn resolve_hostname(&mut self, host: GodotString, ip_type: i64) -> GodotString {
unsafe { IP_resolve_hostname(self.this, host, ip_type) }
}
#[inline]
pub fn resolve_hostname_queue_item(&mut self, host: GodotString, ip_type: i64) -> i64 {
unsafe { IP_resolve_hostname_queue_item(self.this, host, ip_type) }
}
#[inline]
pub fn get_resolve_item_status(&self, id: i64) -> IPResolverStatus {
unsafe { IP_get_resolve_item_status(self.this, id) }
}
#[inline]
pub fn get_resolve_item_address(&self, id: i64) -> GodotString {
unsafe { IP_get_resolve_item_address(self.this, id) }
}
#[inline]
pub fn erase_resolve_item(&mut self, id: i64) -> () {
unsafe { IP_erase_resolve_item(self.this, id) }
}
#[inline]
pub fn get_local_addresses(&self) -> VariantArray {
unsafe { IP_get_local_addresses(self.this) }
}
#[inline]
pub fn clear_cache(&mut self, hostname: GodotString) -> () {
unsafe { IP_clear_cache(self.this, hostname) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct PacketPeerUDP {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
unsafe impl GodotObject for PacketPeerUDP {
fn class_name() -> &'static str {
"PacketPeerUDP"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for PacketPeerUDP {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl PacketPeerUDP {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = PacketPeerUDPMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
PacketPeerUDP {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn listen(&mut self, port: i64, bind_address: GodotString, recv_buf_size: i64) -> GodotResult {
unsafe { PacketPeerUDP_listen(self.this, port, bind_address, recv_buf_size) }
}
#[inline]
pub fn close(&mut self) -> () {
unsafe { PacketPeerUDP_close(self.this) }
}
#[inline]
pub fn wait(&mut self) -> GodotResult {
unsafe { PacketPeerUDP_wait(self.this) }
}
#[inline]
pub fn is_listening(&self) -> bool {
unsafe { PacketPeerUDP_is_listening(self.this) }
}
#[inline]
pub fn get_packet_ip(&self) -> GodotString {
unsafe { PacketPeerUDP_get_packet_ip(self.this) }
}
#[inline]
pub fn get_packet_port(&self) -> i64 {
unsafe { PacketPeerUDP_get_packet_port(self.this) }
}
#[inline]
pub fn set_dest_address(&mut self, host: GodotString, port: i64) -> GodotResult {
unsafe { PacketPeerUDP_set_dest_address(self.this, host, port) }
}
#[inline]
pub fn get_var(&mut self) -> Variant {
unsafe { PacketPeer_get_var(self.this) }
}
#[inline]
pub fn put_var(&mut self, var: Variant) -> GodotResult {
unsafe { PacketPeer_put_var(self.this, var) }
}
#[inline]
pub fn get_packet(&mut self) -> ByteArray {
unsafe { PacketPeer_get_packet(self.this) }
}
#[inline]
pub fn put_packet(&mut self, buffer: ByteArray) -> GodotResult {
unsafe { PacketPeer_put_packet(self.this, buffer) }
}
#[inline]
pub fn get_packet_error(&self) -> GodotResult {
unsafe { PacketPeer_get_packet_error(self.this) }
}
#[inline]
pub fn get_available_packet_count(&self) -> i64 {
unsafe { PacketPeer_get_available_packet_count(self.this) }
}
#[inline]
pub fn set_allow_object_decoding(&mut self, enable: bool) -> () {
unsafe { PacketPeer_set_allow_object_decoding(self.this, enable) }
}
#[inline]
pub fn is_object_decoding_allowed(&self) -> bool {
unsafe { PacketPeer_is_object_decoding_allowed(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_packet_peer(&self) -> PacketPeer {
unsafe {{ object::add_ref(self.this); }}
PacketPeer { this: self.this }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for PacketPeerUDP {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct HTTPClient {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
#[repr(u32)]
#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum HTTPClientStatus {
Disconnected = 0,
Resolving = 1,
CantResolve = 2,
Connecting = 3,
CantConnect = 4,
Connected = 5,
Requesting = 6,
Body = 7,
ConnectionError = 8,
SslHandshakeError = 9,
}
#[repr(u32)]
#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum HTTPClientMethod {
Get = 0,
Head = 1,
Post = 2,
Put = 3,
Delete = 4,
Options = 5,
Trace = 6,
Connect = 7,
Patch = 8,
Max = 9,
}
#[repr(u32)]
#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum HTTPClientResponseCode {
ResponseContinue = 100,
ResponseSwitchingProtocols = 101,
ResponseProcessing = 102,
ResponseOk = 200,
ResponseCreated = 201,
ResponseAccepted = 202,
ResponseNonAuthoritativeInformation = 203,
ResponseNoContent = 204,
ResponseResetContent = 205,
ResponsePartialContent = 206,
ResponseMultiStatus = 207,
ResponseAlreadyReported = 208,
ResponseImUsed = 226,
ResponseMultipleChoices = 300,
ResponseMovedPermanently = 301,
ResponseFound = 302,
ResponseSeeOther = 303,
ResponseNotModified = 304,
ResponseUseProxy = 305,
ResponseSwitchProxy = 306,
ResponseTemporaryRedirect = 307,
ResponsePermanentRedirect = 308,
ResponseBadRequest = 400,
ResponseUnauthorized = 401,
ResponsePaymentRequired = 402,
ResponseForbidden = 403,
ResponseNotFound = 404,
ResponseMethodNotAllowed = 405,
ResponseNotAcceptable = 406,
ResponseProxyAuthenticationRequired = 407,
ResponseRequestTimeout = 408,
ResponseConflict = 409,
ResponseGone = 410,
ResponseLengthRequired = 411,
ResponsePreconditionFailed = 412,
ResponseRequestEntityTooLarge = 413,
ResponseRequestUriTooLong = 414,
ResponseUnsupportedMediaType = 415,
ResponseRequestedRangeNotSatisfiable = 416,
ResponseExpectationFailed = 417,
ResponseImATeapot = 418,
ResponseMisdirectedRequest = 421,
ResponseUnprocessableEntity = 422,
ResponseLocked = 423,
ResponseFailedDependency = 424,
ResponseUpgradeRequired = 426,
ResponsePreconditionRequired = 428,
ResponseTooManyRequests = 429,
ResponseRequestHeaderFieldsTooLarge = 431,
ResponseUnavailableForLegalReasons = 451,
ResponseInternalServerError = 500,
ResponseNotImplemented = 501,
ResponseBadGateway = 502,
ResponseServiceUnavailable = 503,
ResponseGatewayTimeout = 504,
ResponseHttpVersionNotSupported = 505,
ResponseVariantAlsoNegotiates = 506,
ResponseInsufficientStorage = 507,
ResponseLoopDetected = 508,
ResponseNotExtended = 510,
ResponseNetworkAuthRequired = 511,
}
unsafe impl GodotObject for HTTPClient {
fn class_name() -> &'static str {
"HTTPClient"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for HTTPClient {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl HTTPClient {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = HTTPClientMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
HTTPClient {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn connect_to_host(&mut self, host: GodotString, port: i64, use_ssl: bool, verify_host: bool) -> GodotResult {
unsafe { HTTPClient_connect_to_host(self.this, host, port, use_ssl, verify_host) }
}
#[inline]
pub fn set_connection(&mut self, connection: Option<StreamPeer>) -> () {
unsafe { HTTPClient_set_connection(self.this, connection) }
}
#[inline]
pub fn get_connection(&self) -> Option<StreamPeer> {
unsafe { HTTPClient_get_connection(self.this) }
}
#[inline]
pub fn request_raw(&mut self, method: i64, url: GodotString, headers: StringArray, body: ByteArray) -> GodotResult {
unsafe { HTTPClient_request_raw(self.this, method, url, headers, body) }
}
#[inline]
pub fn request(&mut self, method: i64, url: GodotString, headers: StringArray, body: GodotString) -> GodotResult {
unsafe { HTTPClient_request(self.this, method, url, headers, body) }
}
#[inline]
pub fn close(&mut self) -> () {
unsafe { HTTPClient_close(self.this) }
}
#[inline]
pub fn has_response(&self) -> bool {
unsafe { HTTPClient_has_response(self.this) }
}
#[inline]
pub fn is_response_chunked(&self) -> bool {
unsafe { HTTPClient_is_response_chunked(self.this) }
}
#[inline]
pub fn get_response_code(&self) -> i64 {
unsafe { HTTPClient_get_response_code(self.this) }
}
#[inline]
pub fn get_response_headers(&mut self) -> StringArray {
unsafe { HTTPClient_get_response_headers(self.this) }
}
#[inline]
pub fn get_response_headers_as_dictionary(&mut self) -> Dictionary {
unsafe { HTTPClient_get_response_headers_as_dictionary(self.this) }
}
#[inline]
pub fn get_response_body_length(&self) -> i64 {
unsafe { HTTPClient_get_response_body_length(self.this) }
}
#[inline]
pub fn read_response_body_chunk(&mut self) -> ByteArray {
unsafe { HTTPClient_read_response_body_chunk(self.this) }
}
#[inline]
pub fn set_read_chunk_size(&mut self, bytes: i64) -> () {
unsafe { HTTPClient_set_read_chunk_size(self.this, bytes) }
}
#[inline]
pub fn set_blocking_mode(&mut self, enabled: bool) -> () {
unsafe { HTTPClient_set_blocking_mode(self.this, enabled) }
}
#[inline]
pub fn is_blocking_mode_enabled(&self) -> bool {
unsafe { HTTPClient_is_blocking_mode_enabled(self.this) }
}
#[inline]
pub fn get_status(&self) -> HTTPClientStatus {
unsafe { HTTPClient_get_status(self.this) }
}
#[inline]
pub fn poll(&mut self) -> GodotResult {
unsafe { HTTPClient_poll(self.this) }
}
#[inline]
pub fn query_string_from_dict(&mut self, fields: Dictionary) -> GodotString {
unsafe { HTTPClient_query_string_from_dict(self.this, fields) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for HTTPClient {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[derive(Copy, Clone)]
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct IP_Unix {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
unsafe impl GodotObject for IP_Unix {
fn class_name() -> &'static str {
"IP_Unix"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for IP_Unix {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl IP_Unix {
#[inline]
pub unsafe fn resolve_hostname(&mut self, host: GodotString, ip_type: i64) -> GodotString {
IP_resolve_hostname(self.this, host, ip_type)
}
#[inline]
pub unsafe fn resolve_hostname_queue_item(&mut self, host: GodotString, ip_type: i64) -> i64 {
IP_resolve_hostname_queue_item(self.this, host, ip_type)
}
#[inline]
pub unsafe fn get_resolve_item_status(&self, id: i64) -> IPResolverStatus {
IP_get_resolve_item_status(self.this, id)
}
#[inline]
pub unsafe fn get_resolve_item_address(&self, id: i64) -> GodotString {
IP_get_resolve_item_address(self.this, id)
}
#[inline]
pub unsafe fn erase_resolve_item(&mut self, id: i64) -> () {
IP_erase_resolve_item(self.this, id)
}
#[inline]
pub unsafe fn get_local_addresses(&self) -> VariantArray {
IP_get_local_addresses(self.this)
}
#[inline]
pub unsafe fn clear_cache(&mut self, hostname: GodotString) -> () {
IP_clear_cache(self.this, hostname)
}
#[inline]
pub unsafe fn _notification(&mut self, what: i64) -> () {
Object__notification(self.this, what)
}
#[inline]
pub unsafe fn _set(&mut self, property: GodotString, value: Variant) -> bool {
Object__set(self.this, property, value)
}
#[inline]
pub unsafe fn _get(&mut self, property: GodotString) -> Variant {
Object__get(self.this, property)
}
#[inline]
pub unsafe fn _get_property_list(&mut self) -> VariantArray {
Object__get_property_list(self.this)
}
#[inline]
pub unsafe fn _init(&mut self) -> () {
Object__init(self.this)
}
#[inline]
pub unsafe fn get_class(&self) -> GodotString {
Object_get_class(self.this)
}
#[inline]
pub unsafe fn is_class(&self, _type: GodotString) -> bool {
Object_is_class(self.this, _type)
}
#[inline]
pub unsafe fn set(&mut self, property: GodotString, value: Variant) -> () {
Object_set(self.this, property, value)
}
#[inline]
pub unsafe fn get(&self, property: GodotString) -> Variant {
Object_get(self.this, property)
}
#[inline]
pub unsafe fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
Object_set_indexed(self.this, property, value)
}
#[inline]
pub unsafe fn get_indexed(&self, property: NodePath) -> Variant {
Object_get_indexed(self.this, property)
}
#[inline]
pub unsafe fn get_property_list(&self) -> VariantArray {
Object_get_property_list(self.this)
}
#[inline]
pub unsafe fn get_method_list(&self) -> VariantArray {
Object_get_method_list(self.this)
}
#[inline]
pub unsafe fn notification(&mut self, what: i64, reversed: bool) -> () {
Object_notification(self.this, what, reversed)
}
#[inline]
pub unsafe fn get_instance_id(&self) -> i64 {
Object_get_instance_id(self.this)
}
#[inline]
pub unsafe fn set_script(&mut self, script: Option<Reference>) -> () {
Object_set_script(self.this, script)
}
#[inline]
pub unsafe fn get_script(&self) -> Option<Reference> {
Object_get_script(self.this)
}
#[inline]
pub unsafe fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
Object_set_meta(self.this, name, value)
}
#[inline]
pub unsafe fn get_meta(&self, name: GodotString) -> Variant {
Object_get_meta(self.this, name)
}
#[inline]
pub unsafe fn has_meta(&self, name: GodotString) -> bool {
Object_has_meta(self.this, name)
}
#[inline]
pub unsafe fn get_meta_list(&self) -> StringArray {
Object_get_meta_list(self.this)
}
#[inline]
pub unsafe fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
Object_add_user_signal(self.this, signal, arguments)
}
#[inline]
pub unsafe fn has_user_signal(&self, signal: GodotString) -> bool {
Object_has_user_signal(self.this, signal)
}
#[inline]
pub unsafe fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
Object_emit_signal(self.this, signal, varargs)
}
#[inline]
pub unsafe fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
Object_call(self.this, method, varargs)
}
#[inline]
pub unsafe fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
Object_call_deferred(self.this, method, varargs)
}
#[inline]
pub unsafe fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
Object_callv(self.this, method, arg_array)
}
#[inline]
pub unsafe fn has_method(&self, method: GodotString) -> bool {
Object_has_method(self.this, method)
}
#[inline]
pub unsafe fn get_signal_list(&self) -> VariantArray {
Object_get_signal_list(self.this)
}
#[inline]
pub unsafe fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
Object_get_signal_connection_list(self.this, signal)
}
#[inline]
pub unsafe fn get_incoming_connections(&self) -> VariantArray {
Object_get_incoming_connections(self.this)
}
#[inline]
pub unsafe fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
Object_connect(self.this, signal, target, method, binds, flags)
}
#[inline]
pub unsafe fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
Object_disconnect(self.this, signal, target, method)
}
#[inline]
pub unsafe fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
Object_is_connected(self.this, signal, target, method)
}
#[inline]
pub unsafe fn set_block_signals(&mut self, enable: bool) -> () {
Object_set_block_signals(self.this, enable)
}
#[inline]
pub unsafe fn is_blocking_signals(&self) -> bool {
Object_is_blocking_signals(self.this)
}
#[inline]
pub unsafe fn property_list_changed_notify(&mut self) -> () {
Object_property_list_changed_notify(self.this)
}
#[inline]
pub unsafe fn set_message_translation(&mut self, enable: bool) -> () {
Object_set_message_translation(self.this, enable)
}
#[inline]
pub unsafe fn can_translate_messages(&self) -> bool {
Object_can_translate_messages(self.this)
}
#[inline]
pub unsafe fn tr(&self, message: GodotString) -> GodotString {
Object_tr(self.this, message)
}
#[inline]
pub unsafe fn is_queued_for_deletion(&self) -> bool {
Object_is_queued_for_deletion(self.this)
}
#[inline]
pub unsafe fn to_ip(&self) -> IP {
IP { this: self.this }
}
#[inline]
pub unsafe fn to_object(&self) -> Object {
Object { this: self.this }
}
pub unsafe fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
#[derive(Copy, Clone)]
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct HTTPRequest {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
#[repr(u32)]
#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum HTTPRequestResult {
Success = 0,
ChunkedBodySizeMismatch = 1,
CantConnect = 2,
CantResolve = 3,
ConnectionError = 4,
SslHandshakeError = 5,
NoResponse = 6,
BodySizeLimitExceeded = 7,
RequestFailed = 8,
DownloadFileCantOpen = 9,
DownloadFileWriteError = 10,
RedirectLimitReached = 11,
}
unsafe impl GodotObject for HTTPRequest {
fn class_name() -> &'static str {
"HTTPRequest"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for HTTPRequest {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl Free for HTTPRequest {
unsafe fn godot_free(self) { self.free() }
}
impl QueueFree for HTTPRequest {
unsafe fn godot_queue_free(&mut self) { self.queue_free() }
}
impl HTTPRequest {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = HTTPRequestMethodTable::get(gd_api).class_constructor.unwrap();
let this = ctor();
HTTPRequest {
this
}
}
}
#[inline]
pub unsafe fn free(self) {
(get_api().godot_object_destroy)(self.this);
}
#[inline]
pub unsafe fn request(&mut self, url: GodotString, custom_headers: StringArray, ssl_validate_domain: bool, method: i64, request_data: GodotString) -> GodotResult {
HTTPRequest_request(self.this, url, custom_headers, ssl_validate_domain, method, request_data)
}
#[inline]
pub unsafe fn cancel_request(&mut self) -> () {
HTTPRequest_cancel_request(self.this)
}
#[inline]
pub unsafe fn get_http_client_status(&self) -> HTTPClientStatus {
HTTPRequest_get_http_client_status(self.this)
}
#[inline]
pub unsafe fn set_use_threads(&mut self, enable: bool) -> () {
HTTPRequest_set_use_threads(self.this, enable)
}
#[inline]
pub unsafe fn is_using_threads(&self) -> bool {
HTTPRequest_is_using_threads(self.this)
}
#[inline]
pub unsafe fn set_body_size_limit(&mut self, bytes: i64) -> () {
HTTPRequest_set_body_size_limit(self.this, bytes)
}
#[inline]
pub unsafe fn get_body_size_limit(&self) -> i64 {
HTTPRequest_get_body_size_limit(self.this)
}
#[inline]
pub unsafe fn set_max_redirects(&mut self, amount: i64) -> () {
HTTPRequest_set_max_redirects(self.this, amount)
}
#[inline]
pub unsafe fn get_max_redirects(&self) -> i64 {
HTTPRequest_get_max_redirects(self.this)
}
#[inline]
pub unsafe fn set_download_file(&mut self, path: GodotString) -> () {
HTTPRequest_set_download_file(self.this, path)
}
#[inline]
pub unsafe fn get_download_file(&self) -> GodotString {
HTTPRequest_get_download_file(self.this)
}
#[inline]
pub unsafe fn get_downloaded_bytes(&self) -> i64 {
HTTPRequest_get_downloaded_bytes(self.this)
}
#[inline]
pub unsafe fn get_body_size(&self) -> i64 {
HTTPRequest_get_body_size(self.this)
}
#[inline]
pub unsafe fn _redirect_request(&mut self, arg0: GodotString) -> () {
HTTPRequest__redirect_request(self.this, arg0)
}
#[inline]
pub unsafe fn _request_done(&mut self, arg0: i64, arg1: i64, arg2: StringArray, arg3: ByteArray) -> () {
HTTPRequest__request_done(self.this, arg0, arg1, arg2, arg3)
}
#[inline]
pub unsafe fn _process(&mut self, delta: f64) -> () {
Node__process(self.this, delta)
}
#[inline]
pub unsafe fn _physics_process(&mut self, delta: f64) -> () {
Node__physics_process(self.this, delta)
}
#[inline]
pub unsafe fn _enter_tree(&mut self) -> () {
Node__enter_tree(self.this)
}
#[inline]
pub unsafe fn _exit_tree(&mut self) -> () {
Node__exit_tree(self.this)
}
#[inline]
pub unsafe fn _ready(&mut self) -> () {
Node__ready(self.this)
}
#[inline]
pub unsafe fn _input(&mut self, event: Option<InputEvent>) -> () {
Node__input(self.this, event)
}
#[inline]
pub unsafe fn _unhandled_input(&mut self, event: Option<InputEvent>) -> () {
Node__unhandled_input(self.this, event)
}
#[inline]
pub unsafe fn _unhandled_key_input(&mut self, event: Option<InputEventKey>) -> () {
Node__unhandled_key_input(self.this, event)
}
#[inline]
pub unsafe fn add_child_below_node(&mut self, node: Option<Object>, child_node: Option<Object>, legible_unique_name: bool) -> () {
Node_add_child_below_node(self.this, node, child_node, legible_unique_name)
}
#[inline]
pub unsafe fn set_name(&mut self, name: GodotString) -> () {
Node_set_name(self.this, name)
}
#[inline]
pub unsafe fn get_name(&self) -> GodotString {
Node_get_name(self.this)
}
#[inline]
pub unsafe fn add_child(&mut self, node: Option<Object>, legible_unique_name: bool) -> () {
Node_add_child(self.this, node, legible_unique_name)
}
#[inline]
pub unsafe fn remove_child(&mut self, node: Option<Object>) -> () {
Node_remove_child(self.this, node)
}
#[inline]
pub unsafe fn get_child_count(&self) -> i64 {
Node_get_child_count(self.this)
}
#[inline]
pub unsafe fn get_children(&self) -> VariantArray {
Node_get_children(self.this)
}
#[inline]
pub unsafe fn get_child(&self, idx: i64) -> Option<Node> {
Node_get_child(self.this, idx)
}
#[inline]
pub unsafe fn has_node(&self, path: NodePath) -> bool {
Node_has_node(self.this, path)
}
#[inline]
pub unsafe fn get_node(&self, path: NodePath) -> Option<Node> {
Node_get_node(self.this, path)
}
#[inline]
pub unsafe fn get_parent(&self) -> Option<Node> {
Node_get_parent(self.this)
}
#[inline]
pub unsafe fn find_node(&self, mask: GodotString, recursive: bool, owned: bool) -> Option<Node> {
Node_find_node(self.this, mask, recursive, owned)
}
#[inline]
pub unsafe fn has_node_and_resource(&self, path: NodePath) -> bool {
Node_has_node_and_resource(self.this, path)
}
#[inline]
pub unsafe fn get_node_and_resource(&mut self, path: NodePath) -> VariantArray {
Node_get_node_and_resource(self.this, path)
}
#[inline]
pub unsafe fn is_inside_tree(&self) -> bool {
Node_is_inside_tree(self.this)
}
#[inline]
pub unsafe fn is_a_parent_of(&self, node: Option<Object>) -> bool {
Node_is_a_parent_of(self.this, node)
}
#[inline]
pub unsafe fn is_greater_than(&self, node: Option<Object>) -> bool {
Node_is_greater_than(self.this, node)
}
#[inline]
pub unsafe fn get_path(&self) -> NodePath {
Node_get_path(self.this)
}
#[inline]
pub unsafe fn get_path_to(&self, node: Option<Object>) -> NodePath {
Node_get_path_to(self.this, node)
}
#[inline]
pub unsafe fn add_to_group(&mut self, group: GodotString, persistent: bool) -> () {
Node_add_to_group(self.this, group, persistent)
}
#[inline]
pub unsafe fn remove_from_group(&mut self, group: GodotString) -> () {
Node_remove_from_group(self.this, group)
}
#[inline]
pub unsafe fn is_in_group(&self, group: GodotString) -> bool {
Node_is_in_group(self.this, group)
}
#[inline]
pub unsafe fn move_child(&mut self, child_node: Option<Object>, to_position: i64) -> () {
Node_move_child(self.this, child_node, to_position)
}
#[inline]
pub unsafe fn get_groups(&self) -> VariantArray {
Node_get_groups(self.this)
}
#[inline]
pub unsafe fn raise(&mut self) -> () {
Node_raise(self.this)
}
#[inline]
pub unsafe fn set_owner(&mut self, owner: Option<Object>) -> () {
Node_set_owner(self.this, owner)
}
#[inline]
pub unsafe fn get_owner(&self) -> Option<Node> {
Node_get_owner(self.this)
}
#[inline]
pub unsafe fn remove_and_skip(&mut self) -> () {
Node_remove_and_skip(self.this)
}
#[inline]
pub unsafe fn get_index(&self) -> i64 {
Node_get_index(self.this)
}
#[inline]
pub unsafe fn print_tree(&mut self) -> () {
Node_print_tree(self.this)
}
#[inline]
pub unsafe fn print_tree_pretty(&mut self) -> () {
Node_print_tree_pretty(self.this)
}
#[inline]
pub unsafe fn set_filename(&mut self, filename: GodotString) -> () {
Node_set_filename(self.this, filename)
}
#[inline]
pub unsafe fn get_filename(&self) -> GodotString {
Node_get_filename(self.this)
}
#[inline]
pub unsafe fn propagate_notification(&mut self, what: i64) -> () {
Node_propagate_notification(self.this, what)
}
#[inline]
pub unsafe fn propagate_call(&mut self, method: GodotString, args: VariantArray, parent_first: bool) -> () {
Node_propagate_call(self.this, method, args, parent_first)
}
#[inline]
pub unsafe fn set_physics_process(&mut self, enable: bool) -> () {
Node_set_physics_process(self.this, enable)
}
#[inline]
pub unsafe fn get_physics_process_delta_time(&self) -> f64 {
Node_get_physics_process_delta_time(self.this)
}
#[inline]
pub unsafe fn is_physics_processing(&self) -> bool {
Node_is_physics_processing(self.this)
}
#[inline]
pub unsafe fn get_process_delta_time(&self) -> f64 {
Node_get_process_delta_time(self.this)
}
#[inline]
pub unsafe fn set_process(&mut self, enable: bool) -> () {
Node_set_process(self.this, enable)
}
#[inline]
pub unsafe fn set_process_priority(&mut self, priority: i64) -> () {
Node_set_process_priority(self.this, priority)
}
#[inline]
pub unsafe fn is_processing(&self) -> bool {
Node_is_processing(self.this)
}
#[inline]
pub unsafe fn set_process_input(&mut self, enable: bool) -> () {
Node_set_process_input(self.this, enable)
}
#[inline]
pub unsafe fn is_processing_input(&self) -> bool {
Node_is_processing_input(self.this)
}
#[inline]
pub unsafe fn set_process_unhandled_input(&mut self, enable: bool) -> () {
Node_set_process_unhandled_input(self.this, enable)
}
#[inline]
pub unsafe fn is_processing_unhandled_input(&self) -> bool {
Node_is_processing_unhandled_input(self.this)
}
#[inline]
pub unsafe fn set_process_unhandled_key_input(&mut self, enable: bool) -> () {
Node_set_process_unhandled_key_input(self.this, enable)
}
#[inline]
pub unsafe fn is_processing_unhandled_key_input(&self) -> bool {
Node_is_processing_unhandled_key_input(self.this)
}
#[inline]
pub unsafe fn set_pause_mode(&mut self, mode: i64) -> () {
Node_set_pause_mode(self.this, mode)
}
#[inline]
pub unsafe fn get_pause_mode(&self) -> NodePauseMode {
Node_get_pause_mode(self.this)
}
#[inline]
pub unsafe fn can_process(&self) -> bool {
Node_can_process(self.this)
}
#[inline]
pub unsafe fn print_stray_nodes(&mut self) -> () {
Node_print_stray_nodes(self.this)
}
#[inline]
pub unsafe fn get_position_in_parent(&self) -> i64 {
Node_get_position_in_parent(self.this)
}
#[inline]
pub unsafe fn set_display_folded(&mut self, fold: bool) -> () {
Node_set_display_folded(self.this, fold)
}
#[inline]
pub unsafe fn is_displayed_folded(&self) -> bool {
Node_is_displayed_folded(self.this)
}
#[inline]
pub unsafe fn set_process_internal(&mut self, enable: bool) -> () {
Node_set_process_internal(self.this, enable)
}
#[inline]
pub unsafe fn is_processing_internal(&self) -> bool {
Node_is_processing_internal(self.this)
}
#[inline]
pub unsafe fn set_physics_process_internal(&mut self, enable: bool) -> () {
Node_set_physics_process_internal(self.this, enable)
}
#[inline]
pub unsafe fn is_physics_processing_internal(&self) -> bool {
Node_is_physics_processing_internal(self.this)
}
#[inline]
pub unsafe fn get_tree(&self) -> Option<SceneTree> {
Node_get_tree(self.this)
}
#[inline]
pub unsafe fn duplicate(&self, flags: i64) -> Option<Node> {
Node_duplicate(self.this, flags)
}
#[inline]
pub unsafe fn replace_by(&mut self, node: Option<Object>, keep_data: bool) -> () {
Node_replace_by(self.this, node, keep_data)
}
#[inline]
pub unsafe fn set_scene_instance_load_placeholder(&mut self, load_placeholder: bool) -> () {
Node_set_scene_instance_load_placeholder(self.this, load_placeholder)
}
#[inline]
pub unsafe fn get_scene_instance_load_placeholder(&self) -> bool {
Node_get_scene_instance_load_placeholder(self.this)
}
#[inline]
pub unsafe fn get_viewport(&self) -> Option<Viewport> {
Node_get_viewport(self.this)
}
#[inline]
pub unsafe fn queue_free(&mut self) -> () {
Node_queue_free(self.this)
}
#[inline]
pub unsafe fn request_ready(&mut self) -> () {
Node_request_ready(self.this)
}
#[inline]
pub unsafe fn set_network_master(&mut self, id: i64, recursive: bool) -> () {
Node_set_network_master(self.this, id, recursive)
}
#[inline]
pub unsafe fn get_network_master(&self) -> i64 {
Node_get_network_master(self.this)
}
#[inline]
pub unsafe fn is_network_master(&self) -> bool {
Node_is_network_master(self.this)
}
#[inline]
pub unsafe fn get_multiplayer(&self) -> Option<MultiplayerAPI> {
Node_get_multiplayer(self.this)
}
#[inline]
pub unsafe fn get_custom_multiplayer(&self) -> Option<MultiplayerAPI> {
Node_get_custom_multiplayer(self.this)
}
#[inline]
pub unsafe fn set_custom_multiplayer(&mut self, api: Option<MultiplayerAPI>) -> () {
Node_set_custom_multiplayer(self.this, api)
}
#[inline]
pub unsafe fn rpc_config(&mut self, method: GodotString, mode: i64) -> () {
Node_rpc_config(self.this, method, mode)
}
#[inline]
pub unsafe fn rset_config(&mut self, property: GodotString, mode: i64) -> () {
Node_rset_config(self.this, property, mode)
}
#[inline]
pub unsafe fn _set_import_path(&mut self, import_path: NodePath) -> () {
Node__set_import_path(self.this, import_path)
}
#[inline]
pub unsafe fn _get_import_path(&self) -> NodePath {
Node__get_import_path(self.this)
}
#[inline]
pub unsafe fn rpc(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
Node_rpc(self.this, method, varargs)
}
#[inline]
pub unsafe fn rpc_unreliable(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
Node_rpc_unreliable(self.this, method, varargs)
}
#[inline]
pub unsafe fn rpc_id(&mut self, peer_id: i64, method: GodotString, varargs: &[Variant]) -> Variant {
Node_rpc_id(self.this, peer_id, method, varargs)
}
#[inline]
pub unsafe fn rpc_unreliable_id(&mut self, peer_id: i64, method: GodotString, varargs: &[Variant]) -> Variant {
Node_rpc_unreliable_id(self.this, peer_id, method, varargs)
}
#[inline]
pub unsafe fn rset(&mut self, property: GodotString, value: Variant) -> () {
Node_rset(self.this, property, value)
}
#[inline]
pub unsafe fn rset_id(&mut self, peer_id: i64, property: GodotString, value: Variant) -> () {
Node_rset_id(self.this, peer_id, property, value)
}
#[inline]
pub unsafe fn rset_unreliable(&mut self, property: GodotString, value: Variant) -> () {
Node_rset_unreliable(self.this, property, value)
}
#[inline]
pub unsafe fn rset_unreliable_id(&mut self, peer_id: i64, property: GodotString, value: Variant) -> () {
Node_rset_unreliable_id(self.this, peer_id, property, value)
}
#[inline]
pub unsafe fn _notification(&mut self, what: i64) -> () {
Object__notification(self.this, what)
}
#[inline]
pub unsafe fn _set(&mut self, property: GodotString, value: Variant) -> bool {
Object__set(self.this, property, value)
}
#[inline]
pub unsafe fn _get(&mut self, property: GodotString) -> Variant {
Object__get(self.this, property)
}
#[inline]
pub unsafe fn _get_property_list(&mut self) -> VariantArray {
Object__get_property_list(self.this)
}
#[inline]
pub unsafe fn _init(&mut self) -> () {
Object__init(self.this)
}
#[inline]
pub unsafe fn get_class(&self) -> GodotString {
Object_get_class(self.this)
}
#[inline]
pub unsafe fn is_class(&self, _type: GodotString) -> bool {
Object_is_class(self.this, _type)
}
#[inline]
pub unsafe fn set(&mut self, property: GodotString, value: Variant) -> () {
Object_set(self.this, property, value)
}
#[inline]
pub unsafe fn get(&self, property: GodotString) -> Variant {
Object_get(self.this, property)
}
#[inline]
pub unsafe fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
Object_set_indexed(self.this, property, value)
}
#[inline]
pub unsafe fn get_indexed(&self, property: NodePath) -> Variant {
Object_get_indexed(self.this, property)
}
#[inline]
pub unsafe fn get_property_list(&self) -> VariantArray {
Object_get_property_list(self.this)
}
#[inline]
pub unsafe fn get_method_list(&self) -> VariantArray {
Object_get_method_list(self.this)
}
#[inline]
pub unsafe fn notification(&mut self, what: i64, reversed: bool) -> () {
Object_notification(self.this, what, reversed)
}
#[inline]
pub unsafe fn get_instance_id(&self) -> i64 {
Object_get_instance_id(self.this)
}
#[inline]
pub unsafe fn set_script(&mut self, script: Option<Reference>) -> () {
Object_set_script(self.this, script)
}
#[inline]
pub unsafe fn get_script(&self) -> Option<Reference> {
Object_get_script(self.this)
}
#[inline]
pub unsafe fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
Object_set_meta(self.this, name, value)
}
#[inline]
pub unsafe fn get_meta(&self, name: GodotString) -> Variant {
Object_get_meta(self.this, name)
}
#[inline]
pub unsafe fn has_meta(&self, name: GodotString) -> bool {
Object_has_meta(self.this, name)
}
#[inline]
pub unsafe fn get_meta_list(&self) -> StringArray {
Object_get_meta_list(self.this)
}
#[inline]
pub unsafe fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
Object_add_user_signal(self.this, signal, arguments)
}
#[inline]
pub unsafe fn has_user_signal(&self, signal: GodotString) -> bool {
Object_has_user_signal(self.this, signal)
}
#[inline]
pub unsafe fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
Object_emit_signal(self.this, signal, varargs)
}
#[inline]
pub unsafe fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
Object_call(self.this, method, varargs)
}
#[inline]
pub unsafe fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
Object_call_deferred(self.this, method, varargs)
}
#[inline]
pub unsafe fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
Object_callv(self.this, method, arg_array)
}
#[inline]
pub unsafe fn has_method(&self, method: GodotString) -> bool {
Object_has_method(self.this, method)
}
#[inline]
pub unsafe fn get_signal_list(&self) -> VariantArray {
Object_get_signal_list(self.this)
}
#[inline]
pub unsafe fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
Object_get_signal_connection_list(self.this, signal)
}
#[inline]
pub unsafe fn get_incoming_connections(&self) -> VariantArray {
Object_get_incoming_connections(self.this)
}
#[inline]
pub unsafe fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
Object_connect(self.this, signal, target, method, binds, flags)
}
#[inline]
pub unsafe fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
Object_disconnect(self.this, signal, target, method)
}
#[inline]
pub unsafe fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
Object_is_connected(self.this, signal, target, method)
}
#[inline]
pub unsafe fn set_block_signals(&mut self, enable: bool) -> () {
Object_set_block_signals(self.this, enable)
}
#[inline]
pub unsafe fn is_blocking_signals(&self) -> bool {
Object_is_blocking_signals(self.this)
}
#[inline]
pub unsafe fn property_list_changed_notify(&mut self) -> () {
Object_property_list_changed_notify(self.this)
}
#[inline]
pub unsafe fn set_message_translation(&mut self, enable: bool) -> () {
Object_set_message_translation(self.this, enable)
}
#[inline]
pub unsafe fn can_translate_messages(&self) -> bool {
Object_can_translate_messages(self.this)
}
#[inline]
pub unsafe fn tr(&self, message: GodotString) -> GodotString {
Object_tr(self.this, message)
}
#[inline]
pub unsafe fn is_queued_for_deletion(&self) -> bool {
Object_is_queued_for_deletion(self.this)
}
#[inline]
pub unsafe fn to_node(&self) -> Node {
Node { this: self.this }
}
#[inline]
pub unsafe fn to_object(&self) -> Object {
Object { this: self.this }
}
pub unsafe fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct StreamTexture {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
unsafe impl GodotObject for StreamTexture {
fn class_name() -> &'static str {
"StreamTexture"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for StreamTexture {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl StreamTexture {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = StreamTextureMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
StreamTexture {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn load(&mut self, path: GodotString) -> GodotResult {
unsafe { StreamTexture_load(self.this, path) }
}
#[inline]
pub fn get_load_path(&self) -> GodotString {
unsafe { StreamTexture_get_load_path(self.this) }
}
#[inline]
pub fn get_width(&self) -> i64 {
unsafe { Texture_get_width(self.this) }
}
#[inline]
pub fn get_height(&self) -> i64 {
unsafe { Texture_get_height(self.this) }
}
#[inline]
pub fn get_size(&self) -> Vector2 {
unsafe { Texture_get_size(self.this) }
}
#[inline]
pub fn has_alpha(&self) -> bool {
unsafe { Texture_has_alpha(self.this) }
}
#[inline]
pub fn set_flags(&mut self, flags: i64) -> () {
unsafe { Texture_set_flags(self.this, flags) }
}
#[inline]
pub fn get_flags(&self) -> i64 {
unsafe { Texture_get_flags(self.this) }
}
#[inline]
pub fn draw(&self, canvas_item: Rid, position: Vector2, modulate: Color, transpose: bool, normal_map: Option<Texture>) -> () {
unsafe { Texture_draw(self.this, canvas_item, position, modulate, transpose, normal_map) }
}
#[inline]
pub fn draw_rect(&self, canvas_item: Rid, rect: Rect2, tile: bool, modulate: Color, transpose: bool, normal_map: Option<Texture>) -> () {
unsafe { Texture_draw_rect(self.this, canvas_item, rect, tile, modulate, transpose, normal_map) }
}
#[inline]
pub fn draw_rect_region(&self, canvas_item: Rid, rect: Rect2, src_rect: Rect2, modulate: Color, transpose: bool, normal_map: Option<Texture>, clip_uv: bool) -> () {
unsafe { Texture_draw_rect_region(self.this, canvas_item, rect, src_rect, modulate, transpose, normal_map, clip_uv) }
}
#[inline]
pub fn get_data(&self) -> Option<Image> {
unsafe { Texture_get_data(self.this) }
}
#[inline]
pub fn _setup_local_to_scene(&mut self) -> () {
unsafe { Resource__setup_local_to_scene(self.this) }
}
#[inline]
pub fn set_path(&mut self, path: GodotString) -> () {
unsafe { Resource_set_path(self.this, path) }
}
#[inline]
pub fn take_over_path(&mut self, path: GodotString) -> () {
unsafe { Resource_take_over_path(self.this, path) }
}
#[inline]
pub fn get_path(&self) -> GodotString {
unsafe { Resource_get_path(self.this) }
}
#[inline]
pub fn set_name(&mut self, name: GodotString) -> () {
unsafe { Resource_set_name(self.this, name) }
}
#[inline]
pub fn get_name(&self) -> GodotString {
unsafe { Resource_get_name(self.this) }
}
#[inline]
pub fn get_rid(&self) -> Rid {
unsafe { Resource_get_rid(self.this) }
}
#[inline]
pub fn set_local_to_scene(&mut self, enable: bool) -> () {
unsafe { Resource_set_local_to_scene(self.this, enable) }
}
#[inline]
pub fn is_local_to_scene(&self) -> bool {
unsafe { Resource_is_local_to_scene(self.this) }
}
#[inline]
pub fn get_local_scene(&self) -> Option<Node> {
unsafe { Resource_get_local_scene(self.this) }
}
#[inline]
pub fn setup_local_to_scene(&mut self) -> () {
unsafe { Resource_setup_local_to_scene(self.this) }
}
#[inline]
pub fn duplicate(&self, subresources: bool) -> Option<Resource> {
unsafe { Resource_duplicate(self.this, subresources) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_texture(&self) -> Texture {
unsafe {{ object::add_ref(self.this); }}
Texture { this: self.this }
}
#[inline]
pub fn to_resource(&self) -> Resource {
unsafe {{ object::add_ref(self.this); }}
Resource { this: self.this }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for StreamTexture {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct NetworkedMultiplayerENet {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
#[repr(u32)]
#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum NetworkedMultiplayerENetCompressionMode {
CompressNone = 0,
CompressRangeCoder = 1,
CompressFastlz = 2,
CompressZlib = 3,
CompressZstd = 4,
}
unsafe impl GodotObject for NetworkedMultiplayerENet {
fn class_name() -> &'static str {
"NetworkedMultiplayerENet"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for NetworkedMultiplayerENet {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl NetworkedMultiplayerENet {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = NetworkedMultiplayerENetMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
NetworkedMultiplayerENet {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn create_server(&mut self, port: i64, max_clients: i64, in_bandwidth: i64, out_bandwidth: i64) -> GodotResult {
unsafe { NetworkedMultiplayerENet_create_server(self.this, port, max_clients, in_bandwidth, out_bandwidth) }
}
#[inline]
pub fn create_client(&mut self, address: GodotString, port: i64, in_bandwidth: i64, out_bandwidth: i64, client_port: i64) -> GodotResult {
unsafe { NetworkedMultiplayerENet_create_client(self.this, address, port, in_bandwidth, out_bandwidth, client_port) }
}
#[inline]
pub fn close_connection(&mut self, wait_usec: i64) -> () {
unsafe { NetworkedMultiplayerENet_close_connection(self.this, wait_usec) }
}
#[inline]
pub fn disconnect_peer(&mut self, id: i64, now: bool) -> () {
unsafe { NetworkedMultiplayerENet_disconnect_peer(self.this, id, now) }
}
#[inline]
pub fn set_compression_mode(&mut self, mode: i64) -> () {
unsafe { NetworkedMultiplayerENet_set_compression_mode(self.this, mode) }
}
#[inline]
pub fn get_compression_mode(&self) -> NetworkedMultiplayerENetCompressionMode {
unsafe { NetworkedMultiplayerENet_get_compression_mode(self.this) }
}
#[inline]
pub fn set_bind_ip(&mut self, ip: GodotString) -> () {
unsafe { NetworkedMultiplayerENet_set_bind_ip(self.this, ip) }
}
#[inline]
pub fn get_peer_address(&self, id: i64) -> GodotString {
unsafe { NetworkedMultiplayerENet_get_peer_address(self.this, id) }
}
#[inline]
pub fn get_peer_port(&self, id: i64) -> i64 {
unsafe { NetworkedMultiplayerENet_get_peer_port(self.this, id) }
}
#[inline]
pub fn get_packet_channel(&self) -> i64 {
unsafe { NetworkedMultiplayerENet_get_packet_channel(self.this) }
}
#[inline]
pub fn get_last_packet_channel(&self) -> i64 {
unsafe { NetworkedMultiplayerENet_get_last_packet_channel(self.this) }
}
#[inline]
pub fn set_transfer_channel(&mut self, channel: i64) -> () {
unsafe { NetworkedMultiplayerENet_set_transfer_channel(self.this, channel) }
}
#[inline]
pub fn get_transfer_channel(&self) -> i64 {
unsafe { NetworkedMultiplayerENet_get_transfer_channel(self.this) }
}
#[inline]
pub fn set_channel_count(&mut self, channels: i64) -> () {
unsafe { NetworkedMultiplayerENet_set_channel_count(self.this, channels) }
}
#[inline]
pub fn get_channel_count(&self) -> i64 {
unsafe { NetworkedMultiplayerENet_get_channel_count(self.this) }
}
#[inline]
pub fn set_always_ordered(&mut self, ordered: bool) -> () {
unsafe { NetworkedMultiplayerENet_set_always_ordered(self.this, ordered) }
}
#[inline]
pub fn is_always_ordered(&self) -> bool {
unsafe { NetworkedMultiplayerENet_is_always_ordered(self.this) }
}
#[inline]
pub fn set_transfer_mode(&mut self, mode: i64) -> () {
unsafe { NetworkedMultiplayerPeer_set_transfer_mode(self.this, mode) }
}
#[inline]
pub fn get_transfer_mode(&self) -> NetworkedMultiplayerPeerTransferMode {
unsafe { NetworkedMultiplayerPeer_get_transfer_mode(self.this) }
}
#[inline]
pub fn set_target_peer(&mut self, id: i64) -> () {
unsafe { NetworkedMultiplayerPeer_set_target_peer(self.this, id) }
}
#[inline]
pub fn get_packet_peer(&self) -> i64 {
unsafe { NetworkedMultiplayerPeer_get_packet_peer(self.this) }
}
#[inline]
pub fn poll(&mut self) -> () {
unsafe { NetworkedMultiplayerPeer_poll(self.this) }
}
#[inline]
pub fn get_connection_status(&self) -> NetworkedMultiplayerPeerConnectionStatus {
unsafe { NetworkedMultiplayerPeer_get_connection_status(self.this) }
}
#[inline]
pub fn get_unique_id(&self) -> i64 {
unsafe { NetworkedMultiplayerPeer_get_unique_id(self.this) }
}
#[inline]
pub fn set_refuse_new_connections(&mut self, enable: bool) -> () {
unsafe { NetworkedMultiplayerPeer_set_refuse_new_connections(self.this, enable) }
}
#[inline]
pub fn is_refusing_new_connections(&self) -> bool {
unsafe { NetworkedMultiplayerPeer_is_refusing_new_connections(self.this) }
}
#[inline]
pub fn get_var(&mut self) -> Variant {
unsafe { PacketPeer_get_var(self.this) }
}
#[inline]
pub fn put_var(&mut self, var: Variant) -> GodotResult {
unsafe { PacketPeer_put_var(self.this, var) }
}
#[inline]
pub fn get_packet(&mut self) -> ByteArray {
unsafe { PacketPeer_get_packet(self.this) }
}
#[inline]
pub fn put_packet(&mut self, buffer: ByteArray) -> GodotResult {
unsafe { PacketPeer_put_packet(self.this, buffer) }
}
#[inline]
pub fn get_packet_error(&self) -> GodotResult {
unsafe { PacketPeer_get_packet_error(self.this) }
}
#[inline]
pub fn get_available_packet_count(&self) -> i64 {
unsafe { PacketPeer_get_available_packet_count(self.this) }
}
#[inline]
pub fn set_allow_object_decoding(&mut self, enable: bool) -> () {
unsafe { PacketPeer_set_allow_object_decoding(self.this, enable) }
}
#[inline]
pub fn is_object_decoding_allowed(&self) -> bool {
unsafe { PacketPeer_is_object_decoding_allowed(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_networked_multiplayer_peer(&self) -> NetworkedMultiplayerPeer {
unsafe {{ object::add_ref(self.this); }}
NetworkedMultiplayerPeer { this: self.this }
}
#[inline]
pub fn to_packet_peer(&self) -> PacketPeer {
unsafe {{ object::add_ref(self.this); }}
PacketPeer { this: self.this }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for NetworkedMultiplayerENet {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct StreamPeerGDNative {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
unsafe impl GodotObject for StreamPeerGDNative {
fn class_name() -> &'static str {
"StreamPeerGDNative"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for StreamPeerGDNative {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl StreamPeerGDNative {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = StreamPeerGDNativeMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
StreamPeerGDNative {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn put_data(&mut self, data: ByteArray) -> GodotResult {
unsafe { StreamPeer_put_data(self.this, data) }
}
#[inline]
pub fn put_partial_data(&mut self, data: ByteArray) -> VariantArray {
unsafe { StreamPeer_put_partial_data(self.this, data) }
}
#[inline]
pub fn get_data(&mut self, bytes: i64) -> VariantArray {
unsafe { StreamPeer_get_data(self.this, bytes) }
}
#[inline]
pub fn get_partial_data(&mut self, bytes: i64) -> VariantArray {
unsafe { StreamPeer_get_partial_data(self.this, bytes) }
}
#[inline]
pub fn get_available_bytes(&self) -> i64 {
unsafe { StreamPeer_get_available_bytes(self.this) }
}
#[inline]
pub fn set_big_endian(&mut self, enable: bool) -> () {
unsafe { StreamPeer_set_big_endian(self.this, enable) }
}
#[inline]
pub fn is_big_endian_enabled(&self) -> bool {
unsafe { StreamPeer_is_big_endian_enabled(self.this) }
}
#[inline]
pub fn put_8(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_8(self.this, value) }
}
#[inline]
pub fn put_u8(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u8(self.this, value) }
}
#[inline]
pub fn put_16(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_16(self.this, value) }
}
#[inline]
pub fn put_u16(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u16(self.this, value) }
}
#[inline]
pub fn put_32(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_32(self.this, value) }
}
#[inline]
pub fn put_u32(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u32(self.this, value) }
}
#[inline]
pub fn put_64(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_64(self.this, value) }
}
#[inline]
pub fn put_u64(&mut self, value: i64) -> () {
unsafe { StreamPeer_put_u64(self.this, value) }
}
#[inline]
pub fn put_float(&mut self, value: f64) -> () {
unsafe { StreamPeer_put_float(self.this, value) }
}
#[inline]
pub fn put_double(&mut self, value: f64) -> () {
unsafe { StreamPeer_put_double(self.this, value) }
}
#[inline]
pub fn put_utf8_string(&mut self, value: GodotString) -> () {
unsafe { StreamPeer_put_utf8_string(self.this, value) }
}
#[inline]
pub fn put_var(&mut self, value: Variant) -> () {
unsafe { StreamPeer_put_var(self.this, value) }
}
#[inline]
pub fn get_8(&mut self) -> i64 {
unsafe { StreamPeer_get_8(self.this) }
}
#[inline]
pub fn get_u8(&mut self) -> i64 {
unsafe { StreamPeer_get_u8(self.this) }
}
#[inline]
pub fn get_16(&mut self) -> i64 {
unsafe { StreamPeer_get_16(self.this) }
}
#[inline]
pub fn get_u16(&mut self) -> i64 {
unsafe { StreamPeer_get_u16(self.this) }
}
#[inline]
pub fn get_32(&mut self) -> i64 {
unsafe { StreamPeer_get_32(self.this) }
}
#[inline]
pub fn get_u32(&mut self) -> i64 {
unsafe { StreamPeer_get_u32(self.this) }
}
#[inline]
pub fn get_64(&mut self) -> i64 {
unsafe { StreamPeer_get_64(self.this) }
}
#[inline]
pub fn get_u64(&mut self) -> i64 {
unsafe { StreamPeer_get_u64(self.this) }
}
#[inline]
pub fn get_float(&mut self) -> f64 {
unsafe { StreamPeer_get_float(self.this) }
}
#[inline]
pub fn get_double(&mut self) -> f64 {
unsafe { StreamPeer_get_double(self.this) }
}
#[inline]
pub fn get_string(&mut self, bytes: i64) -> GodotString {
unsafe { StreamPeer_get_string(self.this, bytes) }
}
#[inline]
pub fn get_utf8_string(&mut self, bytes: i64) -> GodotString {
unsafe { StreamPeer_get_utf8_string(self.this, bytes) }
}
#[inline]
pub fn get_var(&mut self) -> Variant {
unsafe { StreamPeer_get_var(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_stream_peer(&self) -> StreamPeer {
unsafe {{ object::add_ref(self.this); }}
StreamPeer { this: self.this }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for StreamPeerGDNative {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct PacketPeerGDNative {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
unsafe impl GodotObject for PacketPeerGDNative {
fn class_name() -> &'static str {
"PacketPeerGDNative"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for PacketPeerGDNative {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl PacketPeerGDNative {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = PacketPeerGDNativeMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
PacketPeerGDNative {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn get_var(&mut self) -> Variant {
unsafe { PacketPeer_get_var(self.this) }
}
#[inline]
pub fn put_var(&mut self, var: Variant) -> GodotResult {
unsafe { PacketPeer_put_var(self.this, var) }
}
#[inline]
pub fn get_packet(&mut self) -> ByteArray {
unsafe { PacketPeer_get_packet(self.this) }
}
#[inline]
pub fn put_packet(&mut self, buffer: ByteArray) -> GodotResult {
unsafe { PacketPeer_put_packet(self.this, buffer) }
}
#[inline]
pub fn get_packet_error(&self) -> GodotResult {
unsafe { PacketPeer_get_packet_error(self.this) }
}
#[inline]
pub fn get_available_packet_count(&self) -> i64 {
unsafe { PacketPeer_get_available_packet_count(self.this) }
}
#[inline]
pub fn set_allow_object_decoding(&mut self, enable: bool) -> () {
unsafe { PacketPeer_set_allow_object_decoding(self.this, enable) }
}
#[inline]
pub fn is_object_decoding_allowed(&self) -> bool {
unsafe { PacketPeer_is_object_decoding_allowed(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_packet_peer(&self) -> PacketPeer {
unsafe {{ object::add_ref(self.this); }}
PacketPeer { this: self.this }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for PacketPeerGDNative {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct MultiplayerPeerGDNative {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
unsafe impl GodotObject for MultiplayerPeerGDNative {
fn class_name() -> &'static str {
"MultiplayerPeerGDNative"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for MultiplayerPeerGDNative {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl MultiplayerPeerGDNative {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = MultiplayerPeerGDNativeMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
MultiplayerPeerGDNative {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn set_transfer_mode(&mut self, mode: i64) -> () {
unsafe { NetworkedMultiplayerPeer_set_transfer_mode(self.this, mode) }
}
#[inline]
pub fn get_transfer_mode(&self) -> NetworkedMultiplayerPeerTransferMode {
unsafe { NetworkedMultiplayerPeer_get_transfer_mode(self.this) }
}
#[inline]
pub fn set_target_peer(&mut self, id: i64) -> () {
unsafe { NetworkedMultiplayerPeer_set_target_peer(self.this, id) }
}
#[inline]
pub fn get_packet_peer(&self) -> i64 {
unsafe { NetworkedMultiplayerPeer_get_packet_peer(self.this) }
}
#[inline]
pub fn poll(&mut self) -> () {
unsafe { NetworkedMultiplayerPeer_poll(self.this) }
}
#[inline]
pub fn get_connection_status(&self) -> NetworkedMultiplayerPeerConnectionStatus {
unsafe { NetworkedMultiplayerPeer_get_connection_status(self.this) }
}
#[inline]
pub fn get_unique_id(&self) -> i64 {
unsafe { NetworkedMultiplayerPeer_get_unique_id(self.this) }
}
#[inline]
pub fn set_refuse_new_connections(&mut self, enable: bool) -> () {
unsafe { NetworkedMultiplayerPeer_set_refuse_new_connections(self.this, enable) }
}
#[inline]
pub fn is_refusing_new_connections(&self) -> bool {
unsafe { NetworkedMultiplayerPeer_is_refusing_new_connections(self.this) }
}
#[inline]
pub fn get_var(&mut self) -> Variant {
unsafe { PacketPeer_get_var(self.this) }
}
#[inline]
pub fn put_var(&mut self, var: Variant) -> GodotResult {
unsafe { PacketPeer_put_var(self.this, var) }
}
#[inline]
pub fn get_packet(&mut self) -> ByteArray {
unsafe { PacketPeer_get_packet(self.this) }
}
#[inline]
pub fn put_packet(&mut self, buffer: ByteArray) -> GodotResult {
unsafe { PacketPeer_put_packet(self.this, buffer) }
}
#[inline]
pub fn get_packet_error(&self) -> GodotResult {
unsafe { PacketPeer_get_packet_error(self.this) }
}
#[inline]
pub fn get_available_packet_count(&self) -> i64 {
unsafe { PacketPeer_get_available_packet_count(self.this) }
}
#[inline]
pub fn set_allow_object_decoding(&mut self, enable: bool) -> () {
unsafe { PacketPeer_set_allow_object_decoding(self.this, enable) }
}
#[inline]
pub fn is_object_decoding_allowed(&self) -> bool {
unsafe { PacketPeer_is_object_decoding_allowed(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_networked_multiplayer_peer(&self) -> NetworkedMultiplayerPeer {
unsafe {{ object::add_ref(self.this); }}
NetworkedMultiplayerPeer { this: self.this }
}
#[inline]
pub fn to_packet_peer(&self) -> PacketPeer {
unsafe {{ object::add_ref(self.this); }}
PacketPeer { this: self.this }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for MultiplayerPeerGDNative {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct UPNP {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
#[repr(u32)]
#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum UPNPUPNPResult {
Success = 0,
NotAuthorized = 1,
PortMappingNotFound = 2,
InconsistentParameters = 3,
NoSuchEntryInArray = 4,
ActionFailed = 5,
SrcIpWildcardNotPermitted = 6,
ExtPortWildcardNotPermitted = 7,
IntPortWildcardNotPermitted = 8,
RemoteHostMustBeWildcard = 9,
ExtPortMustBeWildcard = 10,
NoPortMapsAvailable = 11,
ConflictWithOtherMechanism = 12,
ConflictWithOtherMapping = 13,
SamePortValuesRequired = 14,
OnlyPermanentLeaseSupported = 15,
InvalidGateway = 16,
InvalidPort = 17,
InvalidProtocol = 18,
InvalidDuration = 19,
InvalidArgs = 20,
InvalidResponse = 21,
InvalidParam = 22,
HttpError = 23,
SocketError = 24,
MemAllocError = 25,
NoGateway = 26,
NoDevices = 27,
UnknownError = 28,
}
unsafe impl GodotObject for UPNP {
fn class_name() -> &'static str {
"UPNP"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for UPNP {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl UPNP {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = UPNPMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
UPNP {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn get_device_count(&self) -> i64 {
unsafe { UPNP_get_device_count(self.this) }
}
#[inline]
pub fn get_device(&self, index: i64) -> Option<UPNPDevice> {
unsafe { UPNP_get_device(self.this, index) }
}
#[inline]
pub fn add_device(&mut self, device: Option<UPNPDevice>) -> () {
unsafe { UPNP_add_device(self.this, device) }
}
#[inline]
pub fn set_device(&mut self, index: i64, device: Option<UPNPDevice>) -> () {
unsafe { UPNP_set_device(self.this, index, device) }
}
#[inline]
pub fn remove_device(&mut self, index: i64) -> () {
unsafe { UPNP_remove_device(self.this, index) }
}
#[inline]
pub fn clear_devices(&mut self) -> () {
unsafe { UPNP_clear_devices(self.this) }
}
#[inline]
pub fn get_gateway(&self) -> Option<UPNPDevice> {
unsafe { UPNP_get_gateway(self.this) }
}
#[inline]
pub fn discover(&mut self, timeout: i64, ttl: i64, device_filter: GodotString) -> i64 {
unsafe { UPNP_discover(self.this, timeout, ttl, device_filter) }
}
#[inline]
pub fn query_external_address(&self) -> GodotString {
unsafe { UPNP_query_external_address(self.this) }
}
#[inline]
pub fn add_port_mapping(&self, port: i64, port_internal: i64, desc: GodotString, proto: GodotString, duration: i64) -> i64 {
unsafe { UPNP_add_port_mapping(self.this, port, port_internal, desc, proto, duration) }
}
#[inline]
pub fn delete_port_mapping(&self, port: i64, proto: GodotString) -> i64 {
unsafe { UPNP_delete_port_mapping(self.this, port, proto) }
}
#[inline]
pub fn set_discover_multicast_if(&mut self, m_if: GodotString) -> () {
unsafe { UPNP_set_discover_multicast_if(self.this, m_if) }
}
#[inline]
pub fn get_discover_multicast_if(&self) -> GodotString {
unsafe { UPNP_get_discover_multicast_if(self.this) }
}
#[inline]
pub fn set_discover_local_port(&mut self, port: i64) -> () {
unsafe { UPNP_set_discover_local_port(self.this, port) }
}
#[inline]
pub fn get_discover_local_port(&self) -> i64 {
unsafe { UPNP_get_discover_local_port(self.this) }
}
#[inline]
pub fn set_discover_ipv6(&mut self, ipv6: bool) -> () {
unsafe { UPNP_set_discover_ipv6(self.this, ipv6) }
}
#[inline]
pub fn is_discover_ipv6(&self) -> bool {
unsafe { UPNP_is_discover_ipv6(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for UPNP {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct UPNPDevice {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
#[repr(u32)]
#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum UPNPDeviceIGDStatus {
Ok = 0,
HttpError = 1,
HttpEmpty = 2,
NoUrls = 3,
NoIgd = 4,
Disconnected = 5,
UnknownDevice = 6,
InvalidControl = 7,
MallocError = 8,
UnknownError = 9,
}
unsafe impl GodotObject for UPNPDevice {
fn class_name() -> &'static str {
"UPNPDevice"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for UPNPDevice {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl UPNPDevice {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = UPNPDeviceMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
UPNPDevice {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn is_valid_gateway(&self) -> bool {
unsafe { UPNPDevice_is_valid_gateway(self.this) }
}
#[inline]
pub fn query_external_address(&self) -> GodotString {
unsafe { UPNPDevice_query_external_address(self.this) }
}
#[inline]
pub fn add_port_mapping(&self, port: i64, port_internal: i64, desc: GodotString, proto: GodotString, duration: i64) -> i64 {
unsafe { UPNPDevice_add_port_mapping(self.this, port, port_internal, desc, proto, duration) }
}
#[inline]
pub fn delete_port_mapping(&self, port: i64, proto: GodotString) -> i64 {
unsafe { UPNPDevice_delete_port_mapping(self.this, port, proto) }
}
#[inline]
pub fn set_description_url(&mut self, url: GodotString) -> () {
unsafe { UPNPDevice_set_description_url(self.this, url) }
}
#[inline]
pub fn get_description_url(&self) -> GodotString {
unsafe { UPNPDevice_get_description_url(self.this) }
}
#[inline]
pub fn set_service_type(&mut self, _type: GodotString) -> () {
unsafe { UPNPDevice_set_service_type(self.this, _type) }
}
#[inline]
pub fn get_service_type(&self) -> GodotString {
unsafe { UPNPDevice_get_service_type(self.this) }
}
#[inline]
pub fn set_igd_control_url(&mut self, url: GodotString) -> () {
unsafe { UPNPDevice_set_igd_control_url(self.this, url) }
}
#[inline]
pub fn get_igd_control_url(&self) -> GodotString {
unsafe { UPNPDevice_get_igd_control_url(self.this) }
}
#[inline]
pub fn set_igd_service_type(&mut self, _type: GodotString) -> () {
unsafe { UPNPDevice_set_igd_service_type(self.this, _type) }
}
#[inline]
pub fn get_igd_service_type(&self) -> GodotString {
unsafe { UPNPDevice_get_igd_service_type(self.this) }
}
#[inline]
pub fn set_igd_our_addr(&mut self, addr: GodotString) -> () {
unsafe { UPNPDevice_set_igd_our_addr(self.this, addr) }
}
#[inline]
pub fn get_igd_our_addr(&self) -> GodotString {
unsafe { UPNPDevice_get_igd_our_addr(self.this) }
}
#[inline]
pub fn set_igd_status(&mut self, status: i64) -> () {
unsafe { UPNPDevice_set_igd_status(self.this, status) }
}
#[inline]
pub fn get_igd_status(&self) -> UPNPDeviceIGDStatus {
unsafe { UPNPDevice_get_igd_status(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for UPNPDevice {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct WebSocketServer {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
unsafe impl GodotObject for WebSocketServer {
fn class_name() -> &'static str {
"WebSocketServer"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for WebSocketServer {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl WebSocketServer {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = WebSocketServerMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
WebSocketServer {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn is_listening(&self) -> bool {
unsafe { WebSocketServer_is_listening(self.this) }
}
#[inline]
pub fn listen(&mut self, port: i64, protocols: StringArray, gd_mp_api: bool) -> GodotResult {
unsafe { WebSocketServer_listen(self.this, port, protocols, gd_mp_api) }
}
#[inline]
pub fn stop(&mut self) -> () {
unsafe { WebSocketServer_stop(self.this) }
}
#[inline]
pub fn has_peer(&self, id: i64) -> bool {
unsafe { WebSocketServer_has_peer(self.this, id) }
}
#[inline]
pub fn get_peer_address(&self, id: i64) -> GodotString {
unsafe { WebSocketServer_get_peer_address(self.this, id) }
}
#[inline]
pub fn get_peer_port(&self, id: i64) -> i64 {
unsafe { WebSocketServer_get_peer_port(self.this, id) }
}
#[inline]
pub fn disconnect_peer(&mut self, id: i64) -> () {
unsafe { WebSocketServer_disconnect_peer(self.this, id) }
}
#[inline]
pub fn get_peer(&self, peer_id: i64) -> Option<WebSocketPeer> {
unsafe { WebSocketMultiplayerPeer_get_peer(self.this, peer_id) }
}
#[inline]
pub fn set_transfer_mode(&mut self, mode: i64) -> () {
unsafe { NetworkedMultiplayerPeer_set_transfer_mode(self.this, mode) }
}
#[inline]
pub fn get_transfer_mode(&self) -> NetworkedMultiplayerPeerTransferMode {
unsafe { NetworkedMultiplayerPeer_get_transfer_mode(self.this) }
}
#[inline]
pub fn set_target_peer(&mut self, id: i64) -> () {
unsafe { NetworkedMultiplayerPeer_set_target_peer(self.this, id) }
}
#[inline]
pub fn get_packet_peer(&self) -> i64 {
unsafe { NetworkedMultiplayerPeer_get_packet_peer(self.this) }
}
#[inline]
pub fn poll(&mut self) -> () {
unsafe { NetworkedMultiplayerPeer_poll(self.this) }
}
#[inline]
pub fn get_connection_status(&self) -> NetworkedMultiplayerPeerConnectionStatus {
unsafe { NetworkedMultiplayerPeer_get_connection_status(self.this) }
}
#[inline]
pub fn get_unique_id(&self) -> i64 {
unsafe { NetworkedMultiplayerPeer_get_unique_id(self.this) }
}
#[inline]
pub fn set_refuse_new_connections(&mut self, enable: bool) -> () {
unsafe { NetworkedMultiplayerPeer_set_refuse_new_connections(self.this, enable) }
}
#[inline]
pub fn is_refusing_new_connections(&self) -> bool {
unsafe { NetworkedMultiplayerPeer_is_refusing_new_connections(self.this) }
}
#[inline]
pub fn get_var(&mut self) -> Variant {
unsafe { PacketPeer_get_var(self.this) }
}
#[inline]
pub fn put_var(&mut self, var: Variant) -> GodotResult {
unsafe { PacketPeer_put_var(self.this, var) }
}
#[inline]
pub fn get_packet(&mut self) -> ByteArray {
unsafe { PacketPeer_get_packet(self.this) }
}
#[inline]
pub fn put_packet(&mut self, buffer: ByteArray) -> GodotResult {
unsafe { PacketPeer_put_packet(self.this, buffer) }
}
#[inline]
pub fn get_packet_error(&self) -> GodotResult {
unsafe { PacketPeer_get_packet_error(self.this) }
}
#[inline]
pub fn get_available_packet_count(&self) -> i64 {
unsafe { PacketPeer_get_available_packet_count(self.this) }
}
#[inline]
pub fn set_allow_object_decoding(&mut self, enable: bool) -> () {
unsafe { PacketPeer_set_allow_object_decoding(self.this, enable) }
}
#[inline]
pub fn is_object_decoding_allowed(&self) -> bool {
unsafe { PacketPeer_is_object_decoding_allowed(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_web_socket_multiplayer_peer(&self) -> WebSocketMultiplayerPeer {
unsafe {{ object::add_ref(self.this); }}
WebSocketMultiplayerPeer { this: self.this }
}
#[inline]
pub fn to_networked_multiplayer_peer(&self) -> NetworkedMultiplayerPeer {
unsafe {{ object::add_ref(self.this); }}
NetworkedMultiplayerPeer { this: self.this }
}
#[inline]
pub fn to_packet_peer(&self) -> PacketPeer {
unsafe {{ object::add_ref(self.this); }}
PacketPeer { this: self.this }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for WebSocketServer {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct WebSocketMultiplayerPeer {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
unsafe impl GodotObject for WebSocketMultiplayerPeer {
fn class_name() -> &'static str {
"WebSocketMultiplayerPeer"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for WebSocketMultiplayerPeer {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl WebSocketMultiplayerPeer {
#[inline]
pub fn get_peer(&self, peer_id: i64) -> Option<WebSocketPeer> {
unsafe { WebSocketMultiplayerPeer_get_peer(self.this, peer_id) }
}
#[inline]
pub fn set_transfer_mode(&mut self, mode: i64) -> () {
unsafe { NetworkedMultiplayerPeer_set_transfer_mode(self.this, mode) }
}
#[inline]
pub fn get_transfer_mode(&self) -> NetworkedMultiplayerPeerTransferMode {
unsafe { NetworkedMultiplayerPeer_get_transfer_mode(self.this) }
}
#[inline]
pub fn set_target_peer(&mut self, id: i64) -> () {
unsafe { NetworkedMultiplayerPeer_set_target_peer(self.this, id) }
}
#[inline]
pub fn get_packet_peer(&self) -> i64 {
unsafe { NetworkedMultiplayerPeer_get_packet_peer(self.this) }
}
#[inline]
pub fn poll(&mut self) -> () {
unsafe { NetworkedMultiplayerPeer_poll(self.this) }
}
#[inline]
pub fn get_connection_status(&self) -> NetworkedMultiplayerPeerConnectionStatus {
unsafe { NetworkedMultiplayerPeer_get_connection_status(self.this) }
}
#[inline]
pub fn get_unique_id(&self) -> i64 {
unsafe { NetworkedMultiplayerPeer_get_unique_id(self.this) }
}
#[inline]
pub fn set_refuse_new_connections(&mut self, enable: bool) -> () {
unsafe { NetworkedMultiplayerPeer_set_refuse_new_connections(self.this, enable) }
}
#[inline]
pub fn is_refusing_new_connections(&self) -> bool {
unsafe { NetworkedMultiplayerPeer_is_refusing_new_connections(self.this) }
}
#[inline]
pub fn get_var(&mut self) -> Variant {
unsafe { PacketPeer_get_var(self.this) }
}
#[inline]
pub fn put_var(&mut self, var: Variant) -> GodotResult {
unsafe { PacketPeer_put_var(self.this, var) }
}
#[inline]
pub fn get_packet(&mut self) -> ByteArray {
unsafe { PacketPeer_get_packet(self.this) }
}
#[inline]
pub fn put_packet(&mut self, buffer: ByteArray) -> GodotResult {
unsafe { PacketPeer_put_packet(self.this, buffer) }
}
#[inline]
pub fn get_packet_error(&self) -> GodotResult {
unsafe { PacketPeer_get_packet_error(self.this) }
}
#[inline]
pub fn get_available_packet_count(&self) -> i64 {
unsafe { PacketPeer_get_available_packet_count(self.this) }
}
#[inline]
pub fn set_allow_object_decoding(&mut self, enable: bool) -> () {
unsafe { PacketPeer_set_allow_object_decoding(self.this, enable) }
}
#[inline]
pub fn is_object_decoding_allowed(&self) -> bool {
unsafe { PacketPeer_is_object_decoding_allowed(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_networked_multiplayer_peer(&self) -> NetworkedMultiplayerPeer {
unsafe {{ object::add_ref(self.this); }}
NetworkedMultiplayerPeer { this: self.this }
}
#[inline]
pub fn to_packet_peer(&self) -> PacketPeer {
unsafe {{ object::add_ref(self.this); }}
PacketPeer { this: self.this }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct WebSocketClient {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
unsafe impl GodotObject for WebSocketClient {
fn class_name() -> &'static str {
"WebSocketClient"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for WebSocketClient {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl WebSocketClient {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = WebSocketClientMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
WebSocketClient {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn connect_to_url(&mut self, url: GodotString, protocols: StringArray, gd_mp_api: bool) -> GodotResult {
unsafe { WebSocketClient_connect_to_url(self.this, url, protocols, gd_mp_api) }
}
#[inline]
pub fn disconnect_from_host(&mut self) -> () {
unsafe { WebSocketClient_disconnect_from_host(self.this) }
}
#[inline]
pub fn set_verify_ssl_enabled(&mut self, enabled: bool) -> () {
unsafe { WebSocketClient_set_verify_ssl_enabled(self.this, enabled) }
}
#[inline]
pub fn is_verify_ssl_enabled(&self) -> bool {
unsafe { WebSocketClient_is_verify_ssl_enabled(self.this) }
}
#[inline]
pub fn get_peer(&self, peer_id: i64) -> Option<WebSocketPeer> {
unsafe { WebSocketMultiplayerPeer_get_peer(self.this, peer_id) }
}
#[inline]
pub fn set_transfer_mode(&mut self, mode: i64) -> () {
unsafe { NetworkedMultiplayerPeer_set_transfer_mode(self.this, mode) }
}
#[inline]
pub fn get_transfer_mode(&self) -> NetworkedMultiplayerPeerTransferMode {
unsafe { NetworkedMultiplayerPeer_get_transfer_mode(self.this) }
}
#[inline]
pub fn set_target_peer(&mut self, id: i64) -> () {
unsafe { NetworkedMultiplayerPeer_set_target_peer(self.this, id) }
}
#[inline]
pub fn get_packet_peer(&self) -> i64 {
unsafe { NetworkedMultiplayerPeer_get_packet_peer(self.this) }
}
#[inline]
pub fn poll(&mut self) -> () {
unsafe { NetworkedMultiplayerPeer_poll(self.this) }
}
#[inline]
pub fn get_connection_status(&self) -> NetworkedMultiplayerPeerConnectionStatus {
unsafe { NetworkedMultiplayerPeer_get_connection_status(self.this) }
}
#[inline]
pub fn get_unique_id(&self) -> i64 {
unsafe { NetworkedMultiplayerPeer_get_unique_id(self.this) }
}
#[inline]
pub fn set_refuse_new_connections(&mut self, enable: bool) -> () {
unsafe { NetworkedMultiplayerPeer_set_refuse_new_connections(self.this, enable) }
}
#[inline]
pub fn is_refusing_new_connections(&self) -> bool {
unsafe { NetworkedMultiplayerPeer_is_refusing_new_connections(self.this) }
}
#[inline]
pub fn get_var(&mut self) -> Variant {
unsafe { PacketPeer_get_var(self.this) }
}
#[inline]
pub fn put_var(&mut self, var: Variant) -> GodotResult {
unsafe { PacketPeer_put_var(self.this, var) }
}
#[inline]
pub fn get_packet(&mut self) -> ByteArray {
unsafe { PacketPeer_get_packet(self.this) }
}
#[inline]
pub fn put_packet(&mut self, buffer: ByteArray) -> GodotResult {
unsafe { PacketPeer_put_packet(self.this, buffer) }
}
#[inline]
pub fn get_packet_error(&self) -> GodotResult {
unsafe { PacketPeer_get_packet_error(self.this) }
}
#[inline]
pub fn get_available_packet_count(&self) -> i64 {
unsafe { PacketPeer_get_available_packet_count(self.this) }
}
#[inline]
pub fn set_allow_object_decoding(&mut self, enable: bool) -> () {
unsafe { PacketPeer_set_allow_object_decoding(self.this, enable) }
}
#[inline]
pub fn is_object_decoding_allowed(&self) -> bool {
unsafe { PacketPeer_is_object_decoding_allowed(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_web_socket_multiplayer_peer(&self) -> WebSocketMultiplayerPeer {
unsafe {{ object::add_ref(self.this); }}
WebSocketMultiplayerPeer { this: self.this }
}
#[inline]
pub fn to_networked_multiplayer_peer(&self) -> NetworkedMultiplayerPeer {
unsafe {{ object::add_ref(self.this); }}
NetworkedMultiplayerPeer { this: self.this }
}
#[inline]
pub fn to_packet_peer(&self) -> PacketPeer {
unsafe {{ object::add_ref(self.this); }}
PacketPeer { this: self.this }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for WebSocketClient {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[allow(non_camel_case_types)]
#[derive(Debug)]
pub struct WebSocketPeer {
#[doc(hidden)]
pub this: *mut sys::godot_object,
}
#[repr(u32)]
#[allow(non_camel_case_types)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub enum WebSocketPeerWriteMode {
ModeText = 0,
ModeBinary = 1,
}
unsafe impl GodotObject for WebSocketPeer {
fn class_name() -> &'static str {
"WebSocketPeer"
}
unsafe fn from_sys(obj: *mut sys::godot_object) -> Self {
object::add_ref(obj);
Self { this: obj, }
}
unsafe fn to_sys(&self) -> *mut sys::godot_object {
self.this
}
}
impl ToVariant for WebSocketPeer {
fn to_variant(&self) -> Variant { Variant::from_object(self) }
fn from_variant(variant: &Variant) -> Option<Self> { variant.try_to_object::<Self>() }
}
impl WebSocketPeer {
pub fn new() -> Self {
unsafe {
let gd_api = get_api();
let ctor = WebSocketPeerMethodTable::get(gd_api).class_constructor.unwrap();
let obj = ctor();
object::init_ref_count(obj);
WebSocketPeer {
this: obj
}
}
}
pub fn new_ref(&self) -> Self {
unsafe {
object::add_ref(self.this);
Self {
this: self.this,
}
}
}
#[inline]
pub fn get_write_mode(&self) -> WebSocketPeerWriteMode {
unsafe { WebSocketPeer_get_write_mode(self.this) }
}
#[inline]
pub fn set_write_mode(&mut self, mode: i64) -> () {
unsafe { WebSocketPeer_set_write_mode(self.this, mode) }
}
#[inline]
pub fn is_connected_to_host(&self) -> bool {
unsafe { WebSocketPeer_is_connected_to_host(self.this) }
}
#[inline]
pub fn was_string_packet(&self) -> bool {
unsafe { WebSocketPeer_was_string_packet(self.this) }
}
#[inline]
pub fn close(&mut self) -> () {
unsafe { WebSocketPeer_close(self.this) }
}
#[inline]
pub fn get_connected_host(&self) -> GodotString {
unsafe { WebSocketPeer_get_connected_host(self.this) }
}
#[inline]
pub fn get_connected_port(&self) -> i64 {
unsafe { WebSocketPeer_get_connected_port(self.this) }
}
#[inline]
pub fn get_var(&mut self) -> Variant {
unsafe { PacketPeer_get_var(self.this) }
}
#[inline]
pub fn put_var(&mut self, var: Variant) -> GodotResult {
unsafe { PacketPeer_put_var(self.this, var) }
}
#[inline]
pub fn get_packet(&mut self) -> ByteArray {
unsafe { PacketPeer_get_packet(self.this) }
}
#[inline]
pub fn put_packet(&mut self, buffer: ByteArray) -> GodotResult {
unsafe { PacketPeer_put_packet(self.this, buffer) }
}
#[inline]
pub fn get_packet_error(&self) -> GodotResult {
unsafe { PacketPeer_get_packet_error(self.this) }
}
#[inline]
pub fn get_available_packet_count(&self) -> i64 {
unsafe { PacketPeer_get_available_packet_count(self.this) }
}
#[inline]
pub fn set_allow_object_decoding(&mut self, enable: bool) -> () {
unsafe { PacketPeer_set_allow_object_decoding(self.this, enable) }
}
#[inline]
pub fn is_object_decoding_allowed(&self) -> bool {
unsafe { PacketPeer_is_object_decoding_allowed(self.this) }
}
#[inline]
pub fn init_ref(&mut self) -> bool {
unsafe { Reference_init_ref(self.this) }
}
#[inline]
pub fn _notification(&mut self, what: i64) -> () {
unsafe { Object__notification(self.this, what) }
}
#[inline]
pub fn _set(&mut self, property: GodotString, value: Variant) -> bool {
unsafe { Object__set(self.this, property, value) }
}
#[inline]
pub fn _get(&mut self, property: GodotString) -> Variant {
unsafe { Object__get(self.this, property) }
}
#[inline]
pub fn _get_property_list(&mut self) -> VariantArray {
unsafe { Object__get_property_list(self.this) }
}
#[inline]
pub fn _init(&mut self) -> () {
unsafe { Object__init(self.this) }
}
#[inline]
pub fn get_class(&self) -> GodotString {
unsafe { Object_get_class(self.this) }
}
#[inline]
pub fn is_class(&self, _type: GodotString) -> bool {
unsafe { Object_is_class(self.this, _type) }
}
#[inline]
pub fn set(&mut self, property: GodotString, value: Variant) -> () {
unsafe { Object_set(self.this, property, value) }
}
#[inline]
pub fn get(&self, property: GodotString) -> Variant {
unsafe { Object_get(self.this, property) }
}
#[inline]
pub fn set_indexed(&mut self, property: NodePath, value: Variant) -> () {
unsafe { Object_set_indexed(self.this, property, value) }
}
#[inline]
pub fn get_indexed(&self, property: NodePath) -> Variant {
unsafe { Object_get_indexed(self.this, property) }
}
#[inline]
pub fn get_property_list(&self) -> VariantArray {
unsafe { Object_get_property_list(self.this) }
}
#[inline]
pub fn get_method_list(&self) -> VariantArray {
unsafe { Object_get_method_list(self.this) }
}
#[inline]
pub fn notification(&mut self, what: i64, reversed: bool) -> () {
unsafe { Object_notification(self.this, what, reversed) }
}
#[inline]
pub fn get_instance_id(&self) -> i64 {
unsafe { Object_get_instance_id(self.this) }
}
#[inline]
pub fn set_script(&mut self, script: Option<Reference>) -> () {
unsafe { Object_set_script(self.this, script) }
}
#[inline]
pub fn get_script(&self) -> Option<Reference> {
unsafe { Object_get_script(self.this) }
}
#[inline]
pub fn set_meta(&mut self, name: GodotString, value: Variant) -> () {
unsafe { Object_set_meta(self.this, name, value) }
}
#[inline]
pub fn get_meta(&self, name: GodotString) -> Variant {
unsafe { Object_get_meta(self.this, name) }
}
#[inline]
pub fn has_meta(&self, name: GodotString) -> bool {
unsafe { Object_has_meta(self.this, name) }
}
#[inline]
pub fn get_meta_list(&self) -> StringArray {
unsafe { Object_get_meta_list(self.this) }
}
#[inline]
pub fn add_user_signal(&mut self, signal: GodotString, arguments: VariantArray) -> () {
unsafe { Object_add_user_signal(self.this, signal, arguments) }
}
#[inline]
pub fn has_user_signal(&self, signal: GodotString) -> bool {
unsafe { Object_has_user_signal(self.this, signal) }
}
#[inline]
pub fn emit_signal(&mut self, signal: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_emit_signal(self.this, signal, varargs) }
}
#[inline]
pub fn call(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call(self.this, method, varargs) }
}
#[inline]
pub fn call_deferred(&mut self, method: GodotString, varargs: &[Variant]) -> Variant {
unsafe { Object_call_deferred(self.this, method, varargs) }
}
#[inline]
pub fn callv(&mut self, method: GodotString, arg_array: VariantArray) -> Variant {
unsafe { Object_callv(self.this, method, arg_array) }
}
#[inline]
pub fn has_method(&self, method: GodotString) -> bool {
unsafe { Object_has_method(self.this, method) }
}
#[inline]
pub fn get_signal_list(&self) -> VariantArray {
unsafe { Object_get_signal_list(self.this) }
}
#[inline]
pub fn get_signal_connection_list(&self, signal: GodotString) -> VariantArray {
unsafe { Object_get_signal_connection_list(self.this, signal) }
}
#[inline]
pub fn get_incoming_connections(&self) -> VariantArray {
unsafe { Object_get_incoming_connections(self.this) }
}
#[inline]
pub fn connect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString, binds: VariantArray, flags: i64) -> GodotResult {
unsafe { Object_connect(self.this, signal, target, method, binds, flags) }
}
#[inline]
pub fn disconnect(&mut self, signal: GodotString, target: Option<Object>, method: GodotString) -> () {
unsafe { Object_disconnect(self.this, signal, target, method) }
}
#[inline]
pub fn is_connected(&self, signal: GodotString, target: Option<Object>, method: GodotString) -> bool {
unsafe { Object_is_connected(self.this, signal, target, method) }
}
#[inline]
pub fn set_block_signals(&mut self, enable: bool) -> () {
unsafe { Object_set_block_signals(self.this, enable) }
}
#[inline]
pub fn is_blocking_signals(&self) -> bool {
unsafe { Object_is_blocking_signals(self.this) }
}
#[inline]
pub fn property_list_changed_notify(&mut self) -> () {
unsafe { Object_property_list_changed_notify(self.this) }
}
#[inline]
pub fn set_message_translation(&mut self, enable: bool) -> () {
unsafe { Object_set_message_translation(self.this, enable) }
}
#[inline]
pub fn can_translate_messages(&self) -> bool {
unsafe { Object_can_translate_messages(self.this) }
}
#[inline]
pub fn tr(&self, message: GodotString) -> GodotString {
unsafe { Object_tr(self.this, message) }
}
#[inline]
pub fn is_queued_for_deletion(&self) -> bool {
unsafe { Object_is_queued_for_deletion(self.this) }
}
#[inline]
pub fn to_packet_peer(&self) -> PacketPeer {
unsafe {{ object::add_ref(self.this); }}
PacketPeer { this: self.this }
}
#[inline]
pub fn to_reference(&self) -> Reference {
unsafe {{ object::add_ref(self.this); }}
Reference { this: self.this }
}
#[inline]
pub fn to_object(&self) -> Object {
Object { this: self.this }
}
pub fn cast<T: GodotObject>(&self) -> Option<T> {
object::godot_cast::<T>(self.this)
}
}
impl Drop for WebSocketPeer {
fn drop(&mut self) {
unsafe {
if object::unref(self.this) {
(get_api().godot_object_destroy)(self.this);
}
}
}
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct StreamPeerMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub put_data: *mut sys::godot_method_bind,
pub put_partial_data: *mut sys::godot_method_bind,
pub get_data: *mut sys::godot_method_bind,
pub get_partial_data: *mut sys::godot_method_bind,
pub get_available_bytes: *mut sys::godot_method_bind,
pub set_big_endian: *mut sys::godot_method_bind,
pub is_big_endian_enabled: *mut sys::godot_method_bind,
pub put_8: *mut sys::godot_method_bind,
pub put_u8: *mut sys::godot_method_bind,
pub put_16: *mut sys::godot_method_bind,
pub put_u16: *mut sys::godot_method_bind,
pub put_32: *mut sys::godot_method_bind,
pub put_u32: *mut sys::godot_method_bind,
pub put_64: *mut sys::godot_method_bind,
pub put_u64: *mut sys::godot_method_bind,
pub put_float: *mut sys::godot_method_bind,
pub put_double: *mut sys::godot_method_bind,
pub put_utf8_string: *mut sys::godot_method_bind,
pub put_var: *mut sys::godot_method_bind,
pub get_8: *mut sys::godot_method_bind,
pub get_u8: *mut sys::godot_method_bind,
pub get_16: *mut sys::godot_method_bind,
pub get_u16: *mut sys::godot_method_bind,
pub get_32: *mut sys::godot_method_bind,
pub get_u32: *mut sys::godot_method_bind,
pub get_64: *mut sys::godot_method_bind,
pub get_u64: *mut sys::godot_method_bind,
pub get_float: *mut sys::godot_method_bind,
pub get_double: *mut sys::godot_method_bind,
pub get_string: *mut sys::godot_method_bind,
pub get_utf8_string: *mut sys::godot_method_bind,
pub get_var: *mut sys::godot_method_bind,
}
impl StreamPeerMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: StreamPeerMethodTable = StreamPeerMethodTable {
class_constructor: None,
put_data: 0 as *mut sys::godot_method_bind,
put_partial_data: 0 as *mut sys::godot_method_bind,
get_data: 0 as *mut sys::godot_method_bind,
get_partial_data: 0 as *mut sys::godot_method_bind,
get_available_bytes: 0 as *mut sys::godot_method_bind,
set_big_endian: 0 as *mut sys::godot_method_bind,
is_big_endian_enabled: 0 as *mut sys::godot_method_bind,
put_8: 0 as *mut sys::godot_method_bind,
put_u8: 0 as *mut sys::godot_method_bind,
put_16: 0 as *mut sys::godot_method_bind,
put_u16: 0 as *mut sys::godot_method_bind,
put_32: 0 as *mut sys::godot_method_bind,
put_u32: 0 as *mut sys::godot_method_bind,
put_64: 0 as *mut sys::godot_method_bind,
put_u64: 0 as *mut sys::godot_method_bind,
put_float: 0 as *mut sys::godot_method_bind,
put_double: 0 as *mut sys::godot_method_bind,
put_utf8_string: 0 as *mut sys::godot_method_bind,
put_var: 0 as *mut sys::godot_method_bind,
get_8: 0 as *mut sys::godot_method_bind,
get_u8: 0 as *mut sys::godot_method_bind,
get_16: 0 as *mut sys::godot_method_bind,
get_u16: 0 as *mut sys::godot_method_bind,
get_32: 0 as *mut sys::godot_method_bind,
get_u32: 0 as *mut sys::godot_method_bind,
get_64: 0 as *mut sys::godot_method_bind,
get_u64: 0 as *mut sys::godot_method_bind,
get_float: 0 as *mut sys::godot_method_bind,
get_double: 0 as *mut sys::godot_method_bind,
get_string: 0 as *mut sys::godot_method_bind,
get_utf8_string: 0 as *mut sys::godot_method_bind,
get_var: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
StreamPeerMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"StreamPeer\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.put_data = (gd_api.godot_method_bind_get_method)(class_name, "put_data\0".as_ptr() as *const c_char );
table.put_partial_data = (gd_api.godot_method_bind_get_method)(class_name, "put_partial_data\0".as_ptr() as *const c_char );
table.get_data = (gd_api.godot_method_bind_get_method)(class_name, "get_data\0".as_ptr() as *const c_char );
table.get_partial_data = (gd_api.godot_method_bind_get_method)(class_name, "get_partial_data\0".as_ptr() as *const c_char );
table.get_available_bytes = (gd_api.godot_method_bind_get_method)(class_name, "get_available_bytes\0".as_ptr() as *const c_char );
table.set_big_endian = (gd_api.godot_method_bind_get_method)(class_name, "set_big_endian\0".as_ptr() as *const c_char );
table.is_big_endian_enabled = (gd_api.godot_method_bind_get_method)(class_name, "is_big_endian_enabled\0".as_ptr() as *const c_char );
table.put_8 = (gd_api.godot_method_bind_get_method)(class_name, "put_8\0".as_ptr() as *const c_char );
table.put_u8 = (gd_api.godot_method_bind_get_method)(class_name, "put_u8\0".as_ptr() as *const c_char );
table.put_16 = (gd_api.godot_method_bind_get_method)(class_name, "put_16\0".as_ptr() as *const c_char );
table.put_u16 = (gd_api.godot_method_bind_get_method)(class_name, "put_u16\0".as_ptr() as *const c_char );
table.put_32 = (gd_api.godot_method_bind_get_method)(class_name, "put_32\0".as_ptr() as *const c_char );
table.put_u32 = (gd_api.godot_method_bind_get_method)(class_name, "put_u32\0".as_ptr() as *const c_char );
table.put_64 = (gd_api.godot_method_bind_get_method)(class_name, "put_64\0".as_ptr() as *const c_char );
table.put_u64 = (gd_api.godot_method_bind_get_method)(class_name, "put_u64\0".as_ptr() as *const c_char );
table.put_float = (gd_api.godot_method_bind_get_method)(class_name, "put_float\0".as_ptr() as *const c_char );
table.put_double = (gd_api.godot_method_bind_get_method)(class_name, "put_double\0".as_ptr() as *const c_char );
table.put_utf8_string = (gd_api.godot_method_bind_get_method)(class_name, "put_utf8_string\0".as_ptr() as *const c_char );
table.put_var = (gd_api.godot_method_bind_get_method)(class_name, "put_var\0".as_ptr() as *const c_char );
table.get_8 = (gd_api.godot_method_bind_get_method)(class_name, "get_8\0".as_ptr() as *const c_char );
table.get_u8 = (gd_api.godot_method_bind_get_method)(class_name, "get_u8\0".as_ptr() as *const c_char );
table.get_16 = (gd_api.godot_method_bind_get_method)(class_name, "get_16\0".as_ptr() as *const c_char );
table.get_u16 = (gd_api.godot_method_bind_get_method)(class_name, "get_u16\0".as_ptr() as *const c_char );
table.get_32 = (gd_api.godot_method_bind_get_method)(class_name, "get_32\0".as_ptr() as *const c_char );
table.get_u32 = (gd_api.godot_method_bind_get_method)(class_name, "get_u32\0".as_ptr() as *const c_char );
table.get_64 = (gd_api.godot_method_bind_get_method)(class_name, "get_64\0".as_ptr() as *const c_char );
table.get_u64 = (gd_api.godot_method_bind_get_method)(class_name, "get_u64\0".as_ptr() as *const c_char );
table.get_float = (gd_api.godot_method_bind_get_method)(class_name, "get_float\0".as_ptr() as *const c_char );
table.get_double = (gd_api.godot_method_bind_get_method)(class_name, "get_double\0".as_ptr() as *const c_char );
table.get_string = (gd_api.godot_method_bind_get_method)(class_name, "get_string\0".as_ptr() as *const c_char );
table.get_utf8_string = (gd_api.godot_method_bind_get_method)(class_name, "get_utf8_string\0".as_ptr() as *const c_char );
table.get_var = (gd_api.godot_method_bind_get_method)(class_name, "get_var\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn StreamPeer_put_data(obj_ptr: *mut sys::godot_object, data: ByteArray) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).put_data;
let mut argument_buffer : [*const libc::c_void; 1] = [
data.sys() as *const _ as *const _,
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn StreamPeer_put_partial_data(obj_ptr: *mut sys::godot_object, data: ByteArray) -> VariantArray {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).put_partial_data;
let mut argument_buffer : [*const libc::c_void; 1] = [
data.sys() as *const _ as *const _,
];
let mut ret = sys::godot_array::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
VariantArray::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_data(obj_ptr: *mut sys::godot_object, bytes: i64) -> VariantArray {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_data;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&bytes) as *const _ as *const _,
];
let mut ret = sys::godot_array::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
VariantArray::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_partial_data(obj_ptr: *mut sys::godot_object, bytes: i64) -> VariantArray {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_partial_data;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&bytes) as *const _ as *const _,
];
let mut ret = sys::godot_array::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
VariantArray::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_available_bytes(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_available_bytes;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeer_set_big_endian(obj_ptr: *mut sys::godot_object, enable: bool) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).set_big_endian;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&enable) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeer_is_big_endian_enabled(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).is_big_endian_enabled;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeer_put_8(obj_ptr: *mut sys::godot_object, value: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).put_8;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&value) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeer_put_u8(obj_ptr: *mut sys::godot_object, value: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).put_u8;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&value) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeer_put_16(obj_ptr: *mut sys::godot_object, value: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).put_16;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&value) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeer_put_u16(obj_ptr: *mut sys::godot_object, value: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).put_u16;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&value) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeer_put_32(obj_ptr: *mut sys::godot_object, value: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).put_32;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&value) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeer_put_u32(obj_ptr: *mut sys::godot_object, value: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).put_u32;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&value) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeer_put_64(obj_ptr: *mut sys::godot_object, value: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).put_64;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&value) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeer_put_u64(obj_ptr: *mut sys::godot_object, value: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).put_u64;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&value) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeer_put_float(obj_ptr: *mut sys::godot_object, value: f64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).put_float;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&value) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeer_put_double(obj_ptr: *mut sys::godot_object, value: f64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).put_double;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&value) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeer_put_utf8_string(obj_ptr: *mut sys::godot_object, value: GodotString) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).put_utf8_string;
let mut argument_buffer : [*const libc::c_void; 1] = [
value.sys() as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeer_put_var(obj_ptr: *mut sys::godot_object, value: Variant) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).put_var;
let mut argument_buffer : [*const libc::c_void; 1] = [
value.sys() as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_8(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_8;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_u8(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_u8;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_16(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_16;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_u16(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_u16;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_32(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_32;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_u32(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_u32;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_64(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_64;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_u64(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_u64;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_float(obj_ptr: *mut sys::godot_object) -> f64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_float;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0.0f64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_double(obj_ptr: *mut sys::godot_object) -> f64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_double;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0.0f64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_string(obj_ptr: *mut sys::godot_object, bytes: i64) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_string;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&bytes) as *const _ as *const _,
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_utf8_string(obj_ptr: *mut sys::godot_object, bytes: i64) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_utf8_string;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&bytes) as *const _ as *const _,
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn StreamPeer_get_var(obj_ptr: *mut sys::godot_object) -> Variant {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerMethodTable::get(gd_api).get_var;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_variant::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
Variant::from_sys(ret)
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct TCP_ServerMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub listen: *mut sys::godot_method_bind,
pub is_connection_available: *mut sys::godot_method_bind,
pub take_connection: *mut sys::godot_method_bind,
pub stop: *mut sys::godot_method_bind,
}
impl TCP_ServerMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: TCP_ServerMethodTable = TCP_ServerMethodTable {
class_constructor: None,
listen: 0 as *mut sys::godot_method_bind,
is_connection_available: 0 as *mut sys::godot_method_bind,
take_connection: 0 as *mut sys::godot_method_bind,
stop: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
TCP_ServerMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"TCP_Server\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.listen = (gd_api.godot_method_bind_get_method)(class_name, "listen\0".as_ptr() as *const c_char );
table.is_connection_available = (gd_api.godot_method_bind_get_method)(class_name, "is_connection_available\0".as_ptr() as *const c_char );
table.take_connection = (gd_api.godot_method_bind_get_method)(class_name, "take_connection\0".as_ptr() as *const c_char );
table.stop = (gd_api.godot_method_bind_get_method)(class_name, "stop\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn TCP_Server_listen(obj_ptr: *mut sys::godot_object, port: i64, bind_address: GodotString) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = TCP_ServerMethodTable::get(gd_api).listen;
let mut argument_buffer : [*const libc::c_void; 2] = [
(&port) as *const _ as *const _,
bind_address.sys() as *const _ as *const _,
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn TCP_Server_is_connection_available(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = TCP_ServerMethodTable::get(gd_api).is_connection_available;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn TCP_Server_take_connection(obj_ptr: *mut sys::godot_object) -> Option<StreamPeerTCP> {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = TCP_ServerMethodTable::get(gd_api).take_connection;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret: *mut sys::godot_object = ptr::null_mut();
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
if ret.is_null() {
None
} else {
Some(StreamPeerTCP::from_sys(ret))
}
}
#[doc(hidden)]
pub unsafe fn TCP_Server_stop(obj_ptr: *mut sys::godot_object) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = TCP_ServerMethodTable::get(gd_api).stop;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct StreamPeerBufferMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub seek: *mut sys::godot_method_bind,
pub get_size: *mut sys::godot_method_bind,
pub get_position: *mut sys::godot_method_bind,
pub resize: *mut sys::godot_method_bind,
pub set_data_array: *mut sys::godot_method_bind,
pub get_data_array: *mut sys::godot_method_bind,
pub clear: *mut sys::godot_method_bind,
pub duplicate: *mut sys::godot_method_bind,
}
impl StreamPeerBufferMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: StreamPeerBufferMethodTable = StreamPeerBufferMethodTable {
class_constructor: None,
seek: 0 as *mut sys::godot_method_bind,
get_size: 0 as *mut sys::godot_method_bind,
get_position: 0 as *mut sys::godot_method_bind,
resize: 0 as *mut sys::godot_method_bind,
set_data_array: 0 as *mut sys::godot_method_bind,
get_data_array: 0 as *mut sys::godot_method_bind,
clear: 0 as *mut sys::godot_method_bind,
duplicate: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
StreamPeerBufferMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"StreamPeerBuffer\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.seek = (gd_api.godot_method_bind_get_method)(class_name, "seek\0".as_ptr() as *const c_char );
table.get_size = (gd_api.godot_method_bind_get_method)(class_name, "get_size\0".as_ptr() as *const c_char );
table.get_position = (gd_api.godot_method_bind_get_method)(class_name, "get_position\0".as_ptr() as *const c_char );
table.resize = (gd_api.godot_method_bind_get_method)(class_name, "resize\0".as_ptr() as *const c_char );
table.set_data_array = (gd_api.godot_method_bind_get_method)(class_name, "set_data_array\0".as_ptr() as *const c_char );
table.get_data_array = (gd_api.godot_method_bind_get_method)(class_name, "get_data_array\0".as_ptr() as *const c_char );
table.clear = (gd_api.godot_method_bind_get_method)(class_name, "clear\0".as_ptr() as *const c_char );
table.duplicate = (gd_api.godot_method_bind_get_method)(class_name, "duplicate\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn StreamPeerBuffer_seek(obj_ptr: *mut sys::godot_object, position: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerBufferMethodTable::get(gd_api).seek;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&position) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeerBuffer_get_size(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerBufferMethodTable::get(gd_api).get_size;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeerBuffer_get_position(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerBufferMethodTable::get(gd_api).get_position;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeerBuffer_resize(obj_ptr: *mut sys::godot_object, size: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerBufferMethodTable::get(gd_api).resize;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&size) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeerBuffer_set_data_array(obj_ptr: *mut sys::godot_object, data: ByteArray) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerBufferMethodTable::get(gd_api).set_data_array;
let mut argument_buffer : [*const libc::c_void; 1] = [
data.sys() as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeerBuffer_get_data_array(obj_ptr: *mut sys::godot_object) -> ByteArray {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerBufferMethodTable::get(gd_api).get_data_array;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_pool_byte_array::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ByteArray::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn StreamPeerBuffer_clear(obj_ptr: *mut sys::godot_object) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerBufferMethodTable::get(gd_api).clear;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeerBuffer_duplicate(obj_ptr: *mut sys::godot_object) -> Option<StreamPeerBuffer> {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerBufferMethodTable::get(gd_api).duplicate;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret: *mut sys::godot_object = ptr::null_mut();
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
if ret.is_null() {
None
} else {
Some(StreamPeerBuffer::from_sys(ret))
}
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct StreamPeerTCPMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub connect_to_host: *mut sys::godot_method_bind,
pub is_connected_to_host: *mut sys::godot_method_bind,
pub get_status: *mut sys::godot_method_bind,
pub get_connected_host: *mut sys::godot_method_bind,
pub get_connected_port: *mut sys::godot_method_bind,
pub disconnect_from_host: *mut sys::godot_method_bind,
pub set_no_delay: *mut sys::godot_method_bind,
}
impl StreamPeerTCPMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: StreamPeerTCPMethodTable = StreamPeerTCPMethodTable {
class_constructor: None,
connect_to_host: 0 as *mut sys::godot_method_bind,
is_connected_to_host: 0 as *mut sys::godot_method_bind,
get_status: 0 as *mut sys::godot_method_bind,
get_connected_host: 0 as *mut sys::godot_method_bind,
get_connected_port: 0 as *mut sys::godot_method_bind,
disconnect_from_host: 0 as *mut sys::godot_method_bind,
set_no_delay: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
StreamPeerTCPMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"StreamPeerTCP\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.connect_to_host = (gd_api.godot_method_bind_get_method)(class_name, "connect_to_host\0".as_ptr() as *const c_char );
table.is_connected_to_host = (gd_api.godot_method_bind_get_method)(class_name, "is_connected_to_host\0".as_ptr() as *const c_char );
table.get_status = (gd_api.godot_method_bind_get_method)(class_name, "get_status\0".as_ptr() as *const c_char );
table.get_connected_host = (gd_api.godot_method_bind_get_method)(class_name, "get_connected_host\0".as_ptr() as *const c_char );
table.get_connected_port = (gd_api.godot_method_bind_get_method)(class_name, "get_connected_port\0".as_ptr() as *const c_char );
table.disconnect_from_host = (gd_api.godot_method_bind_get_method)(class_name, "disconnect_from_host\0".as_ptr() as *const c_char );
table.set_no_delay = (gd_api.godot_method_bind_get_method)(class_name, "set_no_delay\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn StreamPeerTCP_connect_to_host(obj_ptr: *mut sys::godot_object, host: GodotString, port: i64) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerTCPMethodTable::get(gd_api).connect_to_host;
let mut argument_buffer : [*const libc::c_void; 2] = [
host.sys() as *const _ as *const _,
(&port) as *const _ as *const _,
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn StreamPeerTCP_is_connected_to_host(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerTCPMethodTable::get(gd_api).is_connected_to_host;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeerTCP_get_status(obj_ptr: *mut sys::godot_object) -> StreamPeerTCPStatus {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerTCPMethodTable::get(gd_api).get_status;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret: StreamPeerTCPStatus = mem::transmute(0);
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeerTCP_get_connected_host(obj_ptr: *mut sys::godot_object) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerTCPMethodTable::get(gd_api).get_connected_host;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn StreamPeerTCP_get_connected_port(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerTCPMethodTable::get(gd_api).get_connected_port;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeerTCP_disconnect_from_host(obj_ptr: *mut sys::godot_object) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerTCPMethodTable::get(gd_api).disconnect_from_host;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeerTCP_set_no_delay(obj_ptr: *mut sys::godot_object, enabled: bool) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerTCPMethodTable::get(gd_api).set_no_delay;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&enabled) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct PacketPeerStreamMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub set_stream_peer: *mut sys::godot_method_bind,
pub get_stream_peer: *mut sys::godot_method_bind,
pub set_input_buffer_max_size: *mut sys::godot_method_bind,
pub set_output_buffer_max_size: *mut sys::godot_method_bind,
pub get_input_buffer_max_size: *mut sys::godot_method_bind,
pub get_output_buffer_max_size: *mut sys::godot_method_bind,
}
impl PacketPeerStreamMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: PacketPeerStreamMethodTable = PacketPeerStreamMethodTable {
class_constructor: None,
set_stream_peer: 0 as *mut sys::godot_method_bind,
get_stream_peer: 0 as *mut sys::godot_method_bind,
set_input_buffer_max_size: 0 as *mut sys::godot_method_bind,
set_output_buffer_max_size: 0 as *mut sys::godot_method_bind,
get_input_buffer_max_size: 0 as *mut sys::godot_method_bind,
get_output_buffer_max_size: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
PacketPeerStreamMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"PacketPeerStream\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.set_stream_peer = (gd_api.godot_method_bind_get_method)(class_name, "set_stream_peer\0".as_ptr() as *const c_char );
table.get_stream_peer = (gd_api.godot_method_bind_get_method)(class_name, "get_stream_peer\0".as_ptr() as *const c_char );
table.set_input_buffer_max_size = (gd_api.godot_method_bind_get_method)(class_name, "set_input_buffer_max_size\0".as_ptr() as *const c_char );
table.set_output_buffer_max_size = (gd_api.godot_method_bind_get_method)(class_name, "set_output_buffer_max_size\0".as_ptr() as *const c_char );
table.get_input_buffer_max_size = (gd_api.godot_method_bind_get_method)(class_name, "get_input_buffer_max_size\0".as_ptr() as *const c_char );
table.get_output_buffer_max_size = (gd_api.godot_method_bind_get_method)(class_name, "get_output_buffer_max_size\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn PacketPeerStream_set_stream_peer(obj_ptr: *mut sys::godot_object, peer: Option<StreamPeer>) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = PacketPeerStreamMethodTable::get(gd_api).set_stream_peer;
let mut argument_buffer : [*const libc::c_void; 1] = [
if let Some(arg) = peer { arg.this as *const _ as *const _ } else { ptr::null() },
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn PacketPeerStream_get_stream_peer(obj_ptr: *mut sys::godot_object) -> Option<StreamPeer> {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = PacketPeerStreamMethodTable::get(gd_api).get_stream_peer;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret: *mut sys::godot_object = ptr::null_mut();
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
if ret.is_null() {
None
} else {
Some(StreamPeer::from_sys(ret))
}
}
#[doc(hidden)]
pub unsafe fn PacketPeerStream_set_input_buffer_max_size(obj_ptr: *mut sys::godot_object, max_size_bytes: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = PacketPeerStreamMethodTable::get(gd_api).set_input_buffer_max_size;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&max_size_bytes) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn PacketPeerStream_set_output_buffer_max_size(obj_ptr: *mut sys::godot_object, max_size_bytes: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = PacketPeerStreamMethodTable::get(gd_api).set_output_buffer_max_size;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&max_size_bytes) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn PacketPeerStream_get_input_buffer_max_size(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = PacketPeerStreamMethodTable::get(gd_api).get_input_buffer_max_size;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn PacketPeerStream_get_output_buffer_max_size(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = PacketPeerStreamMethodTable::get(gd_api).get_output_buffer_max_size;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct StreamPeerSSLMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub poll: *mut sys::godot_method_bind,
pub accept_stream: *mut sys::godot_method_bind,
pub connect_to_stream: *mut sys::godot_method_bind,
pub get_status: *mut sys::godot_method_bind,
pub disconnect_from_stream: *mut sys::godot_method_bind,
pub set_blocking_handshake_enabled: *mut sys::godot_method_bind,
pub is_blocking_handshake_enabled: *mut sys::godot_method_bind,
}
impl StreamPeerSSLMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: StreamPeerSSLMethodTable = StreamPeerSSLMethodTable {
class_constructor: None,
poll: 0 as *mut sys::godot_method_bind,
accept_stream: 0 as *mut sys::godot_method_bind,
connect_to_stream: 0 as *mut sys::godot_method_bind,
get_status: 0 as *mut sys::godot_method_bind,
disconnect_from_stream: 0 as *mut sys::godot_method_bind,
set_blocking_handshake_enabled: 0 as *mut sys::godot_method_bind,
is_blocking_handshake_enabled: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
StreamPeerSSLMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"StreamPeerSSL\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.poll = (gd_api.godot_method_bind_get_method)(class_name, "poll\0".as_ptr() as *const c_char );
table.accept_stream = (gd_api.godot_method_bind_get_method)(class_name, "accept_stream\0".as_ptr() as *const c_char );
table.connect_to_stream = (gd_api.godot_method_bind_get_method)(class_name, "connect_to_stream\0".as_ptr() as *const c_char );
table.get_status = (gd_api.godot_method_bind_get_method)(class_name, "get_status\0".as_ptr() as *const c_char );
table.disconnect_from_stream = (gd_api.godot_method_bind_get_method)(class_name, "disconnect_from_stream\0".as_ptr() as *const c_char );
table.set_blocking_handshake_enabled = (gd_api.godot_method_bind_get_method)(class_name, "set_blocking_handshake_enabled\0".as_ptr() as *const c_char );
table.is_blocking_handshake_enabled = (gd_api.godot_method_bind_get_method)(class_name, "is_blocking_handshake_enabled\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn StreamPeerSSL_poll(obj_ptr: *mut sys::godot_object) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerSSLMethodTable::get(gd_api).poll;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeerSSL_accept_stream(obj_ptr: *mut sys::godot_object, arg0: Option<StreamPeer>) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerSSLMethodTable::get(gd_api).accept_stream;
let mut argument_buffer : [*const libc::c_void; 1] = [
if let Some(arg) = arg0 { arg.this as *const _ as *const _ } else { ptr::null() },
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn StreamPeerSSL_connect_to_stream(obj_ptr: *mut sys::godot_object, stream: Option<StreamPeer>, validate_certs: bool, for_hostname: GodotString) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerSSLMethodTable::get(gd_api).connect_to_stream;
let mut argument_buffer : [*const libc::c_void; 3] = [
if let Some(arg) = stream { arg.this as *const _ as *const _ } else { ptr::null() },
(&validate_certs) as *const _ as *const _,
for_hostname.sys() as *const _ as *const _,
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn StreamPeerSSL_get_status(obj_ptr: *mut sys::godot_object) -> StreamPeerSSLStatus {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerSSLMethodTable::get(gd_api).get_status;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret: StreamPeerSSLStatus = mem::transmute(0);
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn StreamPeerSSL_disconnect_from_stream(obj_ptr: *mut sys::godot_object) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerSSLMethodTable::get(gd_api).disconnect_from_stream;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeerSSL_set_blocking_handshake_enabled(obj_ptr: *mut sys::godot_object, enabled: bool) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerSSLMethodTable::get(gd_api).set_blocking_handshake_enabled;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&enabled) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn StreamPeerSSL_is_blocking_handshake_enabled(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamPeerSSLMethodTable::get(gd_api).is_blocking_handshake_enabled;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct IPMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub resolve_hostname: *mut sys::godot_method_bind,
pub resolve_hostname_queue_item: *mut sys::godot_method_bind,
pub get_resolve_item_status: *mut sys::godot_method_bind,
pub get_resolve_item_address: *mut sys::godot_method_bind,
pub erase_resolve_item: *mut sys::godot_method_bind,
pub get_local_addresses: *mut sys::godot_method_bind,
pub clear_cache: *mut sys::godot_method_bind,
}
impl IPMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: IPMethodTable = IPMethodTable {
class_constructor: None,
resolve_hostname: 0 as *mut sys::godot_method_bind,
resolve_hostname_queue_item: 0 as *mut sys::godot_method_bind,
get_resolve_item_status: 0 as *mut sys::godot_method_bind,
get_resolve_item_address: 0 as *mut sys::godot_method_bind,
erase_resolve_item: 0 as *mut sys::godot_method_bind,
get_local_addresses: 0 as *mut sys::godot_method_bind,
clear_cache: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
IPMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"IP\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.resolve_hostname = (gd_api.godot_method_bind_get_method)(class_name, "resolve_hostname\0".as_ptr() as *const c_char );
table.resolve_hostname_queue_item = (gd_api.godot_method_bind_get_method)(class_name, "resolve_hostname_queue_item\0".as_ptr() as *const c_char );
table.get_resolve_item_status = (gd_api.godot_method_bind_get_method)(class_name, "get_resolve_item_status\0".as_ptr() as *const c_char );
table.get_resolve_item_address = (gd_api.godot_method_bind_get_method)(class_name, "get_resolve_item_address\0".as_ptr() as *const c_char );
table.erase_resolve_item = (gd_api.godot_method_bind_get_method)(class_name, "erase_resolve_item\0".as_ptr() as *const c_char );
table.get_local_addresses = (gd_api.godot_method_bind_get_method)(class_name, "get_local_addresses\0".as_ptr() as *const c_char );
table.clear_cache = (gd_api.godot_method_bind_get_method)(class_name, "clear_cache\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn IP_resolve_hostname(obj_ptr: *mut sys::godot_object, host: GodotString, ip_type: i64) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = IPMethodTable::get(gd_api).resolve_hostname;
let mut argument_buffer : [*const libc::c_void; 2] = [
host.sys() as *const _ as *const _,
(&ip_type) as *const _ as *const _,
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn IP_resolve_hostname_queue_item(obj_ptr: *mut sys::godot_object, host: GodotString, ip_type: i64) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = IPMethodTable::get(gd_api).resolve_hostname_queue_item;
let mut argument_buffer : [*const libc::c_void; 2] = [
host.sys() as *const _ as *const _,
(&ip_type) as *const _ as *const _,
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn IP_get_resolve_item_status(obj_ptr: *mut sys::godot_object, id: i64) -> IPResolverStatus {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = IPMethodTable::get(gd_api).get_resolve_item_status;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&id) as *const _ as *const _,
];
let mut ret: IPResolverStatus = mem::transmute(0);
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn IP_get_resolve_item_address(obj_ptr: *mut sys::godot_object, id: i64) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = IPMethodTable::get(gd_api).get_resolve_item_address;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&id) as *const _ as *const _,
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn IP_erase_resolve_item(obj_ptr: *mut sys::godot_object, id: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = IPMethodTable::get(gd_api).erase_resolve_item;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&id) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn IP_get_local_addresses(obj_ptr: *mut sys::godot_object) -> VariantArray {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = IPMethodTable::get(gd_api).get_local_addresses;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_array::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
VariantArray::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn IP_clear_cache(obj_ptr: *mut sys::godot_object, hostname: GodotString) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = IPMethodTable::get(gd_api).clear_cache;
let mut argument_buffer : [*const libc::c_void; 1] = [
hostname.sys() as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct PacketPeerUDPMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub listen: *mut sys::godot_method_bind,
pub close: *mut sys::godot_method_bind,
pub wait: *mut sys::godot_method_bind,
pub is_listening: *mut sys::godot_method_bind,
pub get_packet_ip: *mut sys::godot_method_bind,
pub get_packet_port: *mut sys::godot_method_bind,
pub set_dest_address: *mut sys::godot_method_bind,
}
impl PacketPeerUDPMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: PacketPeerUDPMethodTable = PacketPeerUDPMethodTable {
class_constructor: None,
listen: 0 as *mut sys::godot_method_bind,
close: 0 as *mut sys::godot_method_bind,
wait: 0 as *mut sys::godot_method_bind,
is_listening: 0 as *mut sys::godot_method_bind,
get_packet_ip: 0 as *mut sys::godot_method_bind,
get_packet_port: 0 as *mut sys::godot_method_bind,
set_dest_address: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
PacketPeerUDPMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"PacketPeerUDP\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.listen = (gd_api.godot_method_bind_get_method)(class_name, "listen\0".as_ptr() as *const c_char );
table.close = (gd_api.godot_method_bind_get_method)(class_name, "close\0".as_ptr() as *const c_char );
table.wait = (gd_api.godot_method_bind_get_method)(class_name, "wait\0".as_ptr() as *const c_char );
table.is_listening = (gd_api.godot_method_bind_get_method)(class_name, "is_listening\0".as_ptr() as *const c_char );
table.get_packet_ip = (gd_api.godot_method_bind_get_method)(class_name, "get_packet_ip\0".as_ptr() as *const c_char );
table.get_packet_port = (gd_api.godot_method_bind_get_method)(class_name, "get_packet_port\0".as_ptr() as *const c_char );
table.set_dest_address = (gd_api.godot_method_bind_get_method)(class_name, "set_dest_address\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn PacketPeerUDP_listen(obj_ptr: *mut sys::godot_object, port: i64, bind_address: GodotString, recv_buf_size: i64) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = PacketPeerUDPMethodTable::get(gd_api).listen;
let mut argument_buffer : [*const libc::c_void; 3] = [
(&port) as *const _ as *const _,
bind_address.sys() as *const _ as *const _,
(&recv_buf_size) as *const _ as *const _,
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn PacketPeerUDP_close(obj_ptr: *mut sys::godot_object) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = PacketPeerUDPMethodTable::get(gd_api).close;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn PacketPeerUDP_wait(obj_ptr: *mut sys::godot_object) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = PacketPeerUDPMethodTable::get(gd_api).wait;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn PacketPeerUDP_is_listening(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = PacketPeerUDPMethodTable::get(gd_api).is_listening;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn PacketPeerUDP_get_packet_ip(obj_ptr: *mut sys::godot_object) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = PacketPeerUDPMethodTable::get(gd_api).get_packet_ip;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn PacketPeerUDP_get_packet_port(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = PacketPeerUDPMethodTable::get(gd_api).get_packet_port;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn PacketPeerUDP_set_dest_address(obj_ptr: *mut sys::godot_object, host: GodotString, port: i64) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = PacketPeerUDPMethodTable::get(gd_api).set_dest_address;
let mut argument_buffer : [*const libc::c_void; 2] = [
host.sys() as *const _ as *const _,
(&port) as *const _ as *const _,
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct HTTPClientMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub connect_to_host: *mut sys::godot_method_bind,
pub set_connection: *mut sys::godot_method_bind,
pub get_connection: *mut sys::godot_method_bind,
pub request_raw: *mut sys::godot_method_bind,
pub request: *mut sys::godot_method_bind,
pub close: *mut sys::godot_method_bind,
pub has_response: *mut sys::godot_method_bind,
pub is_response_chunked: *mut sys::godot_method_bind,
pub get_response_code: *mut sys::godot_method_bind,
pub get_response_headers: *mut sys::godot_method_bind,
pub get_response_headers_as_dictionary: *mut sys::godot_method_bind,
pub get_response_body_length: *mut sys::godot_method_bind,
pub read_response_body_chunk: *mut sys::godot_method_bind,
pub set_read_chunk_size: *mut sys::godot_method_bind,
pub set_blocking_mode: *mut sys::godot_method_bind,
pub is_blocking_mode_enabled: *mut sys::godot_method_bind,
pub get_status: *mut sys::godot_method_bind,
pub poll: *mut sys::godot_method_bind,
pub query_string_from_dict: *mut sys::godot_method_bind,
}
impl HTTPClientMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: HTTPClientMethodTable = HTTPClientMethodTable {
class_constructor: None,
connect_to_host: 0 as *mut sys::godot_method_bind,
set_connection: 0 as *mut sys::godot_method_bind,
get_connection: 0 as *mut sys::godot_method_bind,
request_raw: 0 as *mut sys::godot_method_bind,
request: 0 as *mut sys::godot_method_bind,
close: 0 as *mut sys::godot_method_bind,
has_response: 0 as *mut sys::godot_method_bind,
is_response_chunked: 0 as *mut sys::godot_method_bind,
get_response_code: 0 as *mut sys::godot_method_bind,
get_response_headers: 0 as *mut sys::godot_method_bind,
get_response_headers_as_dictionary: 0 as *mut sys::godot_method_bind,
get_response_body_length: 0 as *mut sys::godot_method_bind,
read_response_body_chunk: 0 as *mut sys::godot_method_bind,
set_read_chunk_size: 0 as *mut sys::godot_method_bind,
set_blocking_mode: 0 as *mut sys::godot_method_bind,
is_blocking_mode_enabled: 0 as *mut sys::godot_method_bind,
get_status: 0 as *mut sys::godot_method_bind,
poll: 0 as *mut sys::godot_method_bind,
query_string_from_dict: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
HTTPClientMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"HTTPClient\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.connect_to_host = (gd_api.godot_method_bind_get_method)(class_name, "connect_to_host\0".as_ptr() as *const c_char );
table.set_connection = (gd_api.godot_method_bind_get_method)(class_name, "set_connection\0".as_ptr() as *const c_char );
table.get_connection = (gd_api.godot_method_bind_get_method)(class_name, "get_connection\0".as_ptr() as *const c_char );
table.request_raw = (gd_api.godot_method_bind_get_method)(class_name, "request_raw\0".as_ptr() as *const c_char );
table.request = (gd_api.godot_method_bind_get_method)(class_name, "request\0".as_ptr() as *const c_char );
table.close = (gd_api.godot_method_bind_get_method)(class_name, "close\0".as_ptr() as *const c_char );
table.has_response = (gd_api.godot_method_bind_get_method)(class_name, "has_response\0".as_ptr() as *const c_char );
table.is_response_chunked = (gd_api.godot_method_bind_get_method)(class_name, "is_response_chunked\0".as_ptr() as *const c_char );
table.get_response_code = (gd_api.godot_method_bind_get_method)(class_name, "get_response_code\0".as_ptr() as *const c_char );
table.get_response_headers = (gd_api.godot_method_bind_get_method)(class_name, "get_response_headers\0".as_ptr() as *const c_char );
table.get_response_headers_as_dictionary = (gd_api.godot_method_bind_get_method)(class_name, "get_response_headers_as_dictionary\0".as_ptr() as *const c_char );
table.get_response_body_length = (gd_api.godot_method_bind_get_method)(class_name, "get_response_body_length\0".as_ptr() as *const c_char );
table.read_response_body_chunk = (gd_api.godot_method_bind_get_method)(class_name, "read_response_body_chunk\0".as_ptr() as *const c_char );
table.set_read_chunk_size = (gd_api.godot_method_bind_get_method)(class_name, "set_read_chunk_size\0".as_ptr() as *const c_char );
table.set_blocking_mode = (gd_api.godot_method_bind_get_method)(class_name, "set_blocking_mode\0".as_ptr() as *const c_char );
table.is_blocking_mode_enabled = (gd_api.godot_method_bind_get_method)(class_name, "is_blocking_mode_enabled\0".as_ptr() as *const c_char );
table.get_status = (gd_api.godot_method_bind_get_method)(class_name, "get_status\0".as_ptr() as *const c_char );
table.poll = (gd_api.godot_method_bind_get_method)(class_name, "poll\0".as_ptr() as *const c_char );
table.query_string_from_dict = (gd_api.godot_method_bind_get_method)(class_name, "query_string_from_dict\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn HTTPClient_connect_to_host(obj_ptr: *mut sys::godot_object, host: GodotString, port: i64, use_ssl: bool, verify_host: bool) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).connect_to_host;
let mut argument_buffer : [*const libc::c_void; 4] = [
host.sys() as *const _ as *const _,
(&port) as *const _ as *const _,
(&use_ssl) as *const _ as *const _,
(&verify_host) as *const _ as *const _,
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn HTTPClient_set_connection(obj_ptr: *mut sys::godot_object, connection: Option<StreamPeer>) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).set_connection;
let mut argument_buffer : [*const libc::c_void; 1] = [
if let Some(arg) = connection { arg.this as *const _ as *const _ } else { ptr::null() },
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn HTTPClient_get_connection(obj_ptr: *mut sys::godot_object) -> Option<StreamPeer> {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).get_connection;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret: *mut sys::godot_object = ptr::null_mut();
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
if ret.is_null() {
None
} else {
Some(StreamPeer::from_sys(ret))
}
}
#[doc(hidden)]
pub unsafe fn HTTPClient_request_raw(obj_ptr: *mut sys::godot_object, method: i64, url: GodotString, headers: StringArray, body: ByteArray) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).request_raw;
let mut argument_buffer : [*const libc::c_void; 4] = [
(&method) as *const _ as *const _,
url.sys() as *const _ as *const _,
headers.sys() as *const _ as *const _,
body.sys() as *const _ as *const _,
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn HTTPClient_request(obj_ptr: *mut sys::godot_object, method: i64, url: GodotString, headers: StringArray, body: GodotString) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).request;
let mut argument_buffer : [*const libc::c_void; 4] = [
(&method) as *const _ as *const _,
url.sys() as *const _ as *const _,
headers.sys() as *const _ as *const _,
body.sys() as *const _ as *const _,
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn HTTPClient_close(obj_ptr: *mut sys::godot_object) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).close;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn HTTPClient_has_response(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).has_response;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn HTTPClient_is_response_chunked(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).is_response_chunked;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn HTTPClient_get_response_code(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).get_response_code;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn HTTPClient_get_response_headers(obj_ptr: *mut sys::godot_object) -> StringArray {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).get_response_headers;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_pool_string_array::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
StringArray::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn HTTPClient_get_response_headers_as_dictionary(obj_ptr: *mut sys::godot_object) -> Dictionary {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).get_response_headers_as_dictionary;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_dictionary::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
Dictionary::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn HTTPClient_get_response_body_length(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).get_response_body_length;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn HTTPClient_read_response_body_chunk(obj_ptr: *mut sys::godot_object) -> ByteArray {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).read_response_body_chunk;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_pool_byte_array::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ByteArray::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn HTTPClient_set_read_chunk_size(obj_ptr: *mut sys::godot_object, bytes: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).set_read_chunk_size;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&bytes) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn HTTPClient_set_blocking_mode(obj_ptr: *mut sys::godot_object, enabled: bool) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).set_blocking_mode;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&enabled) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn HTTPClient_is_blocking_mode_enabled(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).is_blocking_mode_enabled;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn HTTPClient_get_status(obj_ptr: *mut sys::godot_object) -> HTTPClientStatus {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).get_status;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret: HTTPClientStatus = mem::transmute(0);
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn HTTPClient_poll(obj_ptr: *mut sys::godot_object) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).poll;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn HTTPClient_query_string_from_dict(obj_ptr: *mut sys::godot_object, fields: Dictionary) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPClientMethodTable::get(gd_api).query_string_from_dict;
let mut argument_buffer : [*const libc::c_void; 1] = [
fields.sys() as *const _ as *const _,
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct IP_UnixMethodTable {
pub class_constructor: sys::godot_class_constructor,
}
impl IP_UnixMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: IP_UnixMethodTable = IP_UnixMethodTable {
class_constructor: None,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
IP_UnixMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"IP_Unix\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
}
}
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct HTTPRequestMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub request: *mut sys::godot_method_bind,
pub cancel_request: *mut sys::godot_method_bind,
pub get_http_client_status: *mut sys::godot_method_bind,
pub set_use_threads: *mut sys::godot_method_bind,
pub is_using_threads: *mut sys::godot_method_bind,
pub set_body_size_limit: *mut sys::godot_method_bind,
pub get_body_size_limit: *mut sys::godot_method_bind,
pub set_max_redirects: *mut sys::godot_method_bind,
pub get_max_redirects: *mut sys::godot_method_bind,
pub set_download_file: *mut sys::godot_method_bind,
pub get_download_file: *mut sys::godot_method_bind,
pub get_downloaded_bytes: *mut sys::godot_method_bind,
pub get_body_size: *mut sys::godot_method_bind,
pub _redirect_request: *mut sys::godot_method_bind,
pub _request_done: *mut sys::godot_method_bind,
}
impl HTTPRequestMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: HTTPRequestMethodTable = HTTPRequestMethodTable {
class_constructor: None,
request: 0 as *mut sys::godot_method_bind,
cancel_request: 0 as *mut sys::godot_method_bind,
get_http_client_status: 0 as *mut sys::godot_method_bind,
set_use_threads: 0 as *mut sys::godot_method_bind,
is_using_threads: 0 as *mut sys::godot_method_bind,
set_body_size_limit: 0 as *mut sys::godot_method_bind,
get_body_size_limit: 0 as *mut sys::godot_method_bind,
set_max_redirects: 0 as *mut sys::godot_method_bind,
get_max_redirects: 0 as *mut sys::godot_method_bind,
set_download_file: 0 as *mut sys::godot_method_bind,
get_download_file: 0 as *mut sys::godot_method_bind,
get_downloaded_bytes: 0 as *mut sys::godot_method_bind,
get_body_size: 0 as *mut sys::godot_method_bind,
_redirect_request: 0 as *mut sys::godot_method_bind,
_request_done: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
HTTPRequestMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"HTTPRequest\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.request = (gd_api.godot_method_bind_get_method)(class_name, "request\0".as_ptr() as *const c_char );
table.cancel_request = (gd_api.godot_method_bind_get_method)(class_name, "cancel_request\0".as_ptr() as *const c_char );
table.get_http_client_status = (gd_api.godot_method_bind_get_method)(class_name, "get_http_client_status\0".as_ptr() as *const c_char );
table.set_use_threads = (gd_api.godot_method_bind_get_method)(class_name, "set_use_threads\0".as_ptr() as *const c_char );
table.is_using_threads = (gd_api.godot_method_bind_get_method)(class_name, "is_using_threads\0".as_ptr() as *const c_char );
table.set_body_size_limit = (gd_api.godot_method_bind_get_method)(class_name, "set_body_size_limit\0".as_ptr() as *const c_char );
table.get_body_size_limit = (gd_api.godot_method_bind_get_method)(class_name, "get_body_size_limit\0".as_ptr() as *const c_char );
table.set_max_redirects = (gd_api.godot_method_bind_get_method)(class_name, "set_max_redirects\0".as_ptr() as *const c_char );
table.get_max_redirects = (gd_api.godot_method_bind_get_method)(class_name, "get_max_redirects\0".as_ptr() as *const c_char );
table.set_download_file = (gd_api.godot_method_bind_get_method)(class_name, "set_download_file\0".as_ptr() as *const c_char );
table.get_download_file = (gd_api.godot_method_bind_get_method)(class_name, "get_download_file\0".as_ptr() as *const c_char );
table.get_downloaded_bytes = (gd_api.godot_method_bind_get_method)(class_name, "get_downloaded_bytes\0".as_ptr() as *const c_char );
table.get_body_size = (gd_api.godot_method_bind_get_method)(class_name, "get_body_size\0".as_ptr() as *const c_char );
table._redirect_request = (gd_api.godot_method_bind_get_method)(class_name, "_redirect_request\0".as_ptr() as *const c_char );
table._request_done = (gd_api.godot_method_bind_get_method)(class_name, "_request_done\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn HTTPRequest_request(obj_ptr: *mut sys::godot_object, url: GodotString, custom_headers: StringArray, ssl_validate_domain: bool, method: i64, request_data: GodotString) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPRequestMethodTable::get(gd_api).request;
let mut argument_buffer : [*const libc::c_void; 5] = [
url.sys() as *const _ as *const _,
custom_headers.sys() as *const _ as *const _,
(&ssl_validate_domain) as *const _ as *const _,
(&method) as *const _ as *const _,
request_data.sys() as *const _ as *const _,
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn HTTPRequest_cancel_request(obj_ptr: *mut sys::godot_object) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPRequestMethodTable::get(gd_api).cancel_request;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn HTTPRequest_get_http_client_status(obj_ptr: *mut sys::godot_object) -> HTTPClientStatus {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPRequestMethodTable::get(gd_api).get_http_client_status;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret: HTTPClientStatus = mem::transmute(0);
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn HTTPRequest_set_use_threads(obj_ptr: *mut sys::godot_object, enable: bool) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPRequestMethodTable::get(gd_api).set_use_threads;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&enable) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn HTTPRequest_is_using_threads(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPRequestMethodTable::get(gd_api).is_using_threads;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn HTTPRequest_set_body_size_limit(obj_ptr: *mut sys::godot_object, bytes: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPRequestMethodTable::get(gd_api).set_body_size_limit;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&bytes) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn HTTPRequest_get_body_size_limit(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPRequestMethodTable::get(gd_api).get_body_size_limit;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn HTTPRequest_set_max_redirects(obj_ptr: *mut sys::godot_object, amount: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPRequestMethodTable::get(gd_api).set_max_redirects;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&amount) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn HTTPRequest_get_max_redirects(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPRequestMethodTable::get(gd_api).get_max_redirects;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn HTTPRequest_set_download_file(obj_ptr: *mut sys::godot_object, path: GodotString) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPRequestMethodTable::get(gd_api).set_download_file;
let mut argument_buffer : [*const libc::c_void; 1] = [
path.sys() as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn HTTPRequest_get_download_file(obj_ptr: *mut sys::godot_object) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPRequestMethodTable::get(gd_api).get_download_file;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn HTTPRequest_get_downloaded_bytes(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPRequestMethodTable::get(gd_api).get_downloaded_bytes;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn HTTPRequest_get_body_size(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPRequestMethodTable::get(gd_api).get_body_size;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn HTTPRequest__redirect_request(obj_ptr: *mut sys::godot_object, arg0: GodotString) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPRequestMethodTable::get(gd_api)._redirect_request;
let mut argument_buffer : [*const libc::c_void; 1] = [
arg0.sys() as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn HTTPRequest__request_done(obj_ptr: *mut sys::godot_object, arg0: i64, arg1: i64, arg2: StringArray, arg3: ByteArray) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = HTTPRequestMethodTable::get(gd_api)._request_done;
let mut argument_buffer : [*const libc::c_void; 4] = [
(&arg0) as *const _ as *const _,
(&arg1) as *const _ as *const _,
arg2.sys() as *const _ as *const _,
arg3.sys() as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct StreamTextureMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub load: *mut sys::godot_method_bind,
pub get_load_path: *mut sys::godot_method_bind,
}
impl StreamTextureMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: StreamTextureMethodTable = StreamTextureMethodTable {
class_constructor: None,
load: 0 as *mut sys::godot_method_bind,
get_load_path: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
StreamTextureMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"StreamTexture\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.load = (gd_api.godot_method_bind_get_method)(class_name, "load\0".as_ptr() as *const c_char );
table.get_load_path = (gd_api.godot_method_bind_get_method)(class_name, "get_load_path\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn StreamTexture_load(obj_ptr: *mut sys::godot_object, path: GodotString) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamTextureMethodTable::get(gd_api).load;
let mut argument_buffer : [*const libc::c_void; 1] = [
path.sys() as *const _ as *const _,
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn StreamTexture_get_load_path(obj_ptr: *mut sys::godot_object) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = StreamTextureMethodTable::get(gd_api).get_load_path;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct NetworkedMultiplayerENetMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub create_server: *mut sys::godot_method_bind,
pub create_client: *mut sys::godot_method_bind,
pub close_connection: *mut sys::godot_method_bind,
pub disconnect_peer: *mut sys::godot_method_bind,
pub set_compression_mode: *mut sys::godot_method_bind,
pub get_compression_mode: *mut sys::godot_method_bind,
pub set_bind_ip: *mut sys::godot_method_bind,
pub get_peer_address: *mut sys::godot_method_bind,
pub get_peer_port: *mut sys::godot_method_bind,
pub get_packet_channel: *mut sys::godot_method_bind,
pub get_last_packet_channel: *mut sys::godot_method_bind,
pub set_transfer_channel: *mut sys::godot_method_bind,
pub get_transfer_channel: *mut sys::godot_method_bind,
pub set_channel_count: *mut sys::godot_method_bind,
pub get_channel_count: *mut sys::godot_method_bind,
pub set_always_ordered: *mut sys::godot_method_bind,
pub is_always_ordered: *mut sys::godot_method_bind,
}
impl NetworkedMultiplayerENetMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: NetworkedMultiplayerENetMethodTable = NetworkedMultiplayerENetMethodTable {
class_constructor: None,
create_server: 0 as *mut sys::godot_method_bind,
create_client: 0 as *mut sys::godot_method_bind,
close_connection: 0 as *mut sys::godot_method_bind,
disconnect_peer: 0 as *mut sys::godot_method_bind,
set_compression_mode: 0 as *mut sys::godot_method_bind,
get_compression_mode: 0 as *mut sys::godot_method_bind,
set_bind_ip: 0 as *mut sys::godot_method_bind,
get_peer_address: 0 as *mut sys::godot_method_bind,
get_peer_port: 0 as *mut sys::godot_method_bind,
get_packet_channel: 0 as *mut sys::godot_method_bind,
get_last_packet_channel: 0 as *mut sys::godot_method_bind,
set_transfer_channel: 0 as *mut sys::godot_method_bind,
get_transfer_channel: 0 as *mut sys::godot_method_bind,
set_channel_count: 0 as *mut sys::godot_method_bind,
get_channel_count: 0 as *mut sys::godot_method_bind,
set_always_ordered: 0 as *mut sys::godot_method_bind,
is_always_ordered: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
NetworkedMultiplayerENetMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"NetworkedMultiplayerENet\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.create_server = (gd_api.godot_method_bind_get_method)(class_name, "create_server\0".as_ptr() as *const c_char );
table.create_client = (gd_api.godot_method_bind_get_method)(class_name, "create_client\0".as_ptr() as *const c_char );
table.close_connection = (gd_api.godot_method_bind_get_method)(class_name, "close_connection\0".as_ptr() as *const c_char );
table.disconnect_peer = (gd_api.godot_method_bind_get_method)(class_name, "disconnect_peer\0".as_ptr() as *const c_char );
table.set_compression_mode = (gd_api.godot_method_bind_get_method)(class_name, "set_compression_mode\0".as_ptr() as *const c_char );
table.get_compression_mode = (gd_api.godot_method_bind_get_method)(class_name, "get_compression_mode\0".as_ptr() as *const c_char );
table.set_bind_ip = (gd_api.godot_method_bind_get_method)(class_name, "set_bind_ip\0".as_ptr() as *const c_char );
table.get_peer_address = (gd_api.godot_method_bind_get_method)(class_name, "get_peer_address\0".as_ptr() as *const c_char );
table.get_peer_port = (gd_api.godot_method_bind_get_method)(class_name, "get_peer_port\0".as_ptr() as *const c_char );
table.get_packet_channel = (gd_api.godot_method_bind_get_method)(class_name, "get_packet_channel\0".as_ptr() as *const c_char );
table.get_last_packet_channel = (gd_api.godot_method_bind_get_method)(class_name, "get_last_packet_channel\0".as_ptr() as *const c_char );
table.set_transfer_channel = (gd_api.godot_method_bind_get_method)(class_name, "set_transfer_channel\0".as_ptr() as *const c_char );
table.get_transfer_channel = (gd_api.godot_method_bind_get_method)(class_name, "get_transfer_channel\0".as_ptr() as *const c_char );
table.set_channel_count = (gd_api.godot_method_bind_get_method)(class_name, "set_channel_count\0".as_ptr() as *const c_char );
table.get_channel_count = (gd_api.godot_method_bind_get_method)(class_name, "get_channel_count\0".as_ptr() as *const c_char );
table.set_always_ordered = (gd_api.godot_method_bind_get_method)(class_name, "set_always_ordered\0".as_ptr() as *const c_char );
table.is_always_ordered = (gd_api.godot_method_bind_get_method)(class_name, "is_always_ordered\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_create_server(obj_ptr: *mut sys::godot_object, port: i64, max_clients: i64, in_bandwidth: i64, out_bandwidth: i64) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).create_server;
let mut argument_buffer : [*const libc::c_void; 4] = [
(&port) as *const _ as *const _,
(&max_clients) as *const _ as *const _,
(&in_bandwidth) as *const _ as *const _,
(&out_bandwidth) as *const _ as *const _,
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_create_client(obj_ptr: *mut sys::godot_object, address: GodotString, port: i64, in_bandwidth: i64, out_bandwidth: i64, client_port: i64) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).create_client;
let mut argument_buffer : [*const libc::c_void; 5] = [
address.sys() as *const _ as *const _,
(&port) as *const _ as *const _,
(&in_bandwidth) as *const _ as *const _,
(&out_bandwidth) as *const _ as *const _,
(&client_port) as *const _ as *const _,
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_close_connection(obj_ptr: *mut sys::godot_object, wait_usec: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).close_connection;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&wait_usec) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_disconnect_peer(obj_ptr: *mut sys::godot_object, id: i64, now: bool) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).disconnect_peer;
let mut argument_buffer : [*const libc::c_void; 2] = [
(&id) as *const _ as *const _,
(&now) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_set_compression_mode(obj_ptr: *mut sys::godot_object, mode: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).set_compression_mode;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&mode) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_get_compression_mode(obj_ptr: *mut sys::godot_object) -> NetworkedMultiplayerENetCompressionMode {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).get_compression_mode;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret: NetworkedMultiplayerENetCompressionMode = mem::transmute(0);
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_set_bind_ip(obj_ptr: *mut sys::godot_object, ip: GodotString) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).set_bind_ip;
let mut argument_buffer : [*const libc::c_void; 1] = [
ip.sys() as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_get_peer_address(obj_ptr: *mut sys::godot_object, id: i64) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).get_peer_address;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&id) as *const _ as *const _,
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_get_peer_port(obj_ptr: *mut sys::godot_object, id: i64) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).get_peer_port;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&id) as *const _ as *const _,
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_get_packet_channel(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).get_packet_channel;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_get_last_packet_channel(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).get_last_packet_channel;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_set_transfer_channel(obj_ptr: *mut sys::godot_object, channel: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).set_transfer_channel;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&channel) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_get_transfer_channel(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).get_transfer_channel;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_set_channel_count(obj_ptr: *mut sys::godot_object, channels: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).set_channel_count;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&channels) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_get_channel_count(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).get_channel_count;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_set_always_ordered(obj_ptr: *mut sys::godot_object, ordered: bool) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).set_always_ordered;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&ordered) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn NetworkedMultiplayerENet_is_always_ordered(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = NetworkedMultiplayerENetMethodTable::get(gd_api).is_always_ordered;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct StreamPeerGDNativeMethodTable {
pub class_constructor: sys::godot_class_constructor,
}
impl StreamPeerGDNativeMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: StreamPeerGDNativeMethodTable = StreamPeerGDNativeMethodTable {
class_constructor: None,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
StreamPeerGDNativeMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"StreamPeerGDNative\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
}
}
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct PacketPeerGDNativeMethodTable {
pub class_constructor: sys::godot_class_constructor,
}
impl PacketPeerGDNativeMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: PacketPeerGDNativeMethodTable = PacketPeerGDNativeMethodTable {
class_constructor: None,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
PacketPeerGDNativeMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"PacketPeerGDNative\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
}
}
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct MultiplayerPeerGDNativeMethodTable {
pub class_constructor: sys::godot_class_constructor,
}
impl MultiplayerPeerGDNativeMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: MultiplayerPeerGDNativeMethodTable = MultiplayerPeerGDNativeMethodTable {
class_constructor: None,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
MultiplayerPeerGDNativeMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"MultiplayerPeerGDNative\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
}
}
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct UPNPMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub get_device_count: *mut sys::godot_method_bind,
pub get_device: *mut sys::godot_method_bind,
pub add_device: *mut sys::godot_method_bind,
pub set_device: *mut sys::godot_method_bind,
pub remove_device: *mut sys::godot_method_bind,
pub clear_devices: *mut sys::godot_method_bind,
pub get_gateway: *mut sys::godot_method_bind,
pub discover: *mut sys::godot_method_bind,
pub query_external_address: *mut sys::godot_method_bind,
pub add_port_mapping: *mut sys::godot_method_bind,
pub delete_port_mapping: *mut sys::godot_method_bind,
pub set_discover_multicast_if: *mut sys::godot_method_bind,
pub get_discover_multicast_if: *mut sys::godot_method_bind,
pub set_discover_local_port: *mut sys::godot_method_bind,
pub get_discover_local_port: *mut sys::godot_method_bind,
pub set_discover_ipv6: *mut sys::godot_method_bind,
pub is_discover_ipv6: *mut sys::godot_method_bind,
}
impl UPNPMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: UPNPMethodTable = UPNPMethodTable {
class_constructor: None,
get_device_count: 0 as *mut sys::godot_method_bind,
get_device: 0 as *mut sys::godot_method_bind,
add_device: 0 as *mut sys::godot_method_bind,
set_device: 0 as *mut sys::godot_method_bind,
remove_device: 0 as *mut sys::godot_method_bind,
clear_devices: 0 as *mut sys::godot_method_bind,
get_gateway: 0 as *mut sys::godot_method_bind,
discover: 0 as *mut sys::godot_method_bind,
query_external_address: 0 as *mut sys::godot_method_bind,
add_port_mapping: 0 as *mut sys::godot_method_bind,
delete_port_mapping: 0 as *mut sys::godot_method_bind,
set_discover_multicast_if: 0 as *mut sys::godot_method_bind,
get_discover_multicast_if: 0 as *mut sys::godot_method_bind,
set_discover_local_port: 0 as *mut sys::godot_method_bind,
get_discover_local_port: 0 as *mut sys::godot_method_bind,
set_discover_ipv6: 0 as *mut sys::godot_method_bind,
is_discover_ipv6: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
UPNPMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"UPNP\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.get_device_count = (gd_api.godot_method_bind_get_method)(class_name, "get_device_count\0".as_ptr() as *const c_char );
table.get_device = (gd_api.godot_method_bind_get_method)(class_name, "get_device\0".as_ptr() as *const c_char );
table.add_device = (gd_api.godot_method_bind_get_method)(class_name, "add_device\0".as_ptr() as *const c_char );
table.set_device = (gd_api.godot_method_bind_get_method)(class_name, "set_device\0".as_ptr() as *const c_char );
table.remove_device = (gd_api.godot_method_bind_get_method)(class_name, "remove_device\0".as_ptr() as *const c_char );
table.clear_devices = (gd_api.godot_method_bind_get_method)(class_name, "clear_devices\0".as_ptr() as *const c_char );
table.get_gateway = (gd_api.godot_method_bind_get_method)(class_name, "get_gateway\0".as_ptr() as *const c_char );
table.discover = (gd_api.godot_method_bind_get_method)(class_name, "discover\0".as_ptr() as *const c_char );
table.query_external_address = (gd_api.godot_method_bind_get_method)(class_name, "query_external_address\0".as_ptr() as *const c_char );
table.add_port_mapping = (gd_api.godot_method_bind_get_method)(class_name, "add_port_mapping\0".as_ptr() as *const c_char );
table.delete_port_mapping = (gd_api.godot_method_bind_get_method)(class_name, "delete_port_mapping\0".as_ptr() as *const c_char );
table.set_discover_multicast_if = (gd_api.godot_method_bind_get_method)(class_name, "set_discover_multicast_if\0".as_ptr() as *const c_char );
table.get_discover_multicast_if = (gd_api.godot_method_bind_get_method)(class_name, "get_discover_multicast_if\0".as_ptr() as *const c_char );
table.set_discover_local_port = (gd_api.godot_method_bind_get_method)(class_name, "set_discover_local_port\0".as_ptr() as *const c_char );
table.get_discover_local_port = (gd_api.godot_method_bind_get_method)(class_name, "get_discover_local_port\0".as_ptr() as *const c_char );
table.set_discover_ipv6 = (gd_api.godot_method_bind_get_method)(class_name, "set_discover_ipv6\0".as_ptr() as *const c_char );
table.is_discover_ipv6 = (gd_api.godot_method_bind_get_method)(class_name, "is_discover_ipv6\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn UPNP_get_device_count(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).get_device_count;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn UPNP_get_device(obj_ptr: *mut sys::godot_object, index: i64) -> Option<UPNPDevice> {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).get_device;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&index) as *const _ as *const _,
];
let mut ret: *mut sys::godot_object = ptr::null_mut();
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
if ret.is_null() {
None
} else {
Some(UPNPDevice::from_sys(ret))
}
}
#[doc(hidden)]
pub unsafe fn UPNP_add_device(obj_ptr: *mut sys::godot_object, device: Option<UPNPDevice>) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).add_device;
let mut argument_buffer : [*const libc::c_void; 1] = [
if let Some(arg) = device { arg.this as *const _ as *const _ } else { ptr::null() },
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn UPNP_set_device(obj_ptr: *mut sys::godot_object, index: i64, device: Option<UPNPDevice>) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).set_device;
let mut argument_buffer : [*const libc::c_void; 2] = [
(&index) as *const _ as *const _,
if let Some(arg) = device { arg.this as *const _ as *const _ } else { ptr::null() },
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn UPNP_remove_device(obj_ptr: *mut sys::godot_object, index: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).remove_device;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&index) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn UPNP_clear_devices(obj_ptr: *mut sys::godot_object) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).clear_devices;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn UPNP_get_gateway(obj_ptr: *mut sys::godot_object) -> Option<UPNPDevice> {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).get_gateway;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret: *mut sys::godot_object = ptr::null_mut();
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
if ret.is_null() {
None
} else {
Some(UPNPDevice::from_sys(ret))
}
}
#[doc(hidden)]
pub unsafe fn UPNP_discover(obj_ptr: *mut sys::godot_object, timeout: i64, ttl: i64, device_filter: GodotString) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).discover;
let mut argument_buffer : [*const libc::c_void; 3] = [
(&timeout) as *const _ as *const _,
(&ttl) as *const _ as *const _,
device_filter.sys() as *const _ as *const _,
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn UPNP_query_external_address(obj_ptr: *mut sys::godot_object) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).query_external_address;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn UPNP_add_port_mapping(obj_ptr: *mut sys::godot_object, port: i64, port_internal: i64, desc: GodotString, proto: GodotString, duration: i64) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).add_port_mapping;
let mut argument_buffer : [*const libc::c_void; 5] = [
(&port) as *const _ as *const _,
(&port_internal) as *const _ as *const _,
desc.sys() as *const _ as *const _,
proto.sys() as *const _ as *const _,
(&duration) as *const _ as *const _,
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn UPNP_delete_port_mapping(obj_ptr: *mut sys::godot_object, port: i64, proto: GodotString) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).delete_port_mapping;
let mut argument_buffer : [*const libc::c_void; 2] = [
(&port) as *const _ as *const _,
proto.sys() as *const _ as *const _,
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn UPNP_set_discover_multicast_if(obj_ptr: *mut sys::godot_object, m_if: GodotString) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).set_discover_multicast_if;
let mut argument_buffer : [*const libc::c_void; 1] = [
m_if.sys() as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn UPNP_get_discover_multicast_if(obj_ptr: *mut sys::godot_object) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).get_discover_multicast_if;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn UPNP_set_discover_local_port(obj_ptr: *mut sys::godot_object, port: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).set_discover_local_port;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&port) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn UPNP_get_discover_local_port(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).get_discover_local_port;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn UPNP_set_discover_ipv6(obj_ptr: *mut sys::godot_object, ipv6: bool) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).set_discover_ipv6;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&ipv6) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn UPNP_is_discover_ipv6(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPMethodTable::get(gd_api).is_discover_ipv6;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct UPNPDeviceMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub is_valid_gateway: *mut sys::godot_method_bind,
pub query_external_address: *mut sys::godot_method_bind,
pub add_port_mapping: *mut sys::godot_method_bind,
pub delete_port_mapping: *mut sys::godot_method_bind,
pub set_description_url: *mut sys::godot_method_bind,
pub get_description_url: *mut sys::godot_method_bind,
pub set_service_type: *mut sys::godot_method_bind,
pub get_service_type: *mut sys::godot_method_bind,
pub set_igd_control_url: *mut sys::godot_method_bind,
pub get_igd_control_url: *mut sys::godot_method_bind,
pub set_igd_service_type: *mut sys::godot_method_bind,
pub get_igd_service_type: *mut sys::godot_method_bind,
pub set_igd_our_addr: *mut sys::godot_method_bind,
pub get_igd_our_addr: *mut sys::godot_method_bind,
pub set_igd_status: *mut sys::godot_method_bind,
pub get_igd_status: *mut sys::godot_method_bind,
}
impl UPNPDeviceMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: UPNPDeviceMethodTable = UPNPDeviceMethodTable {
class_constructor: None,
is_valid_gateway: 0 as *mut sys::godot_method_bind,
query_external_address: 0 as *mut sys::godot_method_bind,
add_port_mapping: 0 as *mut sys::godot_method_bind,
delete_port_mapping: 0 as *mut sys::godot_method_bind,
set_description_url: 0 as *mut sys::godot_method_bind,
get_description_url: 0 as *mut sys::godot_method_bind,
set_service_type: 0 as *mut sys::godot_method_bind,
get_service_type: 0 as *mut sys::godot_method_bind,
set_igd_control_url: 0 as *mut sys::godot_method_bind,
get_igd_control_url: 0 as *mut sys::godot_method_bind,
set_igd_service_type: 0 as *mut sys::godot_method_bind,
get_igd_service_type: 0 as *mut sys::godot_method_bind,
set_igd_our_addr: 0 as *mut sys::godot_method_bind,
get_igd_our_addr: 0 as *mut sys::godot_method_bind,
set_igd_status: 0 as *mut sys::godot_method_bind,
get_igd_status: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
UPNPDeviceMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"UPNPDevice\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.is_valid_gateway = (gd_api.godot_method_bind_get_method)(class_name, "is_valid_gateway\0".as_ptr() as *const c_char );
table.query_external_address = (gd_api.godot_method_bind_get_method)(class_name, "query_external_address\0".as_ptr() as *const c_char );
table.add_port_mapping = (gd_api.godot_method_bind_get_method)(class_name, "add_port_mapping\0".as_ptr() as *const c_char );
table.delete_port_mapping = (gd_api.godot_method_bind_get_method)(class_name, "delete_port_mapping\0".as_ptr() as *const c_char );
table.set_description_url = (gd_api.godot_method_bind_get_method)(class_name, "set_description_url\0".as_ptr() as *const c_char );
table.get_description_url = (gd_api.godot_method_bind_get_method)(class_name, "get_description_url\0".as_ptr() as *const c_char );
table.set_service_type = (gd_api.godot_method_bind_get_method)(class_name, "set_service_type\0".as_ptr() as *const c_char );
table.get_service_type = (gd_api.godot_method_bind_get_method)(class_name, "get_service_type\0".as_ptr() as *const c_char );
table.set_igd_control_url = (gd_api.godot_method_bind_get_method)(class_name, "set_igd_control_url\0".as_ptr() as *const c_char );
table.get_igd_control_url = (gd_api.godot_method_bind_get_method)(class_name, "get_igd_control_url\0".as_ptr() as *const c_char );
table.set_igd_service_type = (gd_api.godot_method_bind_get_method)(class_name, "set_igd_service_type\0".as_ptr() as *const c_char );
table.get_igd_service_type = (gd_api.godot_method_bind_get_method)(class_name, "get_igd_service_type\0".as_ptr() as *const c_char );
table.set_igd_our_addr = (gd_api.godot_method_bind_get_method)(class_name, "set_igd_our_addr\0".as_ptr() as *const c_char );
table.get_igd_our_addr = (gd_api.godot_method_bind_get_method)(class_name, "get_igd_our_addr\0".as_ptr() as *const c_char );
table.set_igd_status = (gd_api.godot_method_bind_get_method)(class_name, "set_igd_status\0".as_ptr() as *const c_char );
table.get_igd_status = (gd_api.godot_method_bind_get_method)(class_name, "get_igd_status\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_is_valid_gateway(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).is_valid_gateway;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_query_external_address(obj_ptr: *mut sys::godot_object) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).query_external_address;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_add_port_mapping(obj_ptr: *mut sys::godot_object, port: i64, port_internal: i64, desc: GodotString, proto: GodotString, duration: i64) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).add_port_mapping;
let mut argument_buffer : [*const libc::c_void; 5] = [
(&port) as *const _ as *const _,
(&port_internal) as *const _ as *const _,
desc.sys() as *const _ as *const _,
proto.sys() as *const _ as *const _,
(&duration) as *const _ as *const _,
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_delete_port_mapping(obj_ptr: *mut sys::godot_object, port: i64, proto: GodotString) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).delete_port_mapping;
let mut argument_buffer : [*const libc::c_void; 2] = [
(&port) as *const _ as *const _,
proto.sys() as *const _ as *const _,
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_set_description_url(obj_ptr: *mut sys::godot_object, url: GodotString) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).set_description_url;
let mut argument_buffer : [*const libc::c_void; 1] = [
url.sys() as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_get_description_url(obj_ptr: *mut sys::godot_object) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).get_description_url;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_set_service_type(obj_ptr: *mut sys::godot_object, _type: GodotString) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).set_service_type;
let mut argument_buffer : [*const libc::c_void; 1] = [
_type.sys() as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_get_service_type(obj_ptr: *mut sys::godot_object) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).get_service_type;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_set_igd_control_url(obj_ptr: *mut sys::godot_object, url: GodotString) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).set_igd_control_url;
let mut argument_buffer : [*const libc::c_void; 1] = [
url.sys() as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_get_igd_control_url(obj_ptr: *mut sys::godot_object) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).get_igd_control_url;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_set_igd_service_type(obj_ptr: *mut sys::godot_object, _type: GodotString) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).set_igd_service_type;
let mut argument_buffer : [*const libc::c_void; 1] = [
_type.sys() as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_get_igd_service_type(obj_ptr: *mut sys::godot_object) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).get_igd_service_type;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_set_igd_our_addr(obj_ptr: *mut sys::godot_object, addr: GodotString) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).set_igd_our_addr;
let mut argument_buffer : [*const libc::c_void; 1] = [
addr.sys() as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_get_igd_our_addr(obj_ptr: *mut sys::godot_object) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).get_igd_our_addr;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_set_igd_status(obj_ptr: *mut sys::godot_object, status: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).set_igd_status;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&status) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn UPNPDevice_get_igd_status(obj_ptr: *mut sys::godot_object) -> UPNPDeviceIGDStatus {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = UPNPDeviceMethodTable::get(gd_api).get_igd_status;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret: UPNPDeviceIGDStatus = mem::transmute(0);
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct WebSocketServerMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub is_listening: *mut sys::godot_method_bind,
pub listen: *mut sys::godot_method_bind,
pub stop: *mut sys::godot_method_bind,
pub has_peer: *mut sys::godot_method_bind,
pub get_peer_address: *mut sys::godot_method_bind,
pub get_peer_port: *mut sys::godot_method_bind,
pub disconnect_peer: *mut sys::godot_method_bind,
}
impl WebSocketServerMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: WebSocketServerMethodTable = WebSocketServerMethodTable {
class_constructor: None,
is_listening: 0 as *mut sys::godot_method_bind,
listen: 0 as *mut sys::godot_method_bind,
stop: 0 as *mut sys::godot_method_bind,
has_peer: 0 as *mut sys::godot_method_bind,
get_peer_address: 0 as *mut sys::godot_method_bind,
get_peer_port: 0 as *mut sys::godot_method_bind,
disconnect_peer: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
WebSocketServerMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"WebSocketServer\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.is_listening = (gd_api.godot_method_bind_get_method)(class_name, "is_listening\0".as_ptr() as *const c_char );
table.listen = (gd_api.godot_method_bind_get_method)(class_name, "listen\0".as_ptr() as *const c_char );
table.stop = (gd_api.godot_method_bind_get_method)(class_name, "stop\0".as_ptr() as *const c_char );
table.has_peer = (gd_api.godot_method_bind_get_method)(class_name, "has_peer\0".as_ptr() as *const c_char );
table.get_peer_address = (gd_api.godot_method_bind_get_method)(class_name, "get_peer_address\0".as_ptr() as *const c_char );
table.get_peer_port = (gd_api.godot_method_bind_get_method)(class_name, "get_peer_port\0".as_ptr() as *const c_char );
table.disconnect_peer = (gd_api.godot_method_bind_get_method)(class_name, "disconnect_peer\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn WebSocketServer_is_listening(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketServerMethodTable::get(gd_api).is_listening;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn WebSocketServer_listen(obj_ptr: *mut sys::godot_object, port: i64, protocols: StringArray, gd_mp_api: bool) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketServerMethodTable::get(gd_api).listen;
let mut argument_buffer : [*const libc::c_void; 3] = [
(&port) as *const _ as *const _,
protocols.sys() as *const _ as *const _,
(&gd_mp_api) as *const _ as *const _,
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn WebSocketServer_stop(obj_ptr: *mut sys::godot_object) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketServerMethodTable::get(gd_api).stop;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn WebSocketServer_has_peer(obj_ptr: *mut sys::godot_object, id: i64) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketServerMethodTable::get(gd_api).has_peer;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&id) as *const _ as *const _,
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn WebSocketServer_get_peer_address(obj_ptr: *mut sys::godot_object, id: i64) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketServerMethodTable::get(gd_api).get_peer_address;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&id) as *const _ as *const _,
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn WebSocketServer_get_peer_port(obj_ptr: *mut sys::godot_object, id: i64) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketServerMethodTable::get(gd_api).get_peer_port;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&id) as *const _ as *const _,
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn WebSocketServer_disconnect_peer(obj_ptr: *mut sys::godot_object, id: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketServerMethodTable::get(gd_api).disconnect_peer;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&id) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct WebSocketMultiplayerPeerMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub get_peer: *mut sys::godot_method_bind,
}
impl WebSocketMultiplayerPeerMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: WebSocketMultiplayerPeerMethodTable = WebSocketMultiplayerPeerMethodTable {
class_constructor: None,
get_peer: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
WebSocketMultiplayerPeerMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"WebSocketMultiplayerPeer\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.get_peer = (gd_api.godot_method_bind_get_method)(class_name, "get_peer\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn WebSocketMultiplayerPeer_get_peer(obj_ptr: *mut sys::godot_object, peer_id: i64) -> Option<WebSocketPeer> {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketMultiplayerPeerMethodTable::get(gd_api).get_peer;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&peer_id) as *const _ as *const _,
];
let mut ret: *mut sys::godot_object = ptr::null_mut();
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
if ret.is_null() {
None
} else {
Some(WebSocketPeer::from_sys(ret))
}
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct WebSocketClientMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub connect_to_url: *mut sys::godot_method_bind,
pub disconnect_from_host: *mut sys::godot_method_bind,
pub set_verify_ssl_enabled: *mut sys::godot_method_bind,
pub is_verify_ssl_enabled: *mut sys::godot_method_bind,
}
impl WebSocketClientMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: WebSocketClientMethodTable = WebSocketClientMethodTable {
class_constructor: None,
connect_to_url: 0 as *mut sys::godot_method_bind,
disconnect_from_host: 0 as *mut sys::godot_method_bind,
set_verify_ssl_enabled: 0 as *mut sys::godot_method_bind,
is_verify_ssl_enabled: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
WebSocketClientMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"WebSocketClient\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.connect_to_url = (gd_api.godot_method_bind_get_method)(class_name, "connect_to_url\0".as_ptr() as *const c_char );
table.disconnect_from_host = (gd_api.godot_method_bind_get_method)(class_name, "disconnect_from_host\0".as_ptr() as *const c_char );
table.set_verify_ssl_enabled = (gd_api.godot_method_bind_get_method)(class_name, "set_verify_ssl_enabled\0".as_ptr() as *const c_char );
table.is_verify_ssl_enabled = (gd_api.godot_method_bind_get_method)(class_name, "is_verify_ssl_enabled\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn WebSocketClient_connect_to_url(obj_ptr: *mut sys::godot_object, url: GodotString, protocols: StringArray, gd_mp_api: bool) -> GodotResult {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketClientMethodTable::get(gd_api).connect_to_url;
let mut argument_buffer : [*const libc::c_void; 3] = [
url.sys() as *const _ as *const _,
protocols.sys() as *const _ as *const _,
(&gd_mp_api) as *const _ as *const _,
];
let mut ret: sys::godot_error = sys::godot_error_GODOT_OK;
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
result_from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn WebSocketClient_disconnect_from_host(obj_ptr: *mut sys::godot_object) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketClientMethodTable::get(gd_api).disconnect_from_host;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn WebSocketClient_set_verify_ssl_enabled(obj_ptr: *mut sys::godot_object, enabled: bool) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketClientMethodTable::get(gd_api).set_verify_ssl_enabled;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&enabled) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn WebSocketClient_is_verify_ssl_enabled(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketClientMethodTable::get(gd_api).is_verify_ssl_enabled;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
#[allow(non_camel_case_types)]
pub struct WebSocketPeerMethodTable {
pub class_constructor: sys::godot_class_constructor,
pub get_write_mode: *mut sys::godot_method_bind,
pub set_write_mode: *mut sys::godot_method_bind,
pub is_connected_to_host: *mut sys::godot_method_bind,
pub was_string_packet: *mut sys::godot_method_bind,
pub close: *mut sys::godot_method_bind,
pub get_connected_host: *mut sys::godot_method_bind,
pub get_connected_port: *mut sys::godot_method_bind,
}
impl WebSocketPeerMethodTable {
unsafe fn get_mut() -> &'static mut Self {
static mut TABLE: WebSocketPeerMethodTable = WebSocketPeerMethodTable {
class_constructor: None,
get_write_mode: 0 as *mut sys::godot_method_bind,
set_write_mode: 0 as *mut sys::godot_method_bind,
is_connected_to_host: 0 as *mut sys::godot_method_bind,
was_string_packet: 0 as *mut sys::godot_method_bind,
close: 0 as *mut sys::godot_method_bind,
get_connected_host: 0 as *mut sys::godot_method_bind,
get_connected_port: 0 as *mut sys::godot_method_bind,
};
&mut TABLE
}
pub unsafe fn unchecked_get() -> &'static Self {
Self::get_mut()
}
pub fn get(gd_api: &GodotApi) -> &'static Self {
unsafe {
let table = Self::get_mut();
static INIT: Once = ONCE_INIT;
INIT.call_once(|| {
WebSocketPeerMethodTable::init(table, gd_api);
});
table
}
}
#[inline(never)]
fn init(table: &mut Self, gd_api: &GodotApi) {
unsafe {
let class_name = b"WebSocketPeer\0".as_ptr() as *const c_char;
table.class_constructor = (gd_api.godot_get_class_constructor)(class_name);
table.get_write_mode = (gd_api.godot_method_bind_get_method)(class_name, "get_write_mode\0".as_ptr() as *const c_char );
table.set_write_mode = (gd_api.godot_method_bind_get_method)(class_name, "set_write_mode\0".as_ptr() as *const c_char );
table.is_connected_to_host = (gd_api.godot_method_bind_get_method)(class_name, "is_connected_to_host\0".as_ptr() as *const c_char );
table.was_string_packet = (gd_api.godot_method_bind_get_method)(class_name, "was_string_packet\0".as_ptr() as *const c_char );
table.close = (gd_api.godot_method_bind_get_method)(class_name, "close\0".as_ptr() as *const c_char );
table.get_connected_host = (gd_api.godot_method_bind_get_method)(class_name, "get_connected_host\0".as_ptr() as *const c_char );
table.get_connected_port = (gd_api.godot_method_bind_get_method)(class_name, "get_connected_port\0".as_ptr() as *const c_char );
}
}
}
#[doc(hidden)]
pub unsafe fn WebSocketPeer_get_write_mode(obj_ptr: *mut sys::godot_object) -> WebSocketPeerWriteMode {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketPeerMethodTable::get(gd_api).get_write_mode;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret: WebSocketPeerWriteMode = mem::transmute(0);
let ret_ptr = (&mut ret) as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn WebSocketPeer_set_write_mode(obj_ptr: *mut sys::godot_object, mode: i64) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketPeerMethodTable::get(gd_api).set_write_mode;
let mut argument_buffer : [*const libc::c_void; 1] = [
(&mode) as *const _ as *const _,
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn WebSocketPeer_is_connected_to_host(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketPeerMethodTable::get(gd_api).is_connected_to_host;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn WebSocketPeer_was_string_packet(obj_ptr: *mut sys::godot_object) -> bool {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketPeerMethodTable::get(gd_api).was_string_packet;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = false;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}
#[doc(hidden)]
pub unsafe fn WebSocketPeer_close(obj_ptr: *mut sys::godot_object) -> () {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketPeerMethodTable::get(gd_api).close;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let ret_ptr = ptr::null_mut();
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
}
#[doc(hidden)]
pub unsafe fn WebSocketPeer_get_connected_host(obj_ptr: *mut sys::godot_object) -> GodotString {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketPeerMethodTable::get(gd_api).get_connected_host;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = sys::godot_string::default();
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
GodotString::from_sys(ret)
}
#[doc(hidden)]
pub unsafe fn WebSocketPeer_get_connected_port(obj_ptr: *mut sys::godot_object) -> i64 {
let gd_api = get_api();
let method_bind: *mut sys::godot_method_bind = WebSocketPeerMethodTable::get(gd_api).get_connected_port;
let mut argument_buffer : [*const libc::c_void; 0] = [
];
let mut ret = 0i64;
let ret_ptr = &mut ret as *mut _;
(gd_api.godot_method_bind_ptrcall)(method_bind, obj_ptr, argument_buffer.as_mut_ptr() as *mut _, ret_ptr as *mut _);
ret
}