libqmlbind
A C library for creating QML bindings for other languages easily through exporting objects to QML
Functions
value.h File Reference

Contains all methods defined on qmlbind_value. More...

#include "qmlbind_global.h"
#include <time.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

QMLBIND_API qmlbind_valueqmlbind_value_new_undefined ()
 Constructs a new undefined qmlbind_value. More...
 
QMLBIND_API qmlbind_valueqmlbind_value_new_null ()
 Constructs a new null qmlbind_value. More...
 
QMLBIND_API void qmlbind_value_release (qmlbind_value *self)
 Destroys this qmlbind_value.
 
QMLBIND_API qmlbind_valueqmlbind_value_clone (const qmlbind_value *other)
 Constructs a new qmlbind_value that is a copy of other. More...
 
QMLBIND_API int qmlbind_value_is_equal (const qmlbind_value *value1, const qmlbind_value *value2)
 Returns true if value1 is equal to value2, otherwise returns false. More...
 
QMLBIND_API int qmlbind_value_is_identical (const qmlbind_value *value1, const qmlbind_value *value2)
 Returns true if value1 is equal to value2 using strict comparison (no conversion), otherwise returns false. More...
 
QMLBIND_API int qmlbind_value_is_undefined (const qmlbind_value *self)
 Returns true if this qmlbind_value is of the primitive type Undefined; otherwise returns false. More...
 
QMLBIND_API int qmlbind_value_is_null (const qmlbind_value *self)
 Returns true if this qmlbind_value is of the primitive type Null; otherwise returns false. More...
 
QMLBIND_API int qmlbind_value_is_boolean (const qmlbind_value *self)
 Returns true if this qmlbind_value is of the primitive type Boolean; otherwise returns false. More...
 
QMLBIND_API int qmlbind_value_is_number (const qmlbind_value *self)
 Returns true if this qmlbind_value is of the primitive type Number; otherwise returns false. More...
 
QMLBIND_API int qmlbind_value_is_string (const qmlbind_value *self)
 Returns true if this qmlbind_value is of the primitive type String; otherwise returns false. More...
 
QMLBIND_API int qmlbind_value_is_object (const qmlbind_value *self)
 Returns true if this qmlbind_value is of the Object type; otherwise returns false. More...
 
QMLBIND_API int qmlbind_value_is_array (const qmlbind_value *self)
 Returns true if this qmlbind_value is an object of the Array class; otherwise returns false. More...
 
QMLBIND_API int qmlbind_value_is_function (const qmlbind_value *self)
 Returns true if this qmlbind_value can be called as function, otherwise returns false. More...
 
QMLBIND_API int qmlbind_value_is_error (const qmlbind_value *self)
 Returns true if this qmlbind_value is an object of the Error class; otherwise returns false. More...
 
QMLBIND_API int qmlbind_value_is_wrapper (const qmlbind_value *self)
 Returns true if this qmlbind_value is a wrapper around a C object; otherwise returns false. More...
 
QMLBIND_API qmlbind_valueqmlbind_value_new_boolean (int value)
 Constructs a new qmlbind_value with a boolean value. More...
 
QMLBIND_API int qmlbind_value_get_boolean (const qmlbind_value *self)
 Returns the boolean value of this qmlbind_value, as defined in ECMA-262 section 9.2, "ToBoolean". More...
 
QMLBIND_API qmlbind_valueqmlbind_value_new_number (double value)
 Constructs a new qmlbind_value with a number value. More...
 
QMLBIND_API double qmlbind_value_get_number (const qmlbind_value *self)
 Returns the number value of this qmlbind_value, as defined in ECMA-262 section 9.3, "ToNumber". More...
 
QMLBIND_API qmlbind_valueqmlbind_value_new_string (int length, const char *value)
 Constructs a new qmlbind_value with a the first length chars of string value. More...
 
QMLBIND_API qmlbind_valueqmlbind_value_new_string_cstr (const char *value)
 Constructs a new qmlbind_value with a \0-terminated string value. More...
 
QMLBIND_API qmlbind_stringqmlbind_value_get_string (const qmlbind_value *self)
 Returns the string value of this qmlbind_value, as defined in ECMA-262 section 9.8, "ToString". Ownership is transfered to the caller. More...
 
QMLBIND_API qmlbind_valueqmlbind_value_get_property (const qmlbind_value *self, const char *key)
 Returns the value of this qmlbind_value's property with the given name. If no such property exists, an undefined qmlbind_value is returned. More...
 
QMLBIND_API void qmlbind_value_set_property (qmlbind_value *self, const char *key, const qmlbind_value *value)
 Sets the value of this qmlbind_value's property with the given name to the given value. More...
 
QMLBIND_API int qmlbind_value_delete_property (qmlbind_value *self, const char *key)
 Attempts to delete this object's property of the given name. Returns true if the property was deleted, otherwise returns false. More...
 
QMLBIND_API int qmlbind_value_has_property (const qmlbind_value *self, const char *key)
 Returns true if this object has a property of the given name, otherwise returns false. More...
 
QMLBIND_API int qmlbind_value_has_own_property (const qmlbind_value *self, const char *key)
 Returns true if this object has an own (not prototype-inherited) property of the given name, otherwise returns false. More...
 
QMLBIND_API qmlbind_valueqmlbind_value_get_prototype (const qmlbind_value *self)
 If this qmlbind_value is an object, returns the internal prototype (proto property) of this object; otherwise returns an undefined qmlbind_value. More...
 
QMLBIND_API void qmlbind_value_set_prototype (qmlbind_value *self, const qmlbind_value *proto)
 If this qmlbind_value is an object, sets the internal prototype (proto property) of this object to be prototype; if the qmlbind_value is null, it sets the prototype to null; otherwise does nothing. More...
 
QMLBIND_API int qmlbind_value_has_index (const qmlbind_value *self, int index)
 Returns true if this object has a property index, otherwise returns false. More...
 
QMLBIND_API qmlbind_valueqmlbind_value_get_array_item (const qmlbind_value *self, int index)
 Returns the property at the given index. More...
 
QMLBIND_API void qmlbind_value_set_array_item (qmlbind_value *self, int index, const qmlbind_value *property)
 Sets the property at the given index to the given value. More...
 
QMLBIND_API qmlbind_valueqmlbind_value_call (qmlbind_value *self, int argc, const qmlbind_value *const *argv)
 Calls this qmlbind_value as a function, passing argc number of arguments from argv as arguments to the function, and using the globalObject() as the "this"-object. Returns the value returned from the function. More...
 
QMLBIND_API qmlbind_valueqmlbind_value_call_constructor (qmlbind_value *function, int argc, const qmlbind_value *const *argv)
 Creates a new Object and calls this libqmlbind_value as a constructor, using the created object as the `this' object and passing argc number of arguments from argv as arguments. More...
 
QMLBIND_API qmlbind_valueqmlbind_value_call_with_instance (qmlbind_value *self, qmlbind_value *instance, int argc, const qmlbind_value *const *argv)
 Calls this qmlbind_value as a function, using instance as the `this' object in the function call, and passing argc number of arguments from argv as arguments to the function. Returns the value returned from the function. More...
 
QMLBIND_API qmlbind_client_objectqmlbind_value_unwrap (const qmlbind_value *self)
 If this qmlbind_value is a wrapper, returns the qmlbind_client_object inside the wrapper; otherwise, returns 0. More...
 

Detailed Description

Contains all methods defined on qmlbind_value.