-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | JavaScriptCore bindings -- -- Bindings for JavaScriptCore, autogenerated by haskell-gi. @package gi-javascriptcore @version 4.0.17 module GI.JavaScriptCore.Constants -- | Allows the LLINT to be used if True. Option type: -- OptionTypeBoolean Default value: True. -- -- Since: 2.24 -- | Allows the executable pages to be allocated for JIT and thunks if -- True. Option type: OptionTypeBoolean Default value: -- True. -- -- Since: 2.24 -- | Allows the FTL JIT to be used if True. Option type: -- OptionTypeBoolean Default value: True. -- -- Since: 2.24 -- | Allows the DFG JIT to be used if True. Option type: -- OptionTypeBoolean Default value: True. -- -- Since: 2.24 -- | Like getMinorVersion, but from the headers used at application -- compile time, rather than from the library linked against at -- application run time. -- | Like getMicroVersion, but from the headers used at application -- compile time, rather than from the library linked against at -- application run time. -- | Like getMajorVersion, but from the headers used at application -- compile time, rather than from the library linked against at -- application run time. module GI.JavaScriptCore.Enums -- | Enum values to specify a mode to check for syntax errors in -- contextCheckSyntax. data CheckSyntaxMode -- | mode to check syntax of a script CheckSyntaxModeScript :: CheckSyntaxMode -- | mode to check syntax of a module CheckSyntaxModeModule :: CheckSyntaxMode -- | Catch-all for unknown values AnotherCheckSyntaxMode :: Int -> CheckSyntaxMode -- | Enum values to specify the result of contextCheckSyntax. data CheckSyntaxResult -- | no errors CheckSyntaxResultSuccess :: CheckSyntaxResult -- | recoverable syntax error CheckSyntaxResultRecoverableError :: CheckSyntaxResult -- | irrecoverable syntax error CheckSyntaxResultIrrecoverableError :: CheckSyntaxResult -- | unterminated literal error CheckSyntaxResultUnterminatedLiteralError :: CheckSyntaxResult -- | out of memory error CheckSyntaxResultOutOfMemoryError :: CheckSyntaxResult -- | stack overflow error CheckSyntaxResultStackOverflowError :: CheckSyntaxResult -- | Catch-all for unknown values AnotherCheckSyntaxResult :: Int -> CheckSyntaxResult -- | Enum values for options types. -- -- Since: 2.24 data OptionType -- | A Bool option type. OptionTypeBoolean :: OptionType -- | A gint option type. OptionTypeInt :: OptionType -- | A guint option type. OptionTypeUint :: OptionType -- | A gsize options type. OptionTypeSize :: OptionType -- | A gdouble options type. OptionTypeDouble :: OptionType -- | A string option type. OptionTypeString :: OptionType -- | A range string option type. OptionTypeRangeString :: OptionType -- | Catch-all for unknown values AnotherOptionType :: Int -> OptionType instance GHC.Classes.Eq GI.JavaScriptCore.Enums.CheckSyntaxMode instance GHC.Show.Show GI.JavaScriptCore.Enums.CheckSyntaxMode instance GHC.Classes.Eq GI.JavaScriptCore.Enums.CheckSyntaxResult instance GHC.Show.Show GI.JavaScriptCore.Enums.CheckSyntaxResult instance GHC.Classes.Eq GI.JavaScriptCore.Enums.OptionType instance GHC.Show.Show GI.JavaScriptCore.Enums.OptionType instance GHC.Enum.Enum GI.JavaScriptCore.Enums.CheckSyntaxMode instance GHC.Classes.Ord GI.JavaScriptCore.Enums.CheckSyntaxMode instance GHC.Enum.Enum GI.JavaScriptCore.Enums.CheckSyntaxResult instance GHC.Classes.Ord GI.JavaScriptCore.Enums.CheckSyntaxResult instance GHC.Enum.Enum GI.JavaScriptCore.Enums.OptionType instance GHC.Classes.Ord GI.JavaScriptCore.Enums.OptionType module GI.JavaScriptCore.Flags -- | Flags used when defining properties with -- valueObjectDefinePropertyData and -- valueObjectDefinePropertyAccessor. data ValuePropertyFlags -- | the type of the property descriptor may be changed and the property -- may be deleted from the corresponding object. ValuePropertyFlagsConfigurable :: ValuePropertyFlags -- | the property shows up during enumeration of the properties on the -- corresponding object. ValuePropertyFlagsEnumerable :: ValuePropertyFlags -- | the value associated with the property may be changed with an -- assignment operator. This doesn't have any effect when passed to -- valueObjectDefinePropertyAccessor. ValuePropertyFlagsWritable :: ValuePropertyFlags -- | Catch-all for unknown values AnotherValuePropertyFlags :: Int -> ValuePropertyFlags instance GHC.Classes.Eq GI.JavaScriptCore.Flags.ValuePropertyFlags instance GHC.Show.Show GI.JavaScriptCore.Flags.ValuePropertyFlags instance GHC.Enum.Enum GI.JavaScriptCore.Flags.ValuePropertyFlags instance GHC.Classes.Ord GI.JavaScriptCore.Flags.ValuePropertyFlags instance Data.GI.Base.BasicTypes.IsGFlag GI.JavaScriptCore.Flags.ValuePropertyFlags -- | No description available in the introspection data. module GI.JavaScriptCore.Objects.Exception -- | Memory-managed wrapper type. newtype Exception Exception :: ManagedPtr Exception -> Exception -- | Type class for types which can be safely cast to Exception, for -- instance with toException. class (GObject o, IsDescendantOf Exception o) => IsException o -- | Cast to Exception, for types for which this is known to be -- safe. For general casts, use castTo. toException :: (MonadIO m, IsException o) => o -> m Exception -- | A convenience alias for Nothing :: Maybe -- Exception. noException :: Maybe Exception -- | Get a string with the exception backtrace. exceptionGetBacktraceString :: (HasCallStack, MonadIO m, IsException a) => a -> m (Maybe Text) -- | Get the column number at which exception happened. exceptionGetColumnNumber :: (HasCallStack, MonadIO m, IsException a) => a -> m Word32 -- | Get the line number at which exception happened. exceptionGetLineNumber :: (HasCallStack, MonadIO m, IsException a) => a -> m Word32 -- | Get the error message of exception. exceptionGetMessage :: (HasCallStack, MonadIO m, IsException a) => a -> m Text -- | Get the error name of exception exceptionGetName :: (HasCallStack, MonadIO m, IsException a) => a -> m Text -- | Get the source URI of exception. exceptionGetSourceUri :: (HasCallStack, MonadIO m, IsException a) => a -> m (Maybe Text) -- | Create a new Exception in context with -- message. exceptionNew :: (HasCallStack, MonadIO m, IsContext a) => a -> Text -> m Exception -- | Create a new Exception in context with -- name and message. exceptionNewWithName :: (HasCallStack, MonadIO m, IsContext a) => a -> Text -> Text -> m Exception -- | Return a report message of exception, containing all -- the possible details such us source URI, line, column and backtrace, -- and formatted to be printed. exceptionReport :: (HasCallStack, MonadIO m, IsException a) => a -> m Text -- | Get the string representation of exception error. exceptionToString :: (HasCallStack, MonadIO m, IsException a) => a -> m Text instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.JavaScriptCore.Objects.Exception.Exception o) => GI.JavaScriptCore.Objects.Exception.IsException o instance Data.GI.Base.BasicTypes.GObject GI.JavaScriptCore.Objects.Exception.Exception instance Data.GI.Base.Overloading.HasParentTypes GI.JavaScriptCore.Objects.Exception.Exception -- | No description available in the introspection data. module GI.JavaScriptCore.Objects.Class -- | Memory-managed wrapper type. newtype Class Class :: ManagedPtr Class -> Class -- | Type class for types which can be safely cast to Class, for -- instance with toClass. class (GObject o, IsDescendantOf Class o) => IsClass o -- | Cast to Class, for types for which this is known to be safe. -- For general casts, use castTo. toClass :: (MonadIO m, IsClass o) => o -> m Class -- | A convenience alias for Nothing :: Maybe Class. noClass :: Maybe Class -- | Add a constructor to jscClass. If name -- is Nothing, the class name will be used. When -- <function>new</function> is used with the constructor or -- jsc_value_constructor_call() is called, -- callback is invoked receiving the parameters and -- userData as the last parameter. When the constructor -- object is cleared in the Class context, -- destroyNotify is called with userData -- as parameter. -- -- This function creates the constructor, which needs to be added to an -- object as a property to be able to use it. Use contextSetValue -- to make the constructor available in the global object. -- -- Note that the value returned by callback is adopted by -- jscClass, and the DestroyNotify passed to -- contextRegisterClass is responsible for disposing of it. classAddConstructor :: (HasCallStack, MonadIO m, IsClass a) => a -> Maybe Text -> Callback -> GType -> Maybe [GType] -> m Value -- | Add a constructor to jscClass. If name -- is Nothing, the class name will be used. When -- <function>new</function> is used with the constructor or -- jsc_value_constructor_call() is called, -- callback is invoked receiving a PtrArray of -- Value<!-- -->s as arguments and userData -- as the last parameter. When the constructor object is cleared in the -- Class context, destroyNotify is called with -- userData as parameter. -- -- This function creates the constructor, which needs to be added to an -- object as a property to be able to use it. Use contextSetValue -- to make the constructor available in the global object. -- -- Note that the value returned by callback is adopted by -- jscClass, and the DestroyNotify passed to -- contextRegisterClass is responsible for disposing of it. classAddConstructorVariadic :: (HasCallStack, MonadIO m, IsClass a) => a -> Maybe Text -> Callback -> GType -> m Value -- | Add method with name to jscClass. When -- the method is called by JavaScript or -- jsc_value_object_invoke_method(), -- callback is called receiving the class instance as -- first parameter, followed by the method parameters and then -- userData as last parameter. When the method is cleared -- in the Class context, destroyNotify is called -- with userData as parameter. -- -- Note that the value returned by callback must be -- transfer full. In case of non-refcounted boxed types, you should use -- G_TYPE_POINTER instead of the actual boxed -- GType to ensure that the instance owned by Class is -- used. If you really want to return a new copy of the boxed type, use -- JSC_TYPE_VALUE and return a Value created with -- valueNewObject that receives the copy as the instance -- parameter. classAddMethod :: (HasCallStack, MonadIO m, IsClass a) => a -> Text -> Callback -> GType -> Maybe [GType] -> m () -- | Add method with name to jscClass. When -- the method is called by JavaScript or -- jsc_value_object_invoke_method(), -- callback is called receiving the class instance as -- first parameter, followed by a PtrArray of Value<!-- -- -->s with the method arguments and then userData as -- last parameter. When the method is cleared in the Class -- context, destroyNotify is called with -- userData as parameter. -- -- Note that the value returned by callback must be -- transfer full. In case of non-refcounted boxed types, you should use -- G_TYPE_POINTER instead of the actual boxed -- GType to ensure that the instance owned by Class is -- used. If you really want to return a new copy of the boxed type, use -- JSC_TYPE_VALUE and return a Value created with -- valueNewObject that receives the copy as the instance -- parameter. classAddMethodVariadic :: (HasCallStack, MonadIO m, IsClass a) => a -> Text -> Callback -> GType -> m () -- | Add a property with name to jscClass. -- When the property value needs to be getted, getter is -- called receiving the the class instance as first parameter and -- userData as last parameter. When the property value -- needs to be set, setter is called receiving the the -- class instance as first parameter, followed by the value to be set and -- then userData as the last parameter. When the property -- is cleared in the Class context, destroyNotify -- is called with userData as parameter. -- -- Note that the value returned by getter must be -- transfer full. In case of non-refcounted boxed types, you should use -- G_TYPE_POINTER instead of the actual boxed -- GType to ensure that the instance owned by Class is -- used. If you really want to return a new copy of the boxed type, use -- JSC_TYPE_VALUE and return a Value created with -- valueNewObject that receives the copy as the instance -- parameter. classAddProperty :: (HasCallStack, MonadIO m, IsClass a) => a -> Text -> GType -> Maybe Callback -> Maybe Callback -> m () -- | Get the class name of jscClass classGetName :: (HasCallStack, MonadIO m, IsClass a) => a -> m Text -- | Get the parent class of jscClass classGetParent :: (HasCallStack, MonadIO m, IsClass a) => a -> m Class -- | Construct a GValueConstruct with valid value for the -- “context” property. This is rarely needed directly, but it is -- used by new. constructClassContext :: (IsClass o, IsContext a) => a -> IO (GValueConstruct o) -- | Get the value of the “context” property. When -- overloading is enabled, this is equivalent to -- --
-- get class #context --getClassContext :: (MonadIO m, IsClass o) => o -> m (Maybe Context) -- | Construct a GValueConstruct with valid value for the -- “name” property. This is rarely needed directly, but it is -- used by new. constructClassName :: IsClass o => Text -> IO (GValueConstruct o) -- | Get the value of the “name” property. When overloading -- is enabled, this is equivalent to -- --
-- get class #name --getClassName :: (MonadIO m, IsClass o) => o -> m Text -- | Construct a GValueConstruct with valid value for the -- “parent” property. This is rarely needed directly, but it is -- used by new. constructClassParent :: (IsClass o, IsClass a) => a -> IO (GValueConstruct o) -- | Get the value of the “parent” property. When -- overloading is enabled, this is equivalent to -- --
-- get class #parent --getClassParent :: (MonadIO m, IsClass o) => o -> m Class instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.JavaScriptCore.Objects.Class.Class o) => GI.JavaScriptCore.Objects.Class.IsClass o instance Data.GI.Base.BasicTypes.GObject GI.JavaScriptCore.Objects.Class.Class instance Data.GI.Base.Overloading.HasParentTypes GI.JavaScriptCore.Objects.Class.Class module GI.JavaScriptCore.Callbacks -- | Type for the callback on the (unwrapped) C side. type C_ClassDeletePropertyFunction = Ptr Class -> Ptr Context -> Ptr () -> CString -> IO CInt -- | The type of delete_property in ClassVTable. This is only -- required when you need to handle external properties not added to the -- prototype. type ClassDeletePropertyFunction = Class " /@jscClass@/: a 'GI.JavaScriptCore.Objects.Class.Class' " -> Context " /@context@/: a 'GI.JavaScriptCore.Objects.Context.Context' " -> Ptr () " /@instance@/: the /@jscClass@/ instance " -> Text " /@name@/: the property name " -> IO Bool " __Returns:__ 'True' if handled or 'False' to to forward the request to the parent class or prototype chain. " -- | Given a pointer to a foreign C function, wrap it into a function -- callable from Haskell. dynamic_ClassDeletePropertyFunction :: (HasCallStack, MonadIO m, IsClass a, IsContext b) => FunPtr C_ClassDeletePropertyFunction -> a -> b -> Ptr () -> Text -> m Bool -- | Wrap the callback into a GClosure. genClosure_ClassDeletePropertyFunction :: MonadIO m => ClassDeletePropertyFunction -> m (GClosure C_ClassDeletePropertyFunction) -- | Generate a function pointer callable from C code, from a -- C_ClassDeletePropertyFunction. mk_ClassDeletePropertyFunction :: C_ClassDeletePropertyFunction -> IO (FunPtr C_ClassDeletePropertyFunction) -- | A convenience synonym for Nothing :: Maybe -- ClassDeletePropertyFunction. noClassDeletePropertyFunction :: Maybe ClassDeletePropertyFunction -- | Wrap a ClassDeletePropertyFunction into a -- C_ClassDeletePropertyFunction. wrap_ClassDeletePropertyFunction :: Maybe (Ptr (FunPtr C_ClassDeletePropertyFunction)) -> ClassDeletePropertyFunction -> C_ClassDeletePropertyFunction -- | Type for the callback on the (unwrapped) C side. type C_ClassEnumeratePropertiesFunction = Ptr Class -> Ptr Context -> Ptr () -> IO (Ptr CString) -- | The type of enumerate_properties in ClassVTable. This is only -- required when you need to handle external properties not added to the -- prototype. type ClassEnumeratePropertiesFunction = Class " /@jscClass@/: a 'GI.JavaScriptCore.Objects.Class.Class' " -> Context " /@context@/: a 'GI.JavaScriptCore.Objects.Context.Context' " -> Ptr () " /@instance@/: the /@jscClass@/ instance " -> IO (Maybe [Text]) " __Returns:__ a 'Nothing'-terminated array of strings containing the property names, or 'Nothing' if /@instance@/ doesn\'t have enumerable properties. " -- | Given a pointer to a foreign C function, wrap it into a function -- callable from Haskell. dynamic_ClassEnumeratePropertiesFunction :: (HasCallStack, MonadIO m, IsClass a, IsContext b) => FunPtr C_ClassEnumeratePropertiesFunction -> a -> b -> Ptr () -> m (Maybe [Text]) -- | Wrap the callback into a GClosure. genClosure_ClassEnumeratePropertiesFunction :: MonadIO m => ClassEnumeratePropertiesFunction -> m (GClosure C_ClassEnumeratePropertiesFunction) -- | Generate a function pointer callable from C code, from a -- C_ClassEnumeratePropertiesFunction. mk_ClassEnumeratePropertiesFunction :: C_ClassEnumeratePropertiesFunction -> IO (FunPtr C_ClassEnumeratePropertiesFunction) -- | A convenience synonym for Nothing :: Maybe -- ClassEnumeratePropertiesFunction. noClassEnumeratePropertiesFunction :: Maybe ClassEnumeratePropertiesFunction -- | Wrap a ClassEnumeratePropertiesFunction into a -- C_ClassEnumeratePropertiesFunction. wrap_ClassEnumeratePropertiesFunction :: Maybe (Ptr (FunPtr C_ClassEnumeratePropertiesFunction)) -> ClassEnumeratePropertiesFunction -> C_ClassEnumeratePropertiesFunction -- | Type for the callback on the (unwrapped) C side. type C_ClassGetPropertyFunction = Ptr Class -> Ptr Context -> Ptr () -> CString -> IO (Ptr Value) -- | The type of get_property in ClassVTable. This is only required -- when you need to handle external properties not added to the -- prototype. type ClassGetPropertyFunction = Class " /@jscClass@/: a 'GI.JavaScriptCore.Objects.Class.Class' " -> Context " /@context@/: a 'GI.JavaScriptCore.Objects.Context.Context' " -> Ptr () " /@instance@/: the /@jscClass@/ instance " -> Text " /@name@/: the property name " -> IO (Maybe Value) " __Returns:__ a 'GI.JavaScriptCore.Objects.Value.Value' or 'Nothing' to forward the request to the parent class or prototype chain " -- | Given a pointer to a foreign C function, wrap it into a function -- callable from Haskell. dynamic_ClassGetPropertyFunction :: (HasCallStack, MonadIO m, IsClass a, IsContext b) => FunPtr C_ClassGetPropertyFunction -> a -> b -> Ptr () -> Text -> m (Maybe Value) -- | Wrap the callback into a GClosure. genClosure_ClassGetPropertyFunction :: MonadIO m => ClassGetPropertyFunction -> m (GClosure C_ClassGetPropertyFunction) -- | Generate a function pointer callable from C code, from a -- C_ClassGetPropertyFunction. mk_ClassGetPropertyFunction :: C_ClassGetPropertyFunction -> IO (FunPtr C_ClassGetPropertyFunction) -- | A convenience synonym for Nothing :: Maybe -- ClassGetPropertyFunction. noClassGetPropertyFunction :: Maybe ClassGetPropertyFunction -- | Wrap a ClassGetPropertyFunction into a -- C_ClassGetPropertyFunction. wrap_ClassGetPropertyFunction :: Maybe (Ptr (FunPtr C_ClassGetPropertyFunction)) -> ClassGetPropertyFunction -> C_ClassGetPropertyFunction -- | Type for the callback on the (unwrapped) C side. type C_ClassHasPropertyFunction = Ptr Class -> Ptr Context -> Ptr () -> CString -> IO CInt -- | The type of has_property in ClassVTable. This is only required -- when you need to handle external properties not added to the -- prototype. type ClassHasPropertyFunction = Class " /@jscClass@/: a 'GI.JavaScriptCore.Objects.Class.Class' " -> Context " /@context@/: a 'GI.JavaScriptCore.Objects.Context.Context' " -> Ptr () " /@instance@/: the /@jscClass@/ instance " -> Text " /@name@/: the property name " -> IO Bool " __Returns:__ 'True' if /@instance@/ has a property with /@name@/ or 'False' to forward the request to the parent class or prototype chain. " -- | Given a pointer to a foreign C function, wrap it into a function -- callable from Haskell. dynamic_ClassHasPropertyFunction :: (HasCallStack, MonadIO m, IsClass a, IsContext b) => FunPtr C_ClassHasPropertyFunction -> a -> b -> Ptr () -> Text -> m Bool -- | Wrap the callback into a GClosure. genClosure_ClassHasPropertyFunction :: MonadIO m => ClassHasPropertyFunction -> m (GClosure C_ClassHasPropertyFunction) -- | Generate a function pointer callable from C code, from a -- C_ClassHasPropertyFunction. mk_ClassHasPropertyFunction :: C_ClassHasPropertyFunction -> IO (FunPtr C_ClassHasPropertyFunction) -- | A convenience synonym for Nothing :: Maybe -- ClassHasPropertyFunction. noClassHasPropertyFunction :: Maybe ClassHasPropertyFunction -- | Wrap a ClassHasPropertyFunction into a -- C_ClassHasPropertyFunction. wrap_ClassHasPropertyFunction :: Maybe (Ptr (FunPtr C_ClassHasPropertyFunction)) -> ClassHasPropertyFunction -> C_ClassHasPropertyFunction -- | Type for the callback on the (unwrapped) C side. type C_ClassSetPropertyFunction = Ptr Class -> Ptr Context -> Ptr () -> CString -> Ptr Value -> IO CInt -- | The type of set_property in ClassVTable. This is only required -- when you need to handle external properties not added to the -- prototype. type ClassSetPropertyFunction = Class " /@jscClass@/: a 'GI.JavaScriptCore.Objects.Class.Class' " -> Context " /@context@/: a 'GI.JavaScriptCore.Objects.Context.Context' " -> Ptr () " /@instance@/: the /@jscClass@/ instance " -> Text " /@name@/: the property name " -> Value " /@value@/: the 'GI.JavaScriptCore.Objects.Value.Value' to set " -> IO Bool " __Returns:__ 'True' if handled or 'False' to forward the request to the parent class or prototype chain. " -- | Given a pointer to a foreign C function, wrap it into a function -- callable from Haskell. dynamic_ClassSetPropertyFunction :: (HasCallStack, MonadIO m, IsClass a, IsContext b, IsValue c) => FunPtr C_ClassSetPropertyFunction -> a -> b -> Ptr () -> Text -> c -> m Bool -- | Wrap the callback into a GClosure. genClosure_ClassSetPropertyFunction :: MonadIO m => ClassSetPropertyFunction -> m (GClosure C_ClassSetPropertyFunction) -- | Generate a function pointer callable from C code, from a -- C_ClassSetPropertyFunction. mk_ClassSetPropertyFunction :: C_ClassSetPropertyFunction -> IO (FunPtr C_ClassSetPropertyFunction) -- | A convenience synonym for Nothing :: Maybe -- ClassSetPropertyFunction. noClassSetPropertyFunction :: Maybe ClassSetPropertyFunction -- | Wrap a ClassSetPropertyFunction into a -- C_ClassSetPropertyFunction. wrap_ClassSetPropertyFunction :: Maybe (Ptr (FunPtr C_ClassSetPropertyFunction)) -> ClassSetPropertyFunction -> C_ClassSetPropertyFunction -- | Type for the callback on the (unwrapped) C side. type C_ExceptionHandler = Ptr Context -> Ptr Exception -> Ptr () -> IO () -- | Function used to handle JavaScript exceptions in a Context. type ExceptionHandler = Context " /@context@/: a 'GI.JavaScriptCore.Objects.Context.Context' " -> Exception " /@exception@/: a 'GI.JavaScriptCore.Objects.Exception.Exception' " -> IO () -- | Function used to handle JavaScript exceptions in a Context. type ExceptionHandler_WithClosures = Context " /@context@/: a 'GI.JavaScriptCore.Objects.Context.Context' " -> Exception " /@exception@/: a 'GI.JavaScriptCore.Objects.Exception.Exception' " -> Ptr () " /@userData@/: user data " -> IO () -- | A simple wrapper that ignores the closure arguments. drop_closures_ExceptionHandler :: ExceptionHandler -> ExceptionHandler_WithClosures -- | Given a pointer to a foreign C function, wrap it into a function -- callable from Haskell. dynamic_ExceptionHandler :: (HasCallStack, MonadIO m, IsContext a, IsException b) => FunPtr C_ExceptionHandler -> a -> b -> Ptr () -> m () -- | Wrap the callback into a GClosure. genClosure_ExceptionHandler :: MonadIO m => ExceptionHandler -> m (GClosure C_ExceptionHandler) -- | Generate a function pointer callable from C code, from a -- C_ExceptionHandler. mk_ExceptionHandler :: C_ExceptionHandler -> IO (FunPtr C_ExceptionHandler) -- | A convenience synonym for Nothing :: Maybe -- ExceptionHandler. noExceptionHandler :: Maybe ExceptionHandler -- | A convenience synonym for Nothing :: Maybe -- ExceptionHandler_WithClosures. noExceptionHandler_WithClosures :: Maybe ExceptionHandler_WithClosures -- | Wrap a ExceptionHandler into a C_ExceptionHandler. wrap_ExceptionHandler :: Maybe (Ptr (FunPtr C_ExceptionHandler)) -> ExceptionHandler_WithClosures -> C_ExceptionHandler -- | Type for the callback on the (unwrapped) C side. type C_OptionsFunc = CString -> CUInt -> CString -> Ptr () -> IO CInt -- | Function used to iterate options. -- -- Not that description string is not localized. -- -- Since: 2.24 type OptionsFunc = Text " /@option@/: the option name " -> OptionType " /@type@/: the option 'GI.JavaScriptCore.Enums.OptionType' " -> Maybe Text " /@description@/: the option description, or 'Nothing' " -> IO Bool " __Returns:__ 'True' to stop the iteration, or 'False' otherwise " -- | Function used to iterate options. -- -- Not that description string is not localized. -- -- Since: 2.24 type OptionsFunc_WithClosures = Text " /@option@/: the option name " -> OptionType " /@type@/: the option 'GI.JavaScriptCore.Enums.OptionType' " -> Maybe Text " /@description@/: the option description, or 'Nothing' " -> Ptr () " /@userData@/: user data " -> IO Bool " __Returns:__ 'True' to stop the iteration, or 'False' otherwise " -- | A simple wrapper that ignores the closure arguments. drop_closures_OptionsFunc :: OptionsFunc -> OptionsFunc_WithClosures -- | Given a pointer to a foreign C function, wrap it into a function -- callable from Haskell. dynamic_OptionsFunc :: (HasCallStack, MonadIO m) => FunPtr C_OptionsFunc -> Text -> OptionType -> Maybe Text -> Ptr () -> m Bool -- | Wrap the callback into a GClosure. genClosure_OptionsFunc :: MonadIO m => OptionsFunc -> m (GClosure C_OptionsFunc) -- | Generate a function pointer callable from C code, from a -- C_OptionsFunc. mk_OptionsFunc :: C_OptionsFunc -> IO (FunPtr C_OptionsFunc) -- | A convenience synonym for Nothing :: Maybe -- OptionsFunc. noOptionsFunc :: Maybe OptionsFunc -- | A convenience synonym for Nothing :: Maybe -- OptionsFunc_WithClosures. noOptionsFunc_WithClosures :: Maybe OptionsFunc_WithClosures -- | Wrap a OptionsFunc into a C_OptionsFunc. wrap_OptionsFunc :: Maybe (Ptr (FunPtr C_OptionsFunc)) -> OptionsFunc_WithClosures -> C_OptionsFunc module GI.JavaScriptCore.Functions -- | Returns the major version number of the JavaScriptCore library. (e.g. -- in JavaScriptCore version 1.8.3 this is 1.) -- -- This function is in the library, so it represents the JavaScriptCore -- library your code is running against. Contrast with the -- MAJOR_VERSION macro, which represents the major version of the -- JavaScriptCore headers you have included when compiling your code. getMajorVersion :: (HasCallStack, MonadIO m) => m Word32 -- | Returns the micro version number of the JavaScriptCore library. (e.g. -- in JavaScriptCore version 1.8.3 this is 3.) -- -- This function is in the library, so it represents the JavaScriptCore -- library your code is running against. Contrast with the -- MICRO_VERSION macro, which represents the micro version of the -- JavaScriptCore headers you have included when compiling your code. getMicroVersion :: (HasCallStack, MonadIO m) => m Word32 -- | Returns the minor version number of the JavaScriptCore library. (e.g. -- in JavaScriptCore version 1.8.3 this is 8.) -- -- This function is in the library, so it represents the JavaScriptCore -- library your code is running against. Contrast with the -- MINOR_VERSION macro, which represents the minor version of the -- JavaScriptCore headers you have included when compiling your code. getMinorVersion :: (HasCallStack, MonadIO m) => m Word32 -- | Iterates all available options calling function for -- each one. Iteration can stop early if function returns -- False. -- -- Since: 2.24 optionsForeach :: (HasCallStack, MonadIO m) => OptionsFunc -> m () -- | Get option as a Bool value. -- -- Since: 2.24 optionsGetBoolean :: (HasCallStack, MonadIO m) => Text -> m (Bool, Bool) -- | Get option as a gdouble value. -- -- Since: 2.24 optionsGetDouble :: (HasCallStack, MonadIO m) => Text -> m (Bool, Double) -- | Get option as a gint value. -- -- Since: 2.24 optionsGetInt :: (HasCallStack, MonadIO m) => Text -> m (Bool, Int32) -- | Create a OptionGroup to handle JSCOptions as command line -- arguments. The options will be exposed as command line arguments with -- the form -- <emphasis>--jsc-<option>=<value></emphasis>. -- Each entry in the returned OptionGroup is configured to apply -- the corresponding option during command line parsing. Applications -- only need to pass the returned group to optionContextAddGroup, -- and the rest will be taken care for automatically. -- -- Since: 2.24 optionsGetOptionGroup :: (HasCallStack, MonadIO m) => m OptionGroup -- | Get option as a range string. The string must be in -- the format -- <emphasis>[!]<low>[:<high>]</emphasis> -- where low and high are guint values. Values between -- low and high (both included) will be considered in the range, unless -- <emphasis>!</emphasis> is used to invert the range. -- -- Since: 2.24 optionsGetRangeString :: (HasCallStack, MonadIO m) => Text -> m (Bool, Text) -- | Get option as a gsize value. -- -- Since: 2.24 optionsGetSize :: (HasCallStack, MonadIO m) => Text -> m (Bool, Word64) -- | Get option as a string. -- -- Since: 2.24 optionsGetString :: (HasCallStack, MonadIO m) => Text -> m (Bool, Text) -- | Get option as a guint value. -- -- Since: 2.24 optionsGetUint :: (HasCallStack, MonadIO m) => Text -> m (Bool, Word32) -- | Set option as a Bool value. -- -- Since: 2.24 optionsSetBoolean :: (HasCallStack, MonadIO m) => Text -> Bool -> m Bool -- | Set option as a gdouble value. -- -- Since: 2.24 optionsSetDouble :: (HasCallStack, MonadIO m) => Text -> Double -> m Bool -- | Set option as a gint value. -- -- Since: 2.24 optionsSetInt :: (HasCallStack, MonadIO m) => Text -> Int32 -> m Bool -- | Set option as a range string. The string must be in -- the format -- <emphasis>[!]<low>[:<high>]</emphasis> -- where low and high are guint values. Values between -- low and high (both included) will be considered in the range, unless -- <emphasis>!</emphasis> is used to invert the range. -- -- Since: 2.24 optionsSetRangeString :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool -- | Set option as a gsize value. -- -- Since: 2.24 optionsSetSize :: (HasCallStack, MonadIO m) => Text -> Word64 -> m Bool -- | Set option as a string. -- -- Since: 2.24 optionsSetString :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool -- | Set option as a guint value. -- -- Since: 2.24 optionsSetUint :: (HasCallStack, MonadIO m) => Text -> Word32 -> m Bool -- | No description available in the introspection data. module GI.JavaScriptCore.Objects.Value -- | Memory-managed wrapper type. newtype Value Value :: ManagedPtr Value -> Value -- | Type class for types which can be safely cast to Value, for -- instance with toValue. class (GObject o, IsDescendantOf Value o) => IsValue o -- | Cast to Value, for types for which this is known to be safe. -- For general casts, use castTo. toValue :: (MonadIO m, IsValue o) => o -> m Value -- | A convenience alias for Nothing :: Maybe Value. noValue :: Maybe Value -- | Invoke <function>new</function> with constructor -- referenced by value. If nParameters is -- 0 no parameters will be passed to the constructor. valueConstructorCall :: (HasCallStack, MonadIO m, IsValue a) => a -> Maybe [Value] -> m Value -- | Call function referenced by value, passing the given -- parameters. If nParameters is 0 no -- parameters will be passed to the function. -- -- This function always returns a Value, in case of void functions -- a Value referencing <function>undefined</function> -- is returned valueFunctionCall :: (HasCallStack, MonadIO m, IsValue a) => a -> Maybe [Value] -> m Value -- | Get the Context in which value was created. valueGetContext :: (HasCallStack, MonadIO m, IsValue a) => a -> m Context -- | Get whether the value referenced by value is an array. valueIsArray :: (HasCallStack, MonadIO m, IsValue a) => a -> m Bool -- | Get whether the value referenced by value is a -- boolean. valueIsBoolean :: (HasCallStack, MonadIO m, IsValue a) => a -> m Bool -- | Get whether the value referenced by value is a -- constructor. valueIsConstructor :: (HasCallStack, MonadIO m, IsValue a) => a -> m Bool -- | Get whether the value referenced by value is a -- function valueIsFunction :: (HasCallStack, MonadIO m, IsValue a) => a -> m Bool -- | Get whether the value referenced by value is -- <function>null</function>. valueIsNull :: (HasCallStack, MonadIO m, IsValue a) => a -> m Bool -- | Get whether the value referenced by value is a number. valueIsNumber :: (HasCallStack, MonadIO m, IsValue a) => a -> m Bool -- | Get whether the value referenced by value is an -- object. valueIsObject :: (HasCallStack, MonadIO m, IsValue a) => a -> m Bool -- | Get whether the value referenced by value is a string valueIsString :: (HasCallStack, MonadIO m, IsValue a) => a -> m Bool -- | Get whether the value referenced by value is -- <function>undefined</function>. valueIsUndefined :: (HasCallStack, MonadIO m, IsValue a) => a -> m Bool -- | Create a new Value referencing an array with the items from -- array. If array is Nothing or -- empty a new empty array will be created. Elements of -- array should be pointers to a Value. valueNewArrayFromGarray :: (HasCallStack, MonadIO m, IsContext a) => a -> Maybe [Value] -> m Value -- | Create a new Value referencing an array of strings with the -- items from strv. If array is -- Nothing or empty a new empty array will be created. valueNewArrayFromStrv :: (HasCallStack, MonadIO m, IsContext a) => a -> [Text] -> m Value -- | Create a new Value from value valueNewBoolean :: (HasCallStack, MonadIO m, IsContext a) => a -> Bool -> m Value -- | Create a function in context. If name -- is Nothing an anonymous function will be created. When the -- function is called by JavaScript or -- jsc_value_function_call(), callback is -- called receiving the function parameters and then -- userData as last parameter. When the function is -- cleared in context, destroyNotify is -- called with userData as parameter. -- -- Note that the value returned by callback must be fully -- transferred. In case of boxed types, you could use -- G_TYPE_POINTER instead of the actual boxed -- GType to ensure that the instance owned by Class is -- used. If you really want to return a new copy of the boxed type, use -- JSC_TYPE_VALUE and return a Value created with -- valueNewObject that receives the copy as instance parameter. valueNewFunction :: (HasCallStack, MonadIO m, IsContext a) => a -> Maybe Text -> Callback -> GType -> Maybe [GType] -> m Value -- | Create a function in context. If name -- is Nothing an anonymous function will be created. When the -- function is called by JavaScript or -- jsc_value_function_call(), callback is -- called receiving an PtrArray of Value<!-- -->s -- with the arguments and then userData as last -- parameter. When the function is cleared in context, -- destroyNotify is called with userData -- as parameter. -- -- Note that the value returned by callback must be fully -- transferred. In case of boxed types, you could use -- G_TYPE_POINTER instead of the actual boxed -- GType to ensure that the instance owned by Class is -- used. If you really want to return a new copy of the boxed type, use -- JSC_TYPE_VALUE and return a Value created with -- valueNewObject that receives the copy as instance parameter. valueNewFunctionVariadic :: (HasCallStack, MonadIO m, IsContext a) => a -> Maybe Text -> Callback -> GType -> m Value -- | Create a new Value referencing -- <function>null</function> in context. valueNewNull :: (HasCallStack, MonadIO m, IsContext a) => a -> m Value -- | Create a new Value from number. valueNewNumber :: (HasCallStack, MonadIO m, IsContext a) => a -> Double -> m Value -- | Create a new Value from instance. If -- instance is Nothing a new empty object is -- created. When instance is provided, -- jscClass must be provided too. -- jscClass takes ownership of instance -- that will be freed by the DestroyNotify passed to -- contextRegisterClass. valueNewObject :: (HasCallStack, MonadIO m, IsContext a, IsClass b) => a -> Ptr () -> Maybe b -> m Value -- | Create a new Value from string. If you need to -- create a Value from a string containing null characters, use -- valueNewStringFromBytes instead. valueNewString :: (HasCallStack, MonadIO m, IsContext a) => a -> Maybe Text -> m Value -- | Create a new Value from bytes. valueNewStringFromBytes :: (HasCallStack, MonadIO m, IsContext a) => a -> Maybe Bytes -> m Value -- | Create a new Value referencing -- <function>undefined</function> in context. valueNewUndefined :: (HasCallStack, MonadIO m, IsContext a) => a -> m Value -- | Define or modify a property with propertyName in -- object referenced by value. When the property value -- needs to be getted or set, getter and -- setter callbacks will be called. When the property is -- cleared in the Class context, destroyNotify is -- called with userData as parameter. This is equivalent -- to JavaScript -- <function>Object.defineProperty()</function> -- when used with an accessor descriptor. -- -- Note that the value returned by getter must be fully -- transferred. In case of boxed types, you could use -- G_TYPE_POINTER instead of the actual boxed -- GType to ensure that the instance owned by Class is -- used. If you really want to return a new copy of the boxed type, use -- JSC_TYPE_VALUE and return a Value created with -- valueNewObject that receives the copy as instance parameter. valueObjectDefinePropertyAccessor :: (HasCallStack, MonadIO m, IsValue a) => a -> Text -> [ValuePropertyFlags] -> GType -> Maybe Callback -> Maybe Callback -> m () -- | Define or modify a property with propertyName in -- object referenced by value. This is equivalent to -- JavaScript -- <function>Object.defineProperty()</function> -- when used with a data descriptor. valueObjectDefinePropertyData :: (HasCallStack, MonadIO m, IsValue a, IsValue b) => a -> Text -> [ValuePropertyFlags] -> Maybe b -> m () -- | Try to delete property with name from -- value. This function will return False if the -- property was defined without ValuePropertyFlagsConfigurable -- flag. valueObjectDeleteProperty :: (HasCallStack, MonadIO m, IsValue a) => a -> Text -> m Bool -- | Get the list of property names of value. Only -- properties defined with ValuePropertyFlagsEnumerable flag will -- be collected. valueObjectEnumerateProperties :: (HasCallStack, MonadIO m, IsValue a) => a -> m (Maybe [Text]) -- | Get property with name from value. valueObjectGetProperty :: (HasCallStack, MonadIO m, IsValue a) => a -> Text -> m Value -- | Get property at index from value. valueObjectGetPropertyAtIndex :: (HasCallStack, MonadIO m, IsValue a) => a -> Word32 -> m Value -- | Get whether value has property with -- name. valueObjectHasProperty :: (HasCallStack, MonadIO m, IsValue a) => a -> Text -> m Bool -- | Invoke method with name on object referenced by -- value, passing the given parameters. -- If nParameters is 0 no parameters will be passed to -- the method. The object instance will be handled automatically even -- when the method is a custom one registered with -- jsc_class_add_method(), so it should never be passed -- explicitly as parameter of this function. -- -- This function always returns a Value, in case of void methods a -- Value referencing <function>undefined</function> is -- returned. valueObjectInvokeMethod :: (HasCallStack, MonadIO m, IsValue a) => a -> Text -> Maybe [Value] -> m Value -- | Get whether the value referenced by value is an -- instance of class name. valueObjectIsInstanceOf :: (HasCallStack, MonadIO m, IsValue a) => a -> Text -> m Bool -- | Set property with name on -- value. valueObjectSetProperty :: (HasCallStack, MonadIO m, IsValue a, IsValue b) => a -> Text -> b -> m () -- | Set property at index on -- value. valueObjectSetPropertyAtIndex :: (HasCallStack, MonadIO m, IsValue a, IsValue b) => a -> Word32 -> b -> m () -- | Convert value to a boolean. valueToBoolean :: (HasCallStack, MonadIO m, IsValue a) => a -> m Bool -- | Convert value to a double. valueToDouble :: (HasCallStack, MonadIO m, IsValue a) => a -> m Double -- | Convert value to a gint32. valueToInt32 :: (HasCallStack, MonadIO m, IsValue a) => a -> m Int32 -- | Convert value to a string. Use -- valueToStringAsBytes instead, if you need to handle strings -- containing null characters. valueToString :: (HasCallStack, MonadIO m, IsValue a) => a -> m Text -- | Convert value to a string and return the results as -- Bytes. This is needed to handle strings with null characters. valueToStringAsBytes :: (HasCallStack, MonadIO m, IsValue a) => a -> m Bytes -- | Construct a GValueConstruct with valid value for the -- “context” property. This is rarely needed directly, but it is -- used by new. constructValueContext :: (IsValue o, IsContext a) => a -> IO (GValueConstruct o) -- | Get the value of the “context” property. When -- overloading is enabled, this is equivalent to -- --
-- get value #context --getValueContext :: (MonadIO m, IsValue o) => o -> m Context instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.JavaScriptCore.Objects.Value.Value o) => GI.JavaScriptCore.Objects.Value.IsValue o instance Data.GI.Base.BasicTypes.GObject GI.JavaScriptCore.Objects.Value.Value instance Data.GI.Base.Overloading.HasParentTypes GI.JavaScriptCore.Objects.Value.Value -- | No description available in the introspection data. module GI.JavaScriptCore.Objects.VirtualMachine -- | Memory-managed wrapper type. newtype VirtualMachine VirtualMachine :: ManagedPtr VirtualMachine -> VirtualMachine -- | Type class for types which can be safely cast to -- VirtualMachine, for instance with toVirtualMachine. class (GObject o, IsDescendantOf VirtualMachine o) => IsVirtualMachine o -- | Cast to VirtualMachine, for types for which this is known to be -- safe. For general casts, use castTo. toVirtualMachine :: (MonadIO m, IsVirtualMachine o) => o -> m VirtualMachine -- | A convenience alias for Nothing :: Maybe -- VirtualMachine. noVirtualMachine :: Maybe VirtualMachine -- | Create a new VirtualMachine. virtualMachineNew :: (HasCallStack, MonadIO m) => m VirtualMachine instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.JavaScriptCore.Objects.VirtualMachine.VirtualMachine o) => GI.JavaScriptCore.Objects.VirtualMachine.IsVirtualMachine o instance Data.GI.Base.BasicTypes.GObject GI.JavaScriptCore.Objects.VirtualMachine.VirtualMachine instance Data.GI.Base.Overloading.HasParentTypes GI.JavaScriptCore.Objects.VirtualMachine.VirtualMachine -- | No description available in the introspection data. module GI.JavaScriptCore.Objects.WeakValue -- | Memory-managed wrapper type. newtype WeakValue WeakValue :: ManagedPtr WeakValue -> WeakValue -- | Type class for types which can be safely cast to WeakValue, for -- instance with toWeakValue. class (GObject o, IsDescendantOf WeakValue o) => IsWeakValue o -- | Cast to WeakValue, for types for which this is known to be -- safe. For general casts, use castTo. toWeakValue :: (MonadIO m, IsWeakValue o) => o -> m WeakValue -- | A convenience alias for Nothing :: Maybe -- WeakValue. noWeakValue :: Maybe WeakValue -- | Get a Value referencing the JavaScript value of -- weakValue. weakValueGetValue :: (HasCallStack, MonadIO m, IsWeakValue a) => a -> m Value -- | Create a new WeakValue for the JavaScript value referenced by -- value. weakValueNew :: (HasCallStack, MonadIO m, IsValue a) => a -> m WeakValue -- | Construct a GValueConstruct with valid value for the -- “value” property. This is rarely needed directly, but it is -- used by new. constructWeakValueValue :: (IsWeakValue o, IsValue a) => a -> IO (GValueConstruct o) -- | Type for the callback on the (unwrapped) C side. type C_WeakValueClearedCallback = Ptr () -> Ptr () -> IO () -- | This signal is emitted when the JavaScript value is destroyed. type WeakValueClearedCallback = IO () -- | Connect a signal handler for the “cleared” signal, to be run -- after the default handler. When overloading is enabled, this is -- equivalent to -- --
-- after weakValue #cleared callback --afterWeakValueCleared :: (IsWeakValue a, MonadIO m) => a -> WeakValueClearedCallback -> m SignalHandlerId -- | Wrap the callback into a GClosure. genClosure_WeakValueCleared :: MonadIO m => WeakValueClearedCallback -> m (GClosure C_WeakValueClearedCallback) -- | Generate a function pointer callable from C code, from a -- C_WeakValueClearedCallback. mk_WeakValueClearedCallback :: C_WeakValueClearedCallback -> IO (FunPtr C_WeakValueClearedCallback) -- | A convenience synonym for Nothing :: Maybe -- WeakValueClearedCallback. noWeakValueClearedCallback :: Maybe WeakValueClearedCallback -- | Connect a signal handler for the “cleared” signal, to be run -- before the default handler. When overloading is enabled, this -- is equivalent to -- --
-- on weakValue #cleared callback --onWeakValueCleared :: (IsWeakValue a, MonadIO m) => a -> WeakValueClearedCallback -> m SignalHandlerId -- | Wrap a WeakValueClearedCallback into a -- C_WeakValueClearedCallback. wrap_WeakValueClearedCallback :: WeakValueClearedCallback -> C_WeakValueClearedCallback instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.JavaScriptCore.Objects.WeakValue.WeakValue o) => GI.JavaScriptCore.Objects.WeakValue.IsWeakValue o instance Data.GI.Base.BasicTypes.GObject GI.JavaScriptCore.Objects.WeakValue.WeakValue instance Data.GI.Base.Overloading.HasParentTypes GI.JavaScriptCore.Objects.WeakValue.WeakValue -- | No description available in the introspection data. module GI.JavaScriptCore.Objects.Context -- | Memory-managed wrapper type. newtype Context Context :: ManagedPtr Context -> Context -- | Type class for types which can be safely cast to Context, for -- instance with toContext. class (GObject o, IsDescendantOf Context o) => IsContext o -- | Cast to Context, for types for which this is known to be safe. -- For general casts, use castTo. toContext :: (MonadIO m, IsContext o) => o -> m Context -- | A convenience alias for Nothing :: Maybe Context. noContext :: Maybe Context -- | Check the given code in context for -- syntax errors. The lineNumber is the starting line -- number in uri; the value is one-based so the first -- line is 1. uri and lineNumber are only -- used to fill the exception. In case of errors -- exception will be set to a new Exception with -- the details. You can pass Nothing to exception -- to ignore the error details. contextCheckSyntax :: (HasCallStack, MonadIO m, IsContext a) => a -> Text -> Int64 -> CheckSyntaxMode -> Text -> Word32 -> m (CheckSyntaxResult, Exception) -- | Clear the uncaught exception in context if any. contextClearException :: (HasCallStack, MonadIO m, IsContext a) => a -> m () -- | Evaluate code in context. contextEvaluate :: (HasCallStack, MonadIO m, IsContext a) => a -> Text -> Int64 -> m Value -- | Evaluate code and create an new object where symbols -- defined in code will be added as properties, instead -- of being added to context global object. The new -- object is returned as object parameter. Similar to how -- valueNewObject works, if objectInstance is not -- Nothing objectClass must be provided too. The -- lineNumber is the starting line number in -- uri; the value is one-based so the first line is 1. -- uri and lineNumber will be shown in -- exceptions and they don't affect the behavior of the script. contextEvaluateInObject :: (HasCallStack, MonadIO m, IsContext a, IsClass b) => a -> Text -> Int64 -> Ptr () -> Maybe b -> Text -> Word32 -> m (Value, Value) -- | Evaluate code in context using -- uri as the source URI. The lineNumber -- is the starting line number in uri; the value is -- one-based so the first line is 1. uri and -- lineNumber will be shown in exceptions and they don't -- affect the behavior of the script. contextEvaluateWithSourceUri :: (HasCallStack, MonadIO m, IsContext a) => a -> Text -> Int64 -> Text -> Word32 -> m Value -- | Get the Context that is currently executing a function. This -- should only be called within a function or method callback, otherwise -- Nothing will be returned. contextGetCurrent :: (HasCallStack, MonadIO m) => m (Maybe Context) -- | Get the last unhandled exception thrown in context by -- API functions calls. contextGetException :: (HasCallStack, MonadIO m, IsContext a) => a -> m (Maybe Exception) -- | Get a Value referencing the context global -- object contextGetGlobalObject :: (HasCallStack, MonadIO m, IsContext a) => a -> m Value -- | Get a property of context global object with -- name. contextGetValue :: (HasCallStack, MonadIO m, IsContext a) => a -> Text -> m Value -- | Get the VirtualMachine where context was -- created. contextGetVirtualMachine :: (HasCallStack, MonadIO m, IsContext a) => a -> m VirtualMachine -- | Create a new Context. The context is created in a new -- VirtualMachine. Use contextNewWithVirtualMachine to -- create a new Context in an existing VirtualMachine. contextNew :: (HasCallStack, MonadIO m) => m Context -- | Create a new Context in virtualMachine. contextNewWithVirtualMachine :: (HasCallStack, MonadIO m, IsVirtualMachine a) => a -> m Context -- | Remove the last ExceptionHandler previously pushed to -- context with contextPushExceptionHandler. contextPopExceptionHandler :: (HasCallStack, MonadIO m, IsContext a) => a -> m () -- | Push an exception handler in context. Whenever a -- JavaScript exception happens in the Context, the given -- handler will be called. The default -- ExceptionHandler simply calls contextThrowException to -- throw the exception to the Context. If you don't want to catch -- the exception, but only get notified about it, call -- contextThrowException in handler like the -- default one does. The last exception handler pushed is the only one -- used by the Context, use contextPopExceptionHandler to -- remove it and set the previous one. When handler is -- removed from the context, destroyNotify i called with -- userData as parameter. contextPushExceptionHandler :: (HasCallStack, MonadIO m, IsContext a) => a -> ExceptionHandler -> m () -- | Register a custom class in context using the given -- name. If the new class inherits from another -- Class, the parent should be passed as -- parentClass, otherwise Nothing should be used. -- The optional vtable parameter allows to provide a -- custom implementation for handling the class, for example, to handle -- external properties not added to the prototype. When an instance of -- the Class is cleared in the context, -- destroyNotify is called with the instance as -- parameter. contextRegisterClass :: (HasCallStack, MonadIO m, IsContext a, IsClass b) => a -> Text -> Maybe b -> Maybe ClassVTable -> Maybe DestroyNotify -> m Class -- | Set a property of context global object with -- name and value. contextSetValue :: (HasCallStack, MonadIO m, IsContext a, IsValue b) => a -> Text -> b -> m () -- | Throw an exception to context using the given error -- message. The created Exception can be retrieved with -- contextGetException. contextThrow :: (HasCallStack, MonadIO m, IsContext a) => a -> Text -> m () -- | Throw exception to context. contextThrowException :: (HasCallStack, MonadIO m, IsContext a, IsException b) => a -> b -> m () -- | Throw an exception to context using the given error -- name and message. The created Exception can be retrieved with -- contextGetException. contextThrowWithName :: (HasCallStack, MonadIO m, IsContext a) => a -> Text -> Text -> m () -- | Construct a GValueConstruct with valid value for the -- “virtual-machine” property. This is rarely needed directly, -- but it is used by new. constructContextVirtualMachine :: (IsContext o, IsVirtualMachine a) => a -> IO (GValueConstruct o) -- | Get the value of the “virtual-machine” property. When -- overloading is enabled, this is equivalent to -- --
-- get context #virtualMachine --getContextVirtualMachine :: (MonadIO m, IsContext o) => o -> m VirtualMachine instance (Data.GI.Base.BasicTypes.GObject o, Data.GI.Base.Overloading.IsDescendantOf GI.JavaScriptCore.Objects.Context.Context o) => GI.JavaScriptCore.Objects.Context.IsContext o instance Data.GI.Base.BasicTypes.GObject GI.JavaScriptCore.Objects.Context.Context instance Data.GI.Base.Overloading.HasParentTypes GI.JavaScriptCore.Objects.Context.Context module GI.JavaScriptCore.Objects -- | Virtual table for a JSCClass. This can be optionally used when -- registering a Class in a Context to provide a custom -- implementation for the class. All virtual functions are optional and -- can be set to Nothing to fallback to the default -- implementation. module GI.JavaScriptCore.Structs.ClassVTable -- | Memory-managed wrapper type. newtype ClassVTable ClassVTable :: ManagedPtr ClassVTable -> ClassVTable -- | Construct a ClassVTable struct initialized to zero. newZeroClassVTable :: MonadIO m => m ClassVTable -- | A convenience alias for Nothing :: Maybe -- ClassVTable. noClassVTable :: Maybe ClassVTable -- | Set the value of the “delete_property” field to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #deleteProperty --clearClassVTableDeleteProperty :: MonadIO m => ClassVTable -> m () -- | Get the value of the “delete_property” field. When -- overloading is enabled, this is equivalent to -- --
-- get classVTable #deleteProperty --getClassVTableDeleteProperty :: MonadIO m => ClassVTable -> m (Maybe ClassDeletePropertyFunction) -- | Set the value of the “delete_property” field. When -- overloading is enabled, this is equivalent to -- --
-- set classVTable [ #deleteProperty := value ] --setClassVTableDeleteProperty :: MonadIO m => ClassVTable -> FunPtr C_ClassDeletePropertyFunction -> m () -- | Set the value of the “enumerate_properties” field to -- Nothing. When overloading is enabled, this is equivalent -- to -- --
-- clear #enumerateProperties --clearClassVTableEnumerateProperties :: MonadIO m => ClassVTable -> m () -- | Get the value of the “enumerate_properties” field. When -- overloading is enabled, this is equivalent to -- --
-- get classVTable #enumerateProperties --getClassVTableEnumerateProperties :: MonadIO m => ClassVTable -> m (Maybe ClassEnumeratePropertiesFunction) -- | Set the value of the “enumerate_properties” field. When -- overloading is enabled, this is equivalent to -- --
-- set classVTable [ #enumerateProperties := value ] --setClassVTableEnumerateProperties :: MonadIO m => ClassVTable -> FunPtr C_ClassEnumeratePropertiesFunction -> m () -- | Set the value of the “get_property” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #getProperty --clearClassVTableGetProperty :: MonadIO m => ClassVTable -> m () -- | Get the value of the “get_property” field. When -- overloading is enabled, this is equivalent to -- --
-- get classVTable #getProperty --getClassVTableGetProperty :: MonadIO m => ClassVTable -> m (Maybe ClassGetPropertyFunction) -- | Set the value of the “get_property” field. When -- overloading is enabled, this is equivalent to -- --
-- set classVTable [ #getProperty := value ] --setClassVTableGetProperty :: MonadIO m => ClassVTable -> FunPtr C_ClassGetPropertyFunction -> m () -- | Set the value of the “has_property” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #hasProperty --clearClassVTableHasProperty :: MonadIO m => ClassVTable -> m () -- | Get the value of the “has_property” field. When -- overloading is enabled, this is equivalent to -- --
-- get classVTable #hasProperty --getClassVTableHasProperty :: MonadIO m => ClassVTable -> m (Maybe ClassHasPropertyFunction) -- | Set the value of the “has_property” field. When -- overloading is enabled, this is equivalent to -- --
-- set classVTable [ #hasProperty := value ] --setClassVTableHasProperty :: MonadIO m => ClassVTable -> FunPtr C_ClassHasPropertyFunction -> m () -- | Set the value of the “set_property” field to Nothing. -- When overloading is enabled, this is equivalent to -- --
-- clear #setProperty --clearClassVTableSetProperty :: MonadIO m => ClassVTable -> m () -- | Get the value of the “set_property” field. When -- overloading is enabled, this is equivalent to -- --
-- get classVTable #setProperty --getClassVTableSetProperty :: MonadIO m => ClassVTable -> m (Maybe ClassSetPropertyFunction) -- | Set the value of the “set_property” field. When -- overloading is enabled, this is equivalent to -- --
-- set classVTable [ #setProperty := value ] --setClassVTableSetProperty :: MonadIO m => ClassVTable -> FunPtr C_ClassSetPropertyFunction -> m () instance Data.GI.Base.BasicTypes.WrappedPtr GI.JavaScriptCore.Structs.ClassVTable.ClassVTable instance (tag Data.Type.Equality.~ 'Data.GI.Base.Attributes.AttrSet) => Data.GI.Base.Constructible.Constructible GI.JavaScriptCore.Structs.ClassVTable.ClassVTable tag module GI.JavaScriptCore.Structs module GI.JavaScriptCore