LCOV - code coverage report
Current view: top level - gjs - context.h (source / functions) Coverage Total Hit
Test: gjs- Code Coverage Lines: 100.0 % 1 1
Test Date: 2024-04-29 05:18:28 Functions: 100.0 % 2 2
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 50.0 % 6 3

             Branch data     Line data    Source code
       1                 :             : /* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
       2                 :             : /*
       3                 :             :  * SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
       4                 :             :  * SPDX-FileCopyrightText: 2008 litl, LLC
       5                 :             :  */
       6                 :             : 
       7                 :             : #ifndef GJS_CONTEXT_H_
       8                 :             : #define GJS_CONTEXT_H_
       9                 :             : 
      10                 :             : #if !defined(INSIDE_GJS_H) && !defined(GJS_COMPILATION)
      11                 :             : #    error "Only <gjs/gjs.h> can be included directly."
      12                 :             : #endif
      13                 :             : 
      14                 :             : #include <stdbool.h>    /* IWYU pragma: keep */
      15                 :             : #include <stdint.h>
      16                 :             : #include <sys/types.h> /* for ssize_t */
      17                 :             : 
      18                 :             : #ifndef _WIN32
      19                 :             : #    include <signal.h> /* for siginfo_t */
      20                 :             : #endif
      21                 :             : 
      22                 :             : #include <glib-object.h>
      23                 :             : #include <glib.h>
      24                 :             : 
      25                 :             : #include <gjs/macros.h>
      26                 :             : #include <gjs/profiler.h>
      27                 :             : 
      28                 :             : G_BEGIN_DECLS
      29                 :             : 
      30                 :             : #define GJS_TYPE_CONTEXT              (gjs_context_get_type ())
      31                 :             : 
      32   [ -  +  +  -  :       14019 : GJS_EXPORT GJS_USE G_DECLARE_FINAL_TYPE(GjsContext, gjs_context, GJS, CONTEXT,
                   +  - ]
      33                 :             :                                         GObject);
      34                 :             : 
      35                 :             : /* These class macros are not defined by G_DECLARE_FINAL_TYPE, but are kept for
      36                 :             :  * backwards compatibility */
      37                 :             : #define GJS_CONTEXT_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GJS_TYPE_CONTEXT, GjsContextClass))
      38                 :             : #define GJS_IS_CONTEXT_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GJS_TYPE_CONTEXT))
      39                 :             : #define GJS_CONTEXT_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GJS_TYPE_CONTEXT, GjsContextClass))
      40                 :             : 
      41                 :             : typedef void (*GjsContextInRealmFunc)(GjsContext*, void*);
      42                 :             : 
      43                 :             : GJS_EXPORT GJS_USE GjsContext* gjs_context_new(void);
      44                 :             : GJS_EXPORT GJS_USE GjsContext* gjs_context_new_with_search_path(
      45                 :             :     char** search_path);
      46                 :             : GJS_EXPORT GJS_USE bool gjs_context_eval_file(GjsContext* js_context,
      47                 :             :                                               const char* filename,
      48                 :             :                                               int* exit_status_p,
      49                 :             :                                               GError** error);
      50                 :             : GJS_EXPORT GJS_USE bool gjs_context_eval_module_file(GjsContext* js_context,
      51                 :             :                                                      const char* filename,
      52                 :             :                                                      uint8_t* exit_status_p,
      53                 :             :                                                      GError** error);
      54                 :             : GJS_EXPORT GJS_USE bool gjs_context_eval(GjsContext* js_context,
      55                 :             :                                          const char* script, gssize script_len,
      56                 :             :                                          const char* filename,
      57                 :             :                                          int* exit_status_p, GError** error);
      58                 :             : GJS_EXPORT GJS_USE bool gjs_context_register_module(GjsContext* context,
      59                 :             :                                                     const char* identifier,
      60                 :             :                                                     const char* uri,
      61                 :             :                                                     GError** error);
      62                 :             : GJS_EXPORT GJS_USE bool gjs_context_eval_module(GjsContext* context,
      63                 :             :                                                 const char* identifier,
      64                 :             :                                                 uint8_t* exit_code,
      65                 :             :                                                 GError** error);
      66                 :             : GJS_EXPORT GJS_USE bool gjs_context_define_string_array(
      67                 :             :     GjsContext* js_context, const char* array_name, gssize array_length,
      68                 :             :     const char** array_values, GError** error);
      69                 :             : 
      70                 :             : GJS_EXPORT void gjs_context_set_argv(GjsContext* js_context,
      71                 :             :                                      ssize_t array_length,
      72                 :             :                                      const char** array_values);
      73                 :             : 
      74                 :             : GJS_EXPORT GJS_USE GList* gjs_context_get_all(void);
      75                 :             : 
      76                 :             : GJS_EXPORT GJS_USE GjsContext* gjs_context_get_current(void);
      77                 :             : GJS_EXPORT
      78                 :             : void            gjs_context_make_current         (GjsContext *js_context);
      79                 :             : 
      80                 :             : GJS_EXPORT
      81                 :             : void*           gjs_context_get_native_context   (GjsContext *js_context);
      82                 :             : 
      83                 :             : GJS_EXPORT void gjs_context_run_in_realm(GjsContext* gjs,
      84                 :             :                                          GjsContextInRealmFunc func,
      85                 :             :                                          void* user_data);
      86                 :             : 
      87                 :             : GJS_EXPORT
      88                 :             : void            gjs_context_print_stack_stderr    (GjsContext *js_context);
      89                 :             : 
      90                 :             : GJS_EXPORT
      91                 :             : void            gjs_context_maybe_gc              (GjsContext  *context);
      92                 :             : 
      93                 :             : GJS_EXPORT
      94                 :             : void            gjs_context_gc                    (GjsContext  *context);
      95                 :             : 
      96                 :             : GJS_EXPORT GJS_USE GjsProfiler* gjs_context_get_profiler(GjsContext* self);
      97                 :             : 
      98                 :             : GJS_EXPORT GJS_USE bool gjs_profiler_chain_signal(GjsContext* context,
      99                 :             :                                                   siginfo_t* info);
     100                 :             : 
     101                 :             : GJS_EXPORT
     102                 :             : void            gjs_dumpstack                     (void);
     103                 :             : 
     104                 :             : GJS_EXPORT GJS_USE const char* gjs_get_js_version(void);
     105                 :             : 
     106                 :             : GJS_EXPORT
     107                 :             : void gjs_context_setup_debugger_console(GjsContext* gjs);
     108                 :             : 
     109                 :             : G_END_DECLS
     110                 :             : 
     111                 :             : #endif /* GJS_CONTEXT_H_ */
        

Generated by: LCOV version 2.0-1