File: gmodule2.pas

package info (click to toggle)
gtk3bindings 0.1.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,676 kB
  • sloc: pascal: 74,064; makefile: 26
file content (142 lines) | stat: -rw-r--r-- 4,853 bytes parent folder | download | duplicates (4)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{ This is an autogenerated unit using gobject introspection (gir2pascal). Do not Edit. }
unit GModule2;

{$MODE OBJFPC}{$H+}

{$PACKRECORDS C}
{$MODESWITCH DUPLICATELOCALS+}

{$ifdef Unix}
{$LINKLIB libgmodule-2.0.so.0}
{$endif}
{$WARN 3031 off : Values in enumeration types have to be ascending}
interface
uses
  CTypes, GLib2;

const
  {$ifdef MsWindows}
  GModule2_library = 'libgmodule-2.0.so.dll';
  {$else}
  GModule2_library = 'libgmodule-2.0.so.0';
  {$endif}

  G_MODULE_IMPL_AR = 7;
  G_MODULE_IMPL_DL = 1;
  G_MODULE_IMPL_NONE = 0;
  G_MODULE_IMPL_WIN32 = 3;
type


  { TGModuleFlags }
  PPGModuleFlags = ^PGModuleFlags;
  PGModuleFlags = ^TGModuleFlags;
  TGModuleFlagsIdx = (
    TGModuleFlagsIdxMinValue = 0,
    G_MODULE_BIND_LAZY = 0,
    G_MODULE_BIND_LOCAL = 1,
    TGModuleFlagsIdxMaxValue = 31
  );
  TGModuleFlags = Set of TGModuleFlagsIdx;

const
  G_MODULE_BIND_MASK = [
    G_MODULE_BIND_LAZY,
    G_MODULE_BIND_LOCAL
  ]; {3 = $00000003}


type


  { TGModuleError }
  PPGModuleError = ^PGModuleError;
  PGModuleError = ^TGModuleError;
  TGModuleError = (
    TGModuleErrorMinValue = -$7FFFFFFF,
    G_MODULE_ERROR_FAILED = 0,
    G_MODULE_ERROR_CHECK_FAILED = 1,
    TGModuleErrorMaxValue = $7FFFFFFF
  );


  { TGModule }
  PPGModule = ^PGModule;
  PGModule = ^TGModule;
  TGModule = object
    function close: gboolean; cdecl; inline;
    procedure make_resident; cdecl; inline;
    function name: Pgchar; cdecl; inline;
    function symbol(symbol_name: Pgchar; symbol: Pgpointer): gboolean; cdecl; inline;
    function build_path(directory: Pgchar; module_name: Pgchar): Pgchar; cdecl; inline; static; deprecated 'Use g_module_open() instead with @module_name as the basename of the file_name argument. See %G_MODULE_SUFFIX for why.';
    function error: Pgchar; cdecl; inline; static;
    function error_quark: TGQuark; cdecl; inline; static;
    function open(file_name: Pgchar; flags: TGModuleFlags): PGModule; cdecl; inline; static;
    function open_full(file_name: Pgchar; flags: TGModuleFlags; error: PPGError): PGModule; cdecl; inline; static;
    function supported: gboolean; cdecl; inline; static;
  end;
  TGModuleCheckInit = function(module: PGModule): Pgchar; cdecl;
  TGModuleUnload = procedure(module: PGModule); cdecl;

function g_module_build_path(directory: Pgchar; module_name: Pgchar): Pgchar; cdecl; external GModule2_library name 'g_module_build_path'; deprecated 'Use g_module_open() instead with @module_name as the basename of the file_name argument. See %G_MODULE_SUFFIX for why.';
function g_module_close(module: PGModule): gboolean; cdecl; external GModule2_library name 'g_module_close';
function g_module_error: Pgchar; cdecl; external GModule2_library name 'g_module_error';
function g_module_error_quark: TGQuark; cdecl; external GModule2_library name 'g_module_error_quark';
function g_module_name(module: PGModule): Pgchar; cdecl; external GModule2_library name 'g_module_name';
function g_module_open(file_name: Pgchar; flags: TGModuleFlags): PGModule; cdecl; external GModule2_library name 'g_module_open';
function g_module_open_full(file_name: Pgchar; flags: TGModuleFlags; error: PPGError): PGModule; cdecl; external GModule2_library name 'g_module_open_full';
function g_module_supported: gboolean; cdecl; external GModule2_library name 'g_module_supported';
function g_module_symbol(module: PGModule; symbol_name: Pgchar; symbol: Pgpointer): gboolean; cdecl; external GModule2_library name 'g_module_symbol';
procedure g_module_make_resident(module: PGModule); cdecl; external GModule2_library name 'g_module_make_resident';
implementation
function TGModule.close: gboolean; cdecl;
begin
  Result := GModule2.g_module_close(@self);
end;

procedure TGModule.make_resident; cdecl;
begin
  GModule2.g_module_make_resident(@self);
end;

function TGModule.name: Pgchar; cdecl;
begin
  Result := GModule2.g_module_name(@self);
end;

function TGModule.symbol(symbol_name: Pgchar; symbol: Pgpointer): gboolean; cdecl;
begin
  Result := GModule2.g_module_symbol(@self, symbol_name, symbol);
end;

function TGModule.build_path(directory: Pgchar; module_name: Pgchar): Pgchar; cdecl;
begin
  Result := GModule2.g_module_build_path(directory, module_name);
end;

function TGModule.error: Pgchar; cdecl;
begin
  Result := GModule2.g_module_error();
end;

function TGModule.error_quark: TGQuark; cdecl;
begin
  Result := GModule2.g_module_error_quark();
end;

function TGModule.open(file_name: Pgchar; flags: TGModuleFlags): PGModule; cdecl;
begin
  Result := GModule2.g_module_open(file_name, flags);
end;

function TGModule.open_full(file_name: Pgchar; flags: TGModuleFlags; error: PPGError): PGModule; cdecl;
begin
  Result := GModule2.g_module_open_full(file_name, flags, error);
end;

function TGModule.supported: gboolean; cdecl;
begin
  Result := GModule2.g_module_supported();
end;

end.