blob: 1593817f7d040707a62e0c6e1f5fb27e3131a0be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
// SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
// SPDX-FileCopyrightText: 2008 litl, LLC
#ifndef GI_PARAM_H_
#define GI_PARAM_H_
#include <config.h>
#include <glib-object.h>
#include <js/TypeDecls.h>
#include "gjs/macros.h"
GJS_JSAPI_RETURN_CONVENTION
bool gjs_define_param_class(JSContext *context,
JS::HandleObject in_object);
GJS_JSAPI_RETURN_CONVENTION
GParamSpec *gjs_g_param_from_param (JSContext *context,
JS::HandleObject obj);
GJS_JSAPI_RETURN_CONVENTION
JSObject* gjs_param_from_g_param (JSContext *context,
GParamSpec *param);
[[nodiscard]] bool gjs_typecheck_param(JSContext* cx, JS::HandleObject obj,
GType expected_type, bool throw_error);
#endif // GI_PARAM_H_
|