ELinks 0.19.1
window.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "elinks.h"
#include "bfu/leds.h"
#include "dialogs/menu.h"
#include "dialogs/status.h"
#include "document/document.h"
#include "document/view.h"
#include "js/ecmascript.h"
#include "js/quickjs.h"
#include "js/quickjs/css.h"
#include "js/quickjs/element.h"
#include "js/quickjs/heartbeat.h"
#include "js/quickjs/keyboard.h"
#include "js/quickjs/location.h"
#include "js/quickjs/message.h"
#include "js/quickjs/performance.h"
#include "js/quickjs/window.h"
#include "js/timer.h"
#include "intl/libintl.h"
#include "main/select.h"
#include "osdep/newwin.h"
#include "session/session.h"
#include "session/task.h"
#include "terminal/tab.h"
#include "util/conv.h"
#include "viewer/text/view.h"
#include "viewer/text/vs.h"
Include dependency graph for window.c:

Data Structures

struct  win_listener
struct  el_window
struct  el_message

Macros

#define countof(x)

Functions

static void js_window_finalize (JSRuntime *rt, JSValue val)
void detach_js_view_state (struct view_state *vs)
static void js_window_mark (JSRuntime *rt, JSValueConst val, JS_MarkFunc *mark_func)
JSValue js_window_open (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
JSValue js_window_scrollBy (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
JSValue js_window_scrollByLines (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
JSValue js_window_scrollByPages (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
JSValue js_window_scrollTo (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
JSValue js_window_scroll (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
JSValue js_window_requestAnimationFrame (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
JSValue js_window_setInterval (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
JSValue js_window_setTimeout (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
JSValue js_window_clearInterval (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
JSValue js_window_clearRequestAnimationFrame (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
JSValue js_window_clearTimeout (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
JSValue js_window_getComputedStyle (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_window_get_property_closed (JSContext *ctx, JSValueConst this_val)
static JSValue js_window_get_property_event (JSContext *ctx, JSValueConst this_val)
static JSValue js_window_get_property_innerHeight (JSContext *ctx, JSValueConst this_val)
static JSValue js_window_get_property_innerWidth (JSContext *ctx, JSValueConst this_val)
static JSValue js_window_get_property_location (JSContext *ctx, JSValueConst this_val)
static JSValue js_window_set_property_location (JSContext *ctx, JSValueConst this_val, JSValue val)
static JSValue js_window_get_property_top (JSContext *ctx, JSValueConst this_val)
static JSValue js_window_get_property_parent (JSContext *ctx, JSValueConst this_val)
static JSValue js_window_get_property_performance (JSContext *ctx, JSValueConst this_val)
static JSValue js_window_get_property_scrollX (JSContext *ctx, JSValueConst this_val)
static JSValue js_window_get_property_scrollY (JSContext *ctx, JSValueConst this_val)
static JSValue js_window_get_property_self (JSContext *ctx, JSValueConst this_val)
static JSValue js_window_get_property_status (JSContext *ctx, JSValueConst this_val)
static JSValue js_window_set_property_status (JSContext *ctx, JSValueConst this_val, JSValue val)
JSValue js_window_alert (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_window_toString (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_window_addEventListener (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static JSValue js_window_removeEventListener (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
static void onmessage_run (void *data)
static JSValue js_window_postMessage (JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
int js_window_init (JSContext *ctx)
JSValue getWindow (JSContext *ctx, struct view_state *vs)

Variables

static JSClassID js_window_class_id
struct term_event last_event
static const JSCFunctionListEntry js_window_proto_funcs []
static JSClassDef js_window_class

Macro Definition Documentation

◆ countof

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

Function Documentation

◆ detach_js_view_state()

void detach_js_view_state ( struct view_state * vs)

◆ getWindow()

JSValue getWindow ( JSContext * ctx,
struct view_state * vs )

◆ js_window_addEventListener()

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

◆ js_window_alert()

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

◆ js_window_clearInterval()

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

◆ js_window_clearRequestAnimationFrame()

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

◆ js_window_clearTimeout()

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

◆ js_window_finalize()

void js_window_finalize ( JSRuntime * rt,
JSValue val )
static

◆ js_window_get_property_closed()

JSValue js_window_get_property_closed ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_window_get_property_event()

JSValue js_window_get_property_event ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_window_get_property_innerHeight()

JSValue js_window_get_property_innerHeight ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_window_get_property_innerWidth()

JSValue js_window_get_property_innerWidth ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_window_get_property_location()

JSValue js_window_get_property_location ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_window_get_property_parent()

JSValue js_window_get_property_parent ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_window_get_property_performance()

JSValue js_window_get_property_performance ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_window_get_property_scrollX()

JSValue js_window_get_property_scrollX ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_window_get_property_scrollY()

JSValue js_window_get_property_scrollY ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_window_get_property_self()

JSValue js_window_get_property_self ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_window_get_property_status()

JSValue js_window_get_property_status ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_window_get_property_top()

JSValue js_window_get_property_top ( JSContext * ctx,
JSValueConst this_val )
static

◆ js_window_getComputedStyle()

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

◆ js_window_init()

int js_window_init ( JSContext * ctx)

◆ js_window_mark()

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

◆ js_window_open()

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

◆ js_window_postMessage()

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

◆ js_window_removeEventListener()

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

◆ js_window_requestAnimationFrame()

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

◆ js_window_scroll()

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

◆ js_window_scrollBy()

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

◆ js_window_scrollByLines()

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

◆ js_window_scrollByPages()

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

◆ js_window_scrollTo()

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

◆ js_window_set_property_location()

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

◆ js_window_set_property_status()

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

◆ js_window_setInterval()

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

◆ js_window_setTimeout()

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

◆ js_window_toString()

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

◆ onmessage_run()

void onmessage_run ( void * data)
static

Variable Documentation

◆ js_window_class

JSClassDef js_window_class
static
Initial value:
= {
"window",
.finalizer = js_window_finalize,
.gc_mark = js_window_mark,
}
static void js_window_mark(JSRuntime *rt, JSValueConst val, JS_MarkFunc *mark_func)
Definition window.c:118
static void js_window_finalize(JSRuntime *rt, JSValue val)
Definition window.c:70

◆ js_window_class_id

JSClassID js_window_class_id
static

◆ js_window_proto_funcs

const JSCFunctionListEntry js_window_proto_funcs[]
static

◆ last_event

struct term_event last_event
extern