Merge branch 'GtkPartialMerge' into 'main'

GTK3: Updated GModule2 unit generated with new gir2pas version.

See merge request freepascal.org/lazarus/lazarus!190
This commit is contained in:
Maxim Ganetsky 2023-06-03 11:50:43 +00:00
commit 7e8aff03a4

View File

@ -21,17 +21,28 @@ const
{$endif} {$endif}
type type
TGModuleFlags = Integer; TGModuleFlags = (
const TGModuleFlagsMinValue = -$7FFFFFFF,
{ GModuleFlags } G_MODULE_BIND_LAZY = 1,
G_MODULE_BIND_LAZY: TGModuleFlags = 1; G_MODULE_BIND_LOCAL = 2,
G_MODULE_BIND_LOCAL: TGModuleFlags = 2; G_MODULE_BIND_MASK = 3,
G_MODULE_BIND_MASK: TGModuleFlags = 3; TGModuleFlagsMaxValue = $7FFFFFFF
);
TGModuleError = (
TGModuleErrorMinValue = -$7FFFFFFF,
G_MODULE_ERROR_FAILED = 0,
G_MODULE_ERROR_CHECK_FAILED = 1,
TGModuleErrorMaxValue = $7FFFFFFF
);
type type
{ TGModule }
PPGModule = ^PGModule; PPGModule = ^PGModule;
PGModule = ^TGModule; PGModule = ^TGModule;
{ TGModuleFlags }
PPGModuleFlags = ^PGModuleFlags; PPGModuleFlags = ^PGModuleFlags;
PGModuleFlags = ^TGModuleFlags; PGModuleFlags = ^TGModuleFlags;
TGModule = object TGModule = object
@ -39,15 +50,18 @@ type
procedure make_resident; cdecl; inline; procedure make_resident; cdecl; inline;
function name: Pgchar; cdecl; inline; function name: Pgchar; cdecl; inline;
function symbol(symbol_name: Pgchar; symbol: Pgpointer): gboolean; cdecl; inline; function symbol(symbol_name: Pgchar; symbol: Pgpointer): gboolean; cdecl; inline;
function build_path(directory: Pgchar; module_name: Pgchar): Pgchar; cdecl; inline; static;
function error: Pgchar; cdecl; inline; static; function error: Pgchar; cdecl; inline; static;
function open(file_name: Pgchar; flags: TGModuleFlags): PGModule; cdecl; inline; static; function open(file_name: Pgchar; flags: TGModuleFlags): PGModule; cdecl; inline; static;
function supported: gboolean; cdecl; inline; static; function supported: gboolean; cdecl; inline; static;
end; end;
TGModuleCheckInit = function(module: PGModule): Pgchar; cdecl; TGModuleCheckInit = function(module: PGModule): Pgchar; cdecl;
{ TGModuleError }
PPGModuleError = ^PGModuleError;
PGModuleError = ^TGModuleError;
TGModuleUnload = procedure(module: PGModule); cdecl; TGModuleUnload = procedure(module: PGModule); cdecl;
function g_module_build_path(directory: Pgchar; module_name: Pgchar): Pgchar; cdecl; external;
function g_module_close(module: PGModule): gboolean; cdecl; external; function g_module_close(module: PGModule): gboolean; cdecl; external;
function g_module_error: Pgchar; cdecl; external; function g_module_error: Pgchar; cdecl; external;
function g_module_name(module: PGModule): Pgchar; cdecl; external; function g_module_name(module: PGModule): Pgchar; cdecl; external;
@ -76,11 +90,6 @@ begin
Result := LazGModule2.g_module_symbol(@self, symbol_name, symbol); Result := LazGModule2.g_module_symbol(@self, symbol_name, symbol);
end; end;
function TGModule.build_path(directory: Pgchar; module_name: Pgchar): Pgchar; cdecl;
begin
Result := LazGModule2.g_module_build_path(directory, module_name);
end;
function TGModule.error: Pgchar; cdecl; function TGModule.error: Pgchar; cdecl;
begin begin
Result := LazGModule2.g_module_error(); Result := LazGModule2.g_module_error();
@ -96,4 +105,4 @@ begin
Result := LazGModule2.g_module_supported(); Result := LazGModule2.g_module_supported();
end; end;
end. end.