ELinks 0.18.0
text.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "dialogs/status.h"
#include "document/document.h"
#include "document/libdom/corestrings.h"
#include "document/libdom/doc.h"
#include "document/libdom/mapa.h"
#include "document/libdom/renderer2.h"
#include "document/view.h"
#include "js/ecmascript.h"
#include "js/ecmascript-c.h"
#include "js/quickjs/mapa.h"
#include "js/quickjs.h"
#include "js/quickjs/attr.h"
#include "js/quickjs/attributes.h"
#include "js/quickjs/collection.h"
#include "js/quickjs/dataset.h"
#include "js/quickjs/domrect.h"
#include "js/quickjs/element.h"
#include "js/quickjs/event.h"
#include "js/quickjs/heartbeat.h"
#include "js/quickjs/keyboard.h"
#include "js/quickjs/node.h"
#include "js/quickjs/nodelist.h"
#include "js/quickjs/nodelist2.h"
#include "js/quickjs/style.h"
#include "js/quickjs/text.h"
#include "js/quickjs/tokenlist.h"
#include "js/quickjs/window.h"
#include "session/session.h"
#include "terminal/event.h"
#include "viewer/text/draw.h"
#include "viewer/text/form.h"
#include "viewer/text/link.h"
#include "viewer/text/vs.h"
Include dependency graph for text.c:

Data Structures

struct  text_listener
 
struct  js_text_private
 

Macros

#define countof(x)   (sizeof(x) / sizeof((x)[0]))
 

Functions

static void text_event_handler (dom_event *event, void *pw)
 
static JSValue js_text_set_property_textContent (JSContext *ctx, JSValueConst this_val, JSValue val)
 
void * js_getopaque_text (JSValueConst obj, JSClassID class_id)
 
void * text_get_node (JSValueConst obj)
 
static JSValue js_text_get_property_children (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_get_property_childElementCount (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_get_property_childNodes (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_get_property_firstChild (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_get_property_firstElementChild (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_get_property_lastChild (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_get_property_lastElementChild (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_get_property_nodeName (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_get_property_nodeType (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_get_property_nodeValue (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_set_property_nodeValue (JSContext *ctx, JSValueConst this_val, JSValue val)
 
static JSValue js_text_get_property_nextSibling (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_get_property_ownerDocument (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_get_property_parentElement (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_get_property_parentNode (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_get_property_previousSibling (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_get_property_tagName (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_get_property_textContent (JSContext *ctx, JSValueConst this_val)
 
static JSValue js_text_dispatchEvent (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
 
static JSValue js_text_addEventListener (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
 
static JSValue js_text_removeEventListener (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
 
static JSValue js_text_appendChild (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
 
static JSValue js_text_cloneNode (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
 
static JSValue js_text_contains (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
 
static JSValue js_text_hasChildNodes (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
 
static JSValue js_text_insertBefore (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
 
static JSValue js_text_isEqualNode (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
 
static JSValue js_text_isSameNode (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
 
static JSValue js_text_removeChild (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
 
static JSValue js_text_toString (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
 
static void js_text_finalizer (JSRuntime *rt, JSValue val)
 
static void js_text_mark (JSRuntime *rt, JSValueConst val, JS_MarkFunc *mark_func)
 
int js_text_init (JSContext *ctx)
 
JSValue getText (JSContext *ctx, void *node)
 

Variables

JSClassID js_text_class_id
 
static const JSCFunctionListEntry js_text_proto_funcs []
 
static JSClassDef js_text_class
 

Macro Definition Documentation

◆ countof

#define countof ( x)    (sizeof(x) / sizeof((x)[0]))

Function Documentation

◆ getText()

JSValue getText ( JSContext * ctx,
void * node )

◆ js_getopaque_text()

void * js_getopaque_text ( JSValueConst obj,
JSClassID class_id )

◆ js_text_addEventListener()

static JSValue js_text_addEventListener ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

◆ js_text_appendChild()

static JSValue js_text_appendChild ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

◆ js_text_cloneNode()

static JSValue js_text_cloneNode ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

◆ js_text_contains()

static JSValue js_text_contains ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

◆ js_text_dispatchEvent()

static JSValue js_text_dispatchEvent ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

◆ js_text_finalizer()

static void js_text_finalizer ( JSRuntime * rt,
JSValue val )
static

◆ js_text_get_property_childElementCount()

static JSValue js_text_get_property_childElementCount ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_childNodes()

static JSValue js_text_get_property_childNodes ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_children()

static JSValue js_text_get_property_children ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_firstChild()

static JSValue js_text_get_property_firstChild ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_firstElementChild()

static JSValue js_text_get_property_firstElementChild ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_lastChild()

static JSValue js_text_get_property_lastChild ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_lastElementChild()

static JSValue js_text_get_property_lastElementChild ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_nextSibling()

static JSValue js_text_get_property_nextSibling ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_nodeName()

static JSValue js_text_get_property_nodeName ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_nodeType()

static JSValue js_text_get_property_nodeType ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_nodeValue()

static JSValue js_text_get_property_nodeValue ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_ownerDocument()

static JSValue js_text_get_property_ownerDocument ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_parentElement()

static JSValue js_text_get_property_parentElement ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_parentNode()

static JSValue js_text_get_property_parentNode ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_previousSibling()

static JSValue js_text_get_property_previousSibling ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_tagName()

static JSValue js_text_get_property_tagName ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_get_property_textContent()

static JSValue js_text_get_property_textContent ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_text_hasChildNodes()

static JSValue js_text_hasChildNodes ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

◆ js_text_init()

int js_text_init ( JSContext * ctx)

◆ js_text_insertBefore()

static JSValue js_text_insertBefore ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

◆ js_text_isEqualNode()

static JSValue js_text_isEqualNode ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

◆ js_text_isSameNode()

static JSValue js_text_isSameNode ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

◆ js_text_mark()

static void js_text_mark ( JSRuntime * rt,
JSValueConst val,
JS_MarkFunc * mark_func )
static

◆ js_text_removeChild()

static JSValue js_text_removeChild ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

◆ js_text_removeEventListener()

static JSValue js_text_removeEventListener ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

◆ js_text_set_property_nodeValue()

static JSValue js_text_set_property_nodeValue ( JSContext * ctx,
JSValueConst this_val,
JSValue val )
static

◆ js_text_set_property_textContent()

static JSValue js_text_set_property_textContent ( JSContext * ctx,
JSValueConst this_val,
JSValue val )
static

◆ js_text_toString()

static JSValue js_text_toString ( JSContext * ctx,
JSValueConst this_val,
int argc,
JSValueConst * argv )
static

◆ text_event_handler()

static void text_event_handler ( dom_event * event,
void * pw )
static

◆ text_get_node()

void * text_get_node ( JSValueConst obj)

Variable Documentation

◆ js_text_class

JSClassDef js_text_class
static
Initial value:
= {
"Text",
.finalizer = js_text_finalizer,
.gc_mark = js_text_mark,
}
static void js_text_finalizer(JSRuntime *rt, JSValue val)
Definition text.c:1506
static void js_text_mark(JSRuntime *rt, JSValueConst val, JS_MarkFunc *mark_func)
Definition text.c:1545

◆ js_text_class_id

JSClassID js_text_class_id

◆ js_text_proto_funcs

const JSCFunctionListEntry js_text_proto_funcs[]
static