Linux开发之Delphi FMXLinux(二)、Delphi对Linux操作系统内核态主要的Api封装(FMUX.Api.pas)

目录

Linux开发之Delphi FMXLinux(二)、Delphi对Linux操作系统内核态主要的Api封装(FMUX.Api.pas)

1、代码的版权(比较新的代码库):

2、依赖:

3、其中提供了这些功能:

      首先,动态链接库libfmux**.so的头文件定义,在哪里找?

      3.3.1.1、全局常量、匿名方法类型参照其变量

      3.3.1.3、本单元的初始化(FMXLinux应用程序的内核态的初始化:即与Linux操作系统对接的那部分)

      3.3.1.4、API方法的使用

      3.3.1.4.1、函数FmuxOpenFile

      3.3.1.4.2、函数FmuxOpenUrl

      3.3.1.5、 以上,仅仅示例,具体详细信息请查看头文件中关于数据类型、参数及其公开的默认值、方法声明的详细定义:

本博客关联:

      上一篇:  Linux开发之Delphi FMXLinux(一)、概述


 

 

Linux开发之Delphi FMXLinux(二)、Delphi对Linux操作系统内核态主要的Api封装(FMUX.Api.pas)

 

1、代码的版权(比较新的代码库):

{*******************************************************}
{                                                       }
{              Linux FireMonkey Platform                }
{                                                       }
{          Copyright(c) 2017-2019 Eugene Kryukov. 	}
{              All rights reserved                      }
{                                                       }
{*******************************************************}

2、依赖:

uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.IOUtils, FMX.Types, FMX.Graphics;

      看出:FMXLinux并非完全独立于FMX的,既是1个依赖RAD的全新的工具链,又针对FMX提供了全方位Linux的扩展实现,基本依赖是基本类型定义FMX.Types和基本的图形库FMX.Graphics 。

3、其中提供了这些功能:

      首先,动态链接库libfmux**.so的头文件定义,在哪里找?

          虽然单元文件已经给出了函数及过程的参数初步描述,但有可能你不会非常完善的使用其动态链接库及其方法:

          C:\Users\Public\Documents\Embarcadero\Studio\21.0\hpp\Linux64

      3.3.1.1、全局常量、匿名方法类型参照其变量

const
  ResName = 'fmux';         //:资源文件名前缀
  LibName = 'libfmux';      //:运行时依赖库的前缀
  LibVer = '1.52';          //:运行时依赖库的前缀后加-后的版本名,如:libfmux-1.52.so
  LibRev = '$Rev: 701 $';   //:运行时依赖库的本本的小号

const
  FMUX_INIT_NOWAYLAND   = 1;
  FMUX_INIT_NOBROADWAY   = 2;
{
  :Wayland是一个简单的“显示服务器”(Display Server),与X Window属于同一级的事物,而不是仅仅作为X Window下X Server的替代(注:X Window下分X Server和X Client)。也就是说,Wayland不仅仅是要完全取代X Window,而且它将颠覆Linux桌面上X Client/X Server的概念,以后将没有所谓的“X Client”了,而是“Wayland Client”。
https://baike.baidu.com/item/Wayland/7429696?fr=aladdin
  :Broadway:GTK-Broadway:GTK3+ 的HTML5后端:GNOME/GTK Broadway后端的内容以来,已经有一段时间了,该后端提供基于HTML5的用户界面,用于在Web浏览器中呈现。 HTML5 Broadway的工作在GTK 4.0工具包发布之前就已经开始了。Broadway后端需要对GTK4工具包的重新架构进行多次调整。 这些GTK4的改变是为了使现代基于GPU的渲染更适合OpenGL和Vulkan环境,但也使Broadway的一些变化变得更加困难,而其他领域则变得更加容易。GTK4的Broadway后端更多地使用了GTK原生CSS,将呈现节点转换为实际的DOM节点,甚至支持通过CSS进行3D转换。https://www.linuxidc.com/Linux/2019-03/157821.htm
}
type
  TFmuxWakeMainThreadProc = procedure (); cdecl;  //:Fmux唤醒应用程序主线程的匿名方法参照类
  TFmuxIdleProc = procedure (); cdecl;            //:Fmux下进程空闲Idle的匿名方法参照类

var
  FmuxInit: procedure (Flags: Integer); cdecl;         //:Fmux初始化某项标记的匿名方法类型的变量
  FmuxRun: procedure (IdleProc: TFmuxIdleProc); cdecl; //:Fmux当进程空闲Idle时做什么的匿名方法类型的变量
  FmuxTerminate: procedure ; cdecl;                    //:Fmux终止应用程序的方法
  FmuxHandleMessage: function: Boolean ; cdecl;        //:Fmux处理消息的匿名函数返回是否发消息
  FmuxWakeMainThread: procedure (Proc: TFmuxWakeMainThreadProc); cdecl;//:Fmux当唤醒应用程序主线程时做什么的匿名方法类型的变量

//:通过单元最后的代码------->进行单元初始化: initialization LoadLib;
  //:初始化libfmux.so的分发判断并抛异常 //:Linux下应当存在应用程序编译并分发后所产生的运行时依赖库libfmux-1.52.so (const LibName = 'libfmux';LibVer = '1.52';  )
  //:初始化上述变量及下述类、记录等类型及方法: 

const
  FMUX_STATE_Shift      = 1;
  FMUX_STATE_Alt        = 2;
  FMUX_STATE_CTRL       = 4;
  FMUX_STATE_LEFT       = 8;
  FMUX_STATE_RIGHT      = 16;
  FMUX_STATE_MIDDLE     = 32;
  FMUX_STATE_DOUBLE     = 64;

type
  PRectFArray = ^TRectFArray;
  TRectFArray = array [0..0] of TRectF;

  TFmuxWindowState = (Normal, Minimized, Maximized);
  TFmuxMotionKind = (Move, Down, Up, Drag, Scroll);
  TFmuxKeyKind = (Down, Up);
  TFmuxDragAction = (Over, Drop, Cancel);
  TFmuxDragOperation = (None, Move, Copy, Link);
  TFmuxGestureKind = (Zoom, Pan, Rotate, TwoFingerTap, PressAndTap, LongTap, DoubleTap);
  TFmuxGestureState = (Start, Inertia, Finish);
  TFmuxGestureData = record
    Angle, AngleDelta: Single;
    Direction: Integer;
    Offset: Single;
  end;
  TFmuxTouchKind = (TouchBegin, TouchUpdate, TouchEnd);
  TFmuxDragData = record
    Internal: Boolean;
    Files: PPChar;
    Text: PChar;
  end;

 

      3.3.1.3、本单元的初始化(FMXLinux应用程序的内核态的初始化:即与Linux操作系统对接的那部分)


procedure LoadLib;
var
  H: NativeInt;
  Msg: string;
begin
  if not GtkInstalled then  //:判断并抛出你的目标Linux操作系统是否安装有GTK 3图形库
  begin
    Msg := 'GTK 3 is required to be installed.';
    Writeln(Msg);
    raise Exception.Create(Msg)
  end;

  {$IFNDEF FMXLINUX_EXTERNAL_RUNTIME}
  DeployLib;  //:是否分发FMXLinux运行时动态库libfmux的资源文件.res及.dcu及.o
    //:Linux下应当存在应用程序编译并分发后所产生的运行时依赖库libfmux-1.52.so (const LibName = 'libfmux';LibVer = '1.52'; )
  {$ENDIF}

  H := LoadLibrary(PChar(GetLibFileName));  //:加载运行时动态库libfmux***.so到内存并返回句柄
  if H <> 0 then
  begin
    FmuxInit := GetProcAddress(H, 'FmuxInit');                      //:Fmux初始化进程
    FmuxRun := GetProcAddress(H, 'FmuxRun');                        //:Fmux进程开始运行
    FmuxTerminate := GetProcAddress(H, 'FmuxTerminate');            //:终止Fmux进程的运行
    FmuxHandleMessage := GetProcAddress(H, 'FmuxHandleMessage');    //:进程处理消息
    FmuxWakeMainThread := GetProcAddress(H, 'FmuxWakeMainThread');  //:唤醒应用程序主线程

    FmuxGetKeyState := GetProcAddress(H, 'FmuxGetKeyState');        //:捕获键盘中按键的状态

    FmuxCreateWindow := GetProcAddress(H, 'FmuxCreateWindow');      //:产生1个窗体返回其句柄指针
    FmuxDestroyWindow := GetProcAddress(H, 'FmuxDestroyWindow');    //:销毁句柄指针指向的某窗体
    FmuxSetWindowState := GetProcAddress(H, 'FmuxSetWindowState');   //:设置窗体状态
    FmuxSetWindowTitle := GetProcAddress(H, 'FmuxSetWindowTitle');   //:设置窗体的标题
    FmuxSetWindowIcon := GetProcAddress(H, 'FmuxSetWindowIcon');     //:设置窗体的Icon图标
    FmuxShowWindow := GetProcAddress(H, 'FmuxShowWindow');           //:显示某窗体
    FmuxShowModal := GetProcAddress(H, 'FmuxShowModal');
    FmuxGetClientSize := GetProcAddress(H, 'FmuxGetClientSize');
    FmuxSetClientSize := GetProcAddress(H, 'FmuxSetClientSize');
    FmuxGetWindowRect := GetProcAddress(H, 'FmuxGetWindowRect');
    FmuxSetWindowRect := GetProcAddress(H, 'FmuxSetWindowRect');
    FmuxInvalidateRect := GetProcAddress(H, 'FmuxInvalidateRect');
    FmuxProcessUpdates := GetProcAddress(H, 'FmuxProcessUpdates');
    FmuxClientToScreen := GetProcAddress(H, 'FmuxClientToScreen');
    FmuxScreenToClient := GetProcAddress(H, 'FmuxScreenToClient');
    FmuxGetWindowNativeHandle := GetProcAddress(H, 'FmuxGetWindowNativeHandle');
    FmuxGetWindowNativeDrawingHandle := GetProcAddress(H, 'FmuxGetWindowNativeDrawingHandle');
    FmuxGetWindowFullScreen := GetProcAddress(H, 'FmuxGetWindowFullScreen');
    FmuxSetWindowFullScreen := GetProcAddress(H, 'FmuxSetWindowFullScreen');

    FmuxAddGestureRecognizer := GetProcAddress(H, 'FmuxAddGestureRecognizer');
    FmuxRemoveGestureRecognizer := GetProcAddress(H, 'FmuxRemoveGestureRecognizer');

    FmuxSetCapture := GetProcAddress(H, 'FmuxSetCapture');
    FmuxReleaseCapture := GetProcAddress(H, 'FmuxReleaseCapture');

    FmuxGetScreenSize := GetProcAddress(H, 'FmuxGetScreenSize');
    FmuxGetScreenScale := GetProcAddress(H, 'FmuxGetScreenScale');
    FmuxGetWindowScale := GetProcAddress(H, 'FmuxGetWindowScale');

    FmuxAddTooltip := GetProcAddress(H, 'FmuxAddTooltip');
    FmuxRemoveTooltip := GetProcAddress(H, 'FmuxRemoveTooltip');

    FmuxCreateTimer := GetProcAddress(H, 'FmuxCreateTimer');
    FmuxDestroyTimer := GetProcAddress(H, 'FmuxDestroyTimer');

    FmuxSetClipRects := GetProcAddress(H, 'FmuxSetClipRects');
    FmuxIntersectClipRect := GetProcAddress(H, 'FmuxIntersectClipRect');
    FmuxExcludeClipRect := GetProcAddress(H, 'FmuxExcludeClipRect');
    FmuxSave := GetProcAddress(H, 'FmuxSave');
    FmuxRestore := GetProcAddress(H, 'FmuxRestore');

    FmuxCanvasSetQuality := GetProcAddress(H, 'FmuxCanvasSetQuality');
    FmuxCanvasClear := GetProcAddress(H, 'FmuxCanvasClear');
    FmuxCanvasClearRect := GetProcAddress(H, 'FmuxCanvasClearRect');
    FmuxCanvasSetMatrix := GetProcAddress(H, 'FmuxCanvasSetMatrix');
    FmuxCanvasSetFillColor := GetProcAddress(H, 'FmuxCanvasSetFillColor');
    FmuxCanvasSetFillGradient := GetProcAddress(H, 'FmuxCanvasSetFillGradient');
    FmuxCanvasSetFillRadialGradient := GetProcAddress(H, 'FmuxCanvasSetFillRadialGradient');
    FmuxCanvasSetFillBitmap := GetProcAddress(H, 'FmuxCanvasSetFillBitmap');
    FmuxCanvasEllipse := GetProcAddress(H, 'FmuxCanvasEllipse');
    FmuxCanvasRect := GetProcAddress(H, 'FmuxCanvasRect');
    FmuxCanvasLine := GetProcAddress(H, 'FmuxCanvasLine');
    FmuxCanvasPath := GetProcAddress(H, 'FmuxCanvasPath');
    FmuxCanvasFill := GetProcAddress(H, 'FmuxCanvasFill');
    FmuxCanvasStroke := GetProcAddress(H, 'FmuxCanvasStroke');
    FmuxCanvasSetStrokeWidth := GetProcAddress(H, 'FmuxCanvasSetStrokeWidth');
    FmuxCanvasSetStrokeCap := GetProcAddress(H, 'FmuxCanvasSetStrokeCap');
    FmuxCanvasSetStrokeJoin := GetProcAddress(H, 'FmuxCanvasSetStrokeJoin');
    FmuxCanvasSetStrokeDash := GetProcAddress(H, 'FmuxCanvasSetStrokeDash');
    FmuxCanvasPtInPath := GetProcAddress(H, 'FmuxCanvasPtInPath');

    FmuxBitmapCreate := GetProcAddress(H, 'FmuxBitmapCreate');
    FmuxBitmapDestroy := GetProcAddress(H, 'FmuxBitmapDestroy');
    FmuxGetBitmapInfo := GetProcAddress(H, 'FmuxGetBitmapInfo');
    FmuxCanvasDrawBitmap := GetProcAddress(H, 'FmuxCanvasDrawBitmap');

    FmuxCreateContext := GetProcAddress(H, 'FmuxCreateContext');
    FmuxDestroyContext := GetProcAddress(H, 'FmuxDestroyContext');

    FmuxBitmapLoad := GetProcAddress(H, 'FmuxBitmapLoad');
    FmuxBitmapSave := GetProcAddress(H, 'FmuxBitmapSave');

    FmuxCreateTextLayout := GetProcAddress(H, 'FmuxCreateTextLayout');
    FmuxDestroyTextLayout := GetProcAddress(H, 'FmuxDestroyTextLayout');
    FmuxDrawTextLayout := GetProcAddress(H, 'FmuxDrawTextLayout');
    FmuxGetTextLayoutRect := GetProcAddress(H, 'FmuxGetTextLayoutRect');
    FmuxLayoutPositionAtPoint := GetProcAddress(H, 'FmuxLayoutPositionAtPoint');
    FmuxLayoutMeasureRange := GetProcAddress(H, 'FmuxLayoutMeasureRange');
    FmuxLayoutToPath := GetProcAddress(H, 'FmuxLayoutToPath');
    FmuxAddCustomFont := GetProcAddress(H, 'FmuxAddCustomFont');
    FmuxGetFontCount := GetProcAddress(H, 'FmuxGetFontCount');
    FmuxGetFontName := GetProcAddress(H, 'FmuxGetFontName');

    FmuxSetLog := GetProcAddress(H, 'FmuxSetLog');

    FmuxCreateSharedContext := GetProcAddress(H, 'FmuxCreateSharedContext');
    FmuxFlushBuffer := GetProcAddress(H, 'FmuxFlushBuffer');

    FmuxGetMousePos := GetProcAddress(H, 'FmuxGetMousePos');

    FmuxCreateMainMenu := GetProcAddress(H, 'FmuxCreateMainMenu');
    FmuxCreateMenu := GetProcAddress(H, 'FmuxCreateMenu');
    FmuxCreateMenuItem := GetProcAddress(H, 'FmuxCreateMenuItem');
    FmuxMenuAddItem := GetProcAddress(H, 'FmuxMenuAddItem');
    FmuxSetSubmenu := GetProcAddress(H, 'FmuxSetSubmenu');
    FmuxUpdateMenuItem := GetProcAddress(H, 'FmuxUpdateMenuItem');

    FmuxMessageDialog := GetProcAddress(H, 'FmuxMessageDialog');
    FmuxInputQuery := GetProcAddress(H, 'FmuxInputQuery');
    FmuxFilesDialog := GetProcAddress(H, 'FmuxFilesDialog');

    FmuxClipboardHasText := GetProcAddress(H, 'FmuxClipboardHasText');
    FmuxClipboardGetText := GetProcAddress(H, 'FmuxClipboardGetText');
    FmuxClipboardSetText := GetProcAddress(H, 'FmuxClipboardSetText');
    FmuxClipboardHasImage := GetProcAddress(H, 'FmuxClipboardHasImage');
    FmuxClipboardGetImage := GetProcAddress(H, 'FmuxClipboardGetImage');
    FmuxClipboardSetImage := GetProcAddress(H, 'FmuxClipboardSetImage');

    FmuxEnumPrinters := GetProcAddress(H, 'FmuxEnumPrinters');
    FmuxIsDefaultPrinter := GetProcAddress(H, 'FmuxIsDefaultPrinter');
    FmuxGetPageSettings := GetProcAddress(H, 'FmuxGetPageSettings');
    FmuxPrintDialog := GetProcAddress(H, 'FmuxPrintDialog');
    FmuxPrinterRun := GetProcAddress(H, 'FmuxPrinterRun');
    FmuxPageSetupDialog := GetProcAddress(H, 'FmuxPageSetupDialog');
    FmuxPageSetupDefault := GetProcAddress(H, 'FmuxPageSetupDefault');
    FmuxGetOrientation := GetProcAddress(H, 'FmuxGetOrientation');
    FmuxSetOrientation := GetProcAddress(H, 'FmuxSetOrientation');

    FmuxCreatePDFContext := GetProcAddress(H, 'FmuxCreatePDFContext');
    FmuxDestroyPDFContext := GetProcAddress(H, 'FmuxDestroyPDFContext');

    FmuxBeginDoc := GetProcAddress(H, 'FmuxBeginDoc');
    FmuxAbortDoc := GetProcAddress(H, 'FmuxAbortDoc');
    FmuxEndDoc := GetProcAddress(H, 'FmuxEndDoc');
    FmuxBeginPage := GetProcAddress(H, 'FmuxBeginPage');

    FmuxSetCursor := GetProcAddress(H, 'FmuxSetCursor');

    FmuxImeEnterControl := GetProcAddress(H, 'FmuxImeEnterControl');
    FmuxImeExitControl := GetProcAddress(H, 'FmuxImeExitControl');
    FmuxImeSetCaretPos := GetProcAddress(H, 'FmuxImeSetCaretPos');

    FmuxIsWebViewInstalled := GetProcAddress(H, 'FmuxIsWebViewInstalled');
    FmuxCreateWebView := GetProcAddress(H, 'FmuxCreateWebView');
    FmuxDestroyWebView := GetProcAddress(H, 'FmuxDestroyWebView');
    FmuxWebViewShow := GetProcAddress(H, 'FmuxWebViewShow');
    FmuxWebViewSetBounds := GetProcAddress(H, 'FmuxWebViewSetBounds');
    FmuxWebViewNavigate := GetProcAddress(H, 'FmuxWebViewNavigate');
    FmuxWebViewLoadText := GetProcAddress(H, 'FmuxWebViewLoadText');
    FmuxWebViewCanGoBack := GetProcAddress(H, 'FmuxWebViewCanGoBack');
    FmuxWebViewGoBack := GetProcAddress(H, 'FmuxWebViewGoBack');
    FmuxWebViewCanGoForward := GetProcAddress(H, 'FmuxWebViewCanGoForward');
    FmuxWebViewGoForward := GetProcAddress(H, 'FmuxWebViewGoForward');
    FmuxWebViewReload := GetProcAddress(H, 'FmuxWebViewReload');
    FmuxWebViewStop := GetProcAddress(H, 'FmuxWebViewStop');
    FmuxEvaluateJavaScript := GetProcAddress(H, 'FmuxEvaluateJavaScript');
    FmuxWebViewGetUrl := GetProcAddress(H, 'FmuxWebViewGetUrl');

    FmuxGetDisplayInfo := GetProcAddress(H, 'FmuxGetDisplayInfo');
    FmuxGetDisplayFromWindow := GetProcAddress(H, 'FmuxGetDisplayFromWindow');
    FmuxGetDisplayFromPoint := GetProcAddress(H, 'FmuxGetDisplayFromPoint');

    FmuxTakeScreenshot := GetProcAddress(H, 'FmuxTakeScreenshot');

    FmuxOpenFile := GetProcAddress(H, 'FmuxOpenFile');
    FmuxOpenUrl := GetProcAddress(H, 'FmuxOpenUrl');
    FmuxGetFileIcon := GetProcAddress(H, 'FmuxGetFileIcon');
    FmuxGetFileType := GetProcAddress(H, 'FmuxGetFileType');

    FmuxMediaInstalled := GetProcAddress(H, 'FmuxMediaInstalled');
    FmuxCreateMedia := GetProcAddress(H, 'FmuxCreateMedia');
    FmuxDestroyMedia := GetProcAddress(H, 'FmuxDestroyMedia');
    FmuxMediaPlay := GetProcAddress(H, 'FmuxMediaPlay');
    FmuxMediaStop := GetProcAddress(H, 'FmuxMediaStop');
    FmuxMediaGetDuration := GetProcAddress(H, 'FmuxMediaGetDuration');
    FmuxMediaGetCurrent := GetProcAddress(H, 'FmuxMediaGetCurrent');
    FmuxMediaSetCurrent := GetProcAddress(H, 'FmuxMediaSetCurrent');
    FmuxMediaSetVisible := GetProcAddress(H, 'FmuxMediaSetVisible');
    FmuxMediaSetBounds := GetProcAddress(H, 'FmuxMediaSetBounds');
    FmuxMediaGetVideoSize := GetProcAddress(H, 'FmuxMediaGetVideoSize');
    FmuxMediaGetVolume := GetProcAddress(H, 'FmuxMediaGetVolume');
    FmuxMediaSetVolume := GetProcAddress(H, 'FmuxMediaSetVolume');
    FmuxMediaGetState := GetProcAddress(H, 'FmuxMediaGetState');

    FmuxBeginDragDrop := GetProcAddress(H, 'FmuxBeginDragDrop');

    FmuxCaptureDeviceEnum := GetProcAddress(H, 'FmuxCaptureDeviceEnum');
    FmuxStartVideoCapture := GetProcAddress(H, 'FmuxStartVideoCapture');
    FmuxStopVideoCapture := GetProcAddress(H, 'FmuxStopVideoCapture');

    FmuxGetDefaultCursor := GetProcAddress(H, 'FmuxGetDefaultCursor');
    FmuxGetCursor := GetProcAddress(H, 'FmuxGetCursor');
    FmuxGetCursorBitmap := GetProcAddress(H, 'FmuxGetCursorBitmap');

    FmuxGenMouseMove := GetProcAddress(H, 'FmuxGenMouseMove');
    FmuxGenMouseDown := GetProcAddress(H, 'FmuxGenMouseDown');
    FmuxGenMouseUp := GetProcAddress(H, 'FmuxGenMouseUp');
    FmuxGenMouseWheel := GetProcAddress(H, 'FmuxGenMouseWheel');
    FmuxGenKeyDown := GetProcAddress(H, 'FmuxGenKeyDown');
    FmuxGenKeyUp := GetProcAddress(H, 'FmuxGenKeyUp');

    FmuxGetVersionInfo := GetProcAddress(H, 'FmuxGetVersionInfo');
    FmuxSetVersionInfo := GetProcAddress(H, 'FmuxSetVersionInfo');

    FmuxEnumPaperSizes := GetProcAddress(H, 'FmuxEnumPaperSizes');

    IsWayland := GetProcAddress(H, 'IsWayland');
    IsBroadway := GetProcAddress(H, 'IsBroadway');
  end
  else
  begin
    if not FileExists(GetLibFileName) then
      Msg := 'FMX Linux requires libfmux.so'
    else
      Msg := 'Error loading libfmux.so: ' + dlerror;
    Writeln(Msg);
    raise Exception.Create(Msg)
  end;
end;

initialization
  LoadLib;
end.

      3.3.1.4、API方法的使用

      API中给了初步的方法参数的调用方法(详细见《3.3.1.5xml格式的hpp头文件定义》):

      73-566行次:


  TFmuxPaintCallback = procedure (Data: Pointer; Ctx: Pointer; Rects: PRectFArray; Count: Integer); cdecl;
  TFmuxStateChanged = procedure (Data: Pointer; State: TFmuxWindowState); cdecl;
  TFmuxBoundsChanged = procedure (Data: Pointer; NewBounds: TRectF); cdecl;
  TFmuxWindowActivate = procedure (Data: Pointer; Active: Boolean); cdecl;
  TFmuxClose = procedure (Data: Pointer); cdecl;
  TFmuxMotion = procedure (Data: Pointer; Kind: TFmuxMotionKind; X, Y: Single; State: Integer); cdecl;
  TFmuxKey = procedure (Data: Pointer; Kind: TFmuxKeyKind; Key: Word; KeyChar: Char; State: Integer); cdecl;
  TFmuxDrag = procedure (Data: Pointer; DragData: TFmuxDragData; X, Y: Single; Action: TFmuxDragAction; var Operation: TFmuxDragOperation); cdecl;
  TFmuxClosePopups = procedure (Data: Pointer); cdecl;
  TFmuxMenuAdded = procedure (Data: Pointer); cdecl;
  TFmuxGesture = procedure (Data: Pointer; Kind: TFmuxGestureKind; State: TFmuxGestureState; var Value: TFmuxGestureData); cdecl;
  TFmuxTouch = procedure (Data: Pointer; Kind: TFmuxTouchKind; X, Y: Single; Seq: NativeInt); cdecl;

  TFmuxBorderStyle = (None, Single, Sizeable, ToolWindow, SizeToolWin);

  TFmuxCreateStruct = record
    OpenGL: Boolean;
    X, Y, Width, Height: Single;
    BorderStyle: TFmuxBorderStyle;
    Transparent: Boolean;
    Popup: Boolean;
    StayOnTop: Boolean;
    Title: PChar;
    Data: Pointer;
    PaintCallback: TFmuxPaintCallback;
    BoundsChanged: TFmuxBoundsChanged;
    StateChanged: TFmuxStateChanged;
    Close: TFmuxClose;
    Motion: TFmuxMotion;
    Key: TFmuxKey;
    Activate: TFmuxWindowActivate;
    Drag: TFmuxDrag;
    SystemMenuIcon,
    MinimizeIcon,
    MaximizeIcon: Boolean;
    ClosePopups: TFmuxClosePopups;
    MenuAdded: TFmuxMenuAdded;
    Gesture: TFmuxGesture;
    Touch: TFmuxTouch;
  end;

var
  FmuxCreateWindow: function (var CreateStruct: TFmuxCreateStruct): Pointer; cdecl;
  FmuxDestroyWindow: procedure (Wnd: Pointer); cdecl;
  FmuxSetWindowState: procedure(Wnd: Pointer; AState: TFmuxWindowState); cdecl;
  FmuxSetWindowTitle: procedure (Wnd: Pointer; Title: PChar); cdecl;
  FmuxSetWindowIcon: procedure (Wnd: Pointer; Data: Pointer; Size: Integer); cdecl;
  FmuxShowWindow: procedure (Wnd: Pointer; Show: Boolean); cdecl;
  FmuxGetClientSize: procedure (Wnd: Pointer; var R: TPointF); cdecl;
  FmuxSetClientSize: procedure (Wnd: Pointer; R: TPointF); cdecl;
  FmuxGetWindowRect: procedure (Wnd: Pointer; var R: TRectF); cdecl;
  FmuxSetWindowRect: procedure (Wnd: Pointer; R: TRectF); cdecl;
  FmuxInvalidateRect: procedure (Wnd: Pointer; R: TRectF); cdecl;
  FmuxProcessUpdates: procedure (Wnd: Pointer); cdecl;
  FmuxClientToScreen: function (Wnd: Pointer; Point: TPointF): TPointF; cdecl;
  FmuxScreenToClient: function (Wnd: Pointer; Point: TPointF): TPointF; cdecl;
  FmuxGetScreenSize: function : TPointF; cdecl;
  FmuxGetScreenScale: function: Single; cdecl;
  FmuxGetWindowScale: function (Wnd: Pointer): Single; cdecl;
  FmuxGetWindowFullScreen: function (Wnd: Pointer): Boolean; cdecl;
  FmuxSetWindowFullScreen: procedure (Wnd: Pointer; AValue: Boolean); cdecl;

  FmuxSetCapture: procedure (Wnd: Pointer); cdecl;
  FmuxReleaseCapture: procedure (Wnd: Pointer); cdecl;

  // Return GTK+ handle of window
  FmuxGetWindowNativeHandle: function (Wnd: Pointer): Pointer; cdecl;
  // Return GTK+ drawingare handle of window
  FmuxGetWindowNativeDrawingHandle: function (Wnd: Pointer): Pointer; cdecl;

  FmuxAddTooltip: procedure (Wnd: Pointer; Text: PChar); cdecl;
  FmuxRemoveTooltip: procedure (Wnd: Pointer); cdecl;

  FmuxAddGestureRecognizer: procedure (Wnd: Pointer; ARec: Integer); cdecl;
  FmuxRemoveGestureRecognizer: procedure (Wnd: Pointer; ARec: Integer); cdecl;

type

  TFmuxModal = procedure (Data: Pointer; var Result: Integer); cdecl;

var
  FmuxShowModal: function (Wnd: Pointer; Proc: TFmuxModal): Integer; cdecl;

type
  TFmuxTimerProc = procedure (Data, Code: Pointer); cdecl;

  TFmuxPathPointKind = (MoveTo, LineTo, CurveTo, Close);

  PFmuxPathPoint = ^TFmuxPathPoint;
  TFmuxPathPoint = record
    Kind: TFmuxPathPointKind;
    Point: TPointF;
  end;

  PFmuxPathPointArray = ^TFmuxPathPointArray;
  TFmuxPathPointArray = array [0..0] of TFmuxPathPoint;

  PFmuxGradient = ^TFmuxGradient;
  TFmuxGradient = record
    Offset: Single;
    Color: TAlphaColor;
  end;

  PFmuxGradientArray = ^TFmuxGradientArray;
  TFmuxGradientArray = array [0..0] of TFmuxGradient;

const
  FmuxCanvasQualityDefault = 0;
  FmuxCanvasQualityHighPerformance = 1;
  FmuxCanvasQualityHighQuality = 2;

var
  FmuxGetKeyState: function : Integer; cdecl;

  FmuxCreateTimer: function (Interval: Integer; TimerFunc: TFmuxTimerProc; Data, Code: Pointer): NativeInt; cdecl;
  FmuxDestroyTimer: function (Timer: NativeInt): Boolean; cdecl;

  FmuxSetClipRects: procedure (Ctx: Pointer; const ARects: PRectF; const Count: Integer); cdecl;
  FmuxIntersectClipRect: procedure (Ctx: Pointer; const ARect: TRectF); cdecl;
  FmuxExcludeClipRect: procedure (Ctx: Pointer; const ARect: TRectF); cdecl;
  FmuxSave: procedure (Ctx: Pointer); cdecl;
  FmuxRestore: procedure (Ctx: Pointer); cdecl;

  FmuxCanvasSetQuality: procedure (Ctx: Pointer; Quality: Integer); cdecl;
  FmuxCanvasClear: procedure (Ctx: Pointer; C: TAlphaColor); cdecl;
  FmuxCanvasClearRect: procedure (Ctx: Pointer; R: TRectF; C: TAlphaColor); cdecl;
  FmuxCanvasSetMatrix: procedure (Ctx: Pointer; m11, m12, m21, m22, m31, m32: Single); cdecl;
  FmuxCanvasSetFillColor: procedure (Ctx: Pointer; C: TAlphaColor); cdecl;
  FmuxCanvasSetFillGradient: procedure (Ctx: Pointer; P1, P2: TPointF; Gradient: PFmuxGradient; Count: Integer); cdecl;
  FmuxCanvasSetFillRadialGradient: procedure (Ctx: Pointer; Center, P1, P2: TPointF; Gradient: PFmuxGradient; Count: Integer); cdecl;
  FmuxCanvasSetFillBitmap: procedure (Ctx: Pointer; Bitmap: Pointer; Rect: TRectF; Mode: Integer); cdecl;
  FmuxCanvasEllipse: procedure (Ctx: Pointer; R: TRectF); cdecl;
  FmuxCanvasRect: procedure (Ctx: Pointer; R: TRectF); cdecl;
  FmuxCanvasLine: procedure (Ctx: Pointer; APt1, APt2: TPointF); cdecl;
  FmuxCanvasPath: procedure (Ctx: Pointer; Pts: PFmuxPathPoint; Count: Integer); cdecl;
  FmuxCanvasFill: procedure (Ctx: Pointer; Opacity: Single); cdecl;
  FmuxCanvasPtInPath: function (Pt: TPointF; Pts: PFmuxPathPoint; Count: Integer): Boolean; cdecl;
  FmuxCanvasStroke: procedure (Ctx: Pointer; Opacity: Single); cdecl;
  FmuxCanvasSetStrokeWidth: procedure (Ctx: Pointer; Width: Single); cdecl;
  FmuxCanvasSetStrokeCap: procedure (Ctx: Pointer; Cap: Integer); cdecl;
  FmuxCanvasSetStrokeJoin: procedure (Ctx: Pointer; Join: Integer); cdecl;
  FmuxCanvasSetStrokeDash: procedure (Ctx: Pointer; Offset: Single; DashArray: Pointer; Length: Integer); cdecl;

  FmuxBitmapCreate: function (Width, Height: Integer; Bits: Pointer): Pointer; cdecl;
  FmuxBitmapDestroy: procedure (Bitmap: Pointer); cdecl;
  FmuxGetBitmapInfo: procedure (Bitmap: Pointer; var Width, Height: Integer; var Data: Pointer); cdecl;
  FmuxCanvasDrawBitmap: procedure (Ctx, Bitmap: Pointer; Src, Dst: TRectF; Opacity: Single; HighSpeed: Boolean); cdecl;

  FmuxCreateContext: function (Bitmap: Pointer): Pointer; cdecl;
  FmuxDestroyContext: procedure (Ctx: Pointer); cdecl;

type
  TFmuxReadFunc = function (Param: Pointer; Bits: Pointer; Length: LongWord): Integer; cdecl;
  TFmuxWriteFunc = function (Param: Pointer; Bits: Pointer; Length: LongWord): Integer; cdecl;

var
  FmuxBitmapLoad: function (ReadFunc: TFmuxReadFunc; Param: Pointer; var W, H: Integer; var Bits: Pointer): Pointer; cdecl;
  FmuxBitmapSave: function (ReadFunc: TFmuxReadFunc; Param: Pointer; W, H: Integer; Bits: Pointer; Extension: PChar): Boolean; cdecl;

type
  TFmuxFont = record
    Family: PChar;
    Size: Single;
    Weight: Integer;
    Slant: Integer;
    Underline: Boolean;
    Strikeout: Boolean;
  end;

var
  FmuxCreateTextLayout: function (Text: PChar; var Font: TFmuxFont; Width, Height: Single; Align, Trimming: Integer;
    WordWrap: Boolean): Pointer; cdecl;
  FmuxDestroyTextLayout: procedure (Layout: Pointer); cdecl;
  FmuxDrawTextLayout: procedure (Ctx, Layout: Pointer; X, Y: Single); cdecl;
  FmuxGetTextLayoutRect: procedure (Layout: Pointer; var R: TRectF); cdecl;
  FmuxLayoutPositionAtPoint: function (Layout: Pointer; APoint: PPointF): Integer; cdecl;
  FmuxLayoutMeasureRange: function (Layout: Pointer; APos, ALength: Integer; Region: PRectF): Integer; cdecl;
  FmuxLayoutToPath: function (Layout: Pointer; Pts: PFmuxPathPoint; Count: Integer): Integer; cdecl;
  FmuxAddCustomFont: function (FileName: PChar): Integer; cdecl;
  FmuxGetFontCount: function : Integer; cdecl;
  FmuxGetFontName: function (Index: Integer): PChar; cdecl;

type
  TFmuxLog = procedure (S: PChar); cdecl;

var

  FmuxSetLog: procedure (Log: TFmuxLog); cdecl;

  FmuxCreateSharedContext: function : Pointer; cdecl;
  FmuxFlushBuffer: procedure (Wnd: Pointer; Texture: Integer); cdecl;

type

  TFmuxMenuClick = procedure (Data: Pointer); cdecl;

  PFmuxMenuItem = ^TFmuxMenuItem;
  TFmuxMenuItem = record
    Text: PChar;
    ShortCut: Integer;
    Data: Pointer;
    Visible: Boolean;
    Checked: Boolean;
    Radio: Boolean;
    Click: TFmuxMenuClick;
  end;

var

  FmuxCreateMainMenu: function (Wnd: Pointer): Pointer; cdecl;
  FmuxCreateMenu: function (Wnd: Pointer): Pointer; cdecl;
  FmuxCreateMenuItem: function (Item: PFmuxMenuItem): Pointer; cdecl;
  FmuxMenuAddItem: procedure (Menu: Pointer; Item: Pointer); cdecl;
  FmuxSetSubmenu: procedure (Item: Pointer; Menu: Pointer); cdecl;
  FmuxUpdateMenuItem: function (Item: Pointer; ItemRec: PFmuxMenuItem): Pointer; cdecl;

const
  FMUX_DGL_Warning      = 0;
  FMUX_DGL_Error        = 1;
  FMUX_DGL_Information  = 2;
  FMUX_DGL_Confirmation = 3;
  FMUX_DGL_Custom       = 4;

  FMUX_BTN_Yes          = 1;
  FMUX_BTN_No           = 2;
  FMUX_BTN_OK           = 4;
  FMUX_BTN_Cancel       = 8;
  FMUX_BTN_Abort        = 16;
  FMUX_BTN_Retry        = 32;
  FMUX_BTN_Ignore       = 64;
  FMUX_BTN_All          = 128;
  FMUX_BTN_NoToAll      = 256;
  FMUX_BTN_YesToAll     = 512;
  FMUX_BTN_Help         = 1024;
  FMUX_BTN_Close        = 2048;

var
  FmuxMessageDialog: function (AMessage: PChar; DlgType, Buttons: Integer): Integer; cdecl;
  FmuxInputQuery: function (ACaption, APromt, AValue: PChar; MaxLength: Integer): Boolean; cdecl;

function MsgDlgButtonsToButtons(Btns: TMsgDlgButtons): Integer;

const

  FMUX_FilesDialog_OPEN             = 1;
  FMUX_FilesDialog_SAVE             = 2;
  FMUX_FilesDialog_FOLDER           = 4;
  FMUX_FilesDialog_MULTY            = 8;
  FMUX_FilesDialog_OVERWRITE        = 16;

var
  FmuxFilesDialog: function (Title, Filter, InitialName, InitialDir, Files: PChar; MaxLength, FilterIndex: Integer; AOptions: Integer): Boolean; cdecl;

var
  FmuxClipboardHasText: function : Boolean; cdecl;
  FmuxClipboardGetText: function : PChar; cdecl;
  FmuxClipboardSetText: procedure (Text: PChar); cdecl;
  FmuxClipboardHasImage: function : Boolean; cdecl;
  FmuxClipboardGetImage: procedure (Data: Pointer; var W, H: Integer); cdecl;
  FmuxClipboardSetImage: procedure (Data: Pointer; W, H: Integer); cdecl;

{ Printer }

type
  TFmuxPrintersEnum = procedure (Data: Pointer; Printer: Pointer; Title: PChar); cdecl;
  TFmuxPrintProc = procedure (Page: Integer; Data, Context: Pointer); cdecl;

  TFmuxPageSettings = record
    Width: Single;
    Height: Single;
    Orientation: Integer;
    Margins: TRectF;
  end;

const
  FMUX_poPrintToFile            = 1;
  FMUX_poPageNums               = 2;
  FMUX_poSelection              = 4;
  FMUX_poWarning                = 8;
  FMUX_poHelp                   = 16;
  FMUX_poDisablePrintToFile     = 32;

var
  FmuxEnumPrinters: procedure (EnumProc: TFmuxPrintersEnum; Data: Pointer); cdecl;
  FmuxIsDefaultPrinter: function (Printer: Pointer): Boolean; cdecl;
  FmuxGetPageSettings: function (var Settings: TFmuxPageSettings): Boolean; cdecl;
  FmuxPrintDialog: function (var ACollate, APrintToFile: Boolean;
    var AFromPage, AToPage, ACopies: Integer; AMinPage, AMaxPage: Integer; var APrintRange: TPrintRange;
    AOptions: Integer): Boolean; cdecl;
  FmuxPageSetupDefault: function (var AMargin, AMinMargin: TRect; var APaperSize: TPointF;
    var AUnits: TPageMeasureUnits; AOptions: Integer): Boolean; cdecl;
  FmuxPageSetupDialog: function (var AMargin, AMinMargin: TRect; var APaperSize: TPointF;
    var AUnits: TPageMeasureUnits; AOptions: Integer): Boolean; cdecl;
  FmuxPrinterRun: function (ShowPrintDialog: Boolean; NumberOfPage: Integer; Data: Pointer; Proc: TFmuxPrintProc): Boolean; cdecl;
  FmuxGetOrientation: function : Integer; cdecl;
  FmuxSetOrientation: procedure (Orientation: Integer); cdecl;


  FmuxCreatePDFContext: function (W, H: Single): Pointer; cdecl;
  FmuxDestroyPDFContext: procedure (context: Pointer); cdecl;

  FmuxBeginDoc: function (Printer: Pointer; var Ctx: Pointer): Boolean; cdecl;
  FmuxAbortDoc: procedure (Printer: Pointer); cdecl;
  FmuxEndDoc: function (Printer: Pointer): Boolean; cdecl;
  FmuxBeginPage: function (Ctx: Pointer): Boolean; cdecl;

type
  TFmuxEnumPaperSizesProc = procedure (UserData: Pointer; Name: PChar; Width, Height: Double); cdecl;

var
  FmuxEnumPaperSizes: procedure (Printer: Pointer; EnumProc: TFmuxEnumPaperSizesProc; UserData: Pointer); cdecl;


function PrinterOptionToInt(AOptions: TPrintDialogOptions): Integer;

{ Cursors }

var
  FmuxSetCursor: procedure (Cursor: Integer); cdecl;

{ IME }

type
  TFmuxImeCommitProc = procedure (Data: Pointer; Text: PChar); cdecl;

var
  FmuxImeEnterControl: procedure (Wnd: Pointer; StartProc, ChangedProc, CommitProc: TFmuxImeCommitProc; Rect: TRect; Data: Pointer); cdecl;
  FmuxImeExitControl: procedure (Wnd: Pointer); cdecl;
  FmuxImeSetCaretPos: procedure (Value: TPoint); cdecl;

{ Monitores }

type
  PFmuxDisplayInfo = ^TFmuxDisplayInfo;
  TFmuxDisplayInfo = record
    Primary: Boolean;
    BoundsRect: TRect;
    WorkareaRect: TRect;
  end;

var
  FmuxGetDisplayInfo: function (DisplayInfo: PFmuxDisplayInfo; Index: Integer): Integer; cdecl;
  FmuxGetDisplayFromWindow: function (Wnd: Pointer): Integer; cdecl;
  FmuxGetDisplayFromPoint: function (Point: TPoint): Integer; cdecl;

  FmuxTakeScreenshot: function: Pointer; cdecl;

{ WebView }

type
  TFmuxWebProc = procedure (Data: Pointer); cdecl;

  TFmuxWebViewCallbacks = record
    LoadError: TFmuxWebProc;
    LoadStarted: TFmuxWebProc;
    LoadFinished: TFmuxWebProc;
  end;

var
  FmuxIsWebViewInstalled: function : Boolean; cdecl;
  FmuxCreateWebView: function (Data: Pointer; var Callbacks: TFmuxWebViewCallbacks): Pointer; cdecl;
  FmuxWebViewShow: procedure (WebView: Pointer; Visible: Boolean); cdecl;
  FmuxWebViewSetBounds: procedure (WebView, Parent: Pointer; Rect: TRect); cdecl;
  FmuxWebViewNavigate: procedure (WebView: Pointer; URL: PChar); cdecl;
  FmuxWebViewLoadText: procedure (WebView: Pointer; Text, URL: PChar); cdecl;
  FmuxWebViewCanGoBack: function (WebView: Pointer): Boolean; cdecl;
  FmuxWebViewGoBack: procedure (WebView: Pointer); cdecl;
  FmuxWebViewCanGoForward: function (WebView: Pointer): Boolean; cdecl;
  FmuxWebViewGoForward: procedure (WebView: Pointer); cdecl;
  FmuxWebViewReload: procedure (WebView: Pointer); cdecl;
  FmuxEvaluateJavaScript: procedure(WebView: Pointer; JavaScript: PChar); cdecl;
  FmuxWebViewGetUrl: function (WebView: Pointer): PChar; cdecl;
  FmuxWebViewStop: procedure (WebView: Pointer); cdecl;
  FmuxDestroyWebView: procedure (WebView: Pointer); cdecl;

{ Shell }

var
  FmuxOpenFile: procedure (FileName: PChar); cdecl;
  FmuxOpenUrl: procedure (Url: PChar); cdecl;
  FmuxGetFileIcon: function (FileName: PChar; Size: Integer): Pointer; cdecl;
  FmuxGetFileType: function (FileName: PChar): PChar; cdecl;

{ Media }

const
  FMUX_MEDIA_Playing = 1;
  FMUX_MEDIA_Stopped = 2;

var
  FmuxMediaInstalled: function: Boolean; cdecl;
  FmuxCreateMedia: function (FileName: PChar): Pointer; cdecl;
  FmuxDestroyMedia: procedure (Media: Pointer); cdecl;
  FmuxMediaPlay: procedure (Media: Pointer); cdecl;
  FmuxMediaStop: procedure (Media: Pointer); cdecl;
  FmuxMediaGetDuration: function (Media: Pointer): Int64; cdecl;
  FmuxMediaGetCurrent: function (Media: Pointer): Int64; cdecl;
  FmuxMediaSetCurrent: procedure (Media: Pointer; ACurrent: Int64); cdecl;
  FmuxMediaSetVisible: procedure (Media: Pointer; AVisible: Boolean); cdecl;
  FmuxMediaSetBounds: procedure (Media: Pointer; Parent: Pointer; ABounds: TRectF); cdecl;
  FmuxMediaGetVideoSize: function (Media: Pointer): TPoint; cdecl;
  FmuxMediaGetVolume: function (Media: Pointer): Single; cdecl;
  FmuxMediaSetVolume: procedure (Media: Pointer; AValue: Single); cdecl;
  FmuxMediaGetState: function (Media: Pointer): Integer; cdecl;

{ Drag and Drop }

var
  FmuxBeginDragDrop: procedure (Wnd: Pointer; Data: Pointer; Bitmap: Pointer); cdecl;

{ Video Capture }

type

  TCaptureDeviceProc = procedure (Device: Pointer; ID, Name, Desc: PChar; Default: Boolean; UserData: Pointer); cdecl;
  TSampleReadyProc = procedure (Device: Pointer; W, H: Integer; Bits: Pointer; UserData: Pointer); cdecl;

var
  FmuxCaptureDeviceEnum: procedure (EnumProc: TCaptureDeviceProc; UserData: Pointer); cdecl;
  FmuxStartVideoCapture: function (Device: Pointer; Proc: TSampleReadyProc; UserData: Pointer): Boolean; cdecl;
  FmuxStopVideoCapture: function (Device: Pointer): Boolean; cdecl;

{ Cursor }

var
  FmuxGetMousePos: function : TPointF; cdecl;
  FmuxGetDefaultCursor: function : Pointer; cdecl;
  FmuxGetCursor: function: Pointer; cdecl;
  FmuxGetCursorBitmap: function (var HotX, HotY: Integer) : Pointer; cdecl;

{ Events }

var
  FmuxGenMouseMove: function (X, Y: Single): Boolean; cdecl;
  // Button: 1 - Left, 3 - Right, 2 - Middle
  FmuxGenMouseDown: function (Button: Integer): Boolean; cdecl;
  FmuxGenMouseUp: function (Button: Integer): Boolean; cdecl;
  FmuxGenMouseWheel: function (DeltaX, DeltaY: Single): Boolean; cdecl;
  FmuxGenKeyDown: function (KeyCode: Cardinal; KeyChar: Char; State: Integer): Boolean; cdecl;
  FmuxGenKeyUp: function (KeyCode: Cardinal; KeyChar: Char; State: Integer): Boolean; cdecl;

function FmuxStateToShiftState(State: Integer): TShiftState;
function FmuxStateToButton(State: Integer): TMouseButton;
function FmuxButtonToState(Button: TMouseButton): Integer;
function FmuxShiftStateToState(State: TShiftState): Integer;

// Custom Version Info (Linux)

type
  TFmuxVersionInfo = record
    Major, Minor, Build: Cardinal;
    Extra: array [0..100] of Byte;
  end;

var
  FmuxGetVersionInfo: procedure (var VI: TFmuxVersionInfo); cdecl;
  FmuxSetVersionInfo: procedure (var VI: TFmuxVersionInfo); cdecl;

{ Utils }

var
  IsWayland: function : Boolean; cdecl;
  IsBroadway: function : Boolean; cdecl;


      比如:    FmuxOpenFile := GetProcAddress(H, 'FmuxOpenFile');加载动态运行库libfmux-1.52.so并初始化之后,我们就可以调用函数FmuxOpenFile了:

      3.3.1.4.1、函数FmuxOpenFile

  {$IFDEF LINUX}
  if OpenDialog1.Execute then
    FmuxOpenFile(PChar(OpenDialog1.FileName));
  {$ENDIF}

      3.3.1.4.2、函数FmuxOpenUrl

  {$IFDEF LINUX}
  FmuxOpenUrl(PChar('https://www.baidu.com'));
  {$ENDIF}

      ......................

      3.3.1.5、 以上,仅仅示例,具体详细信息请查看头文件中关于数据类型、参数及其公开的默认值、方法声明的详细定义:

      xml格式的hpp头文件,是对《3.3.1.4、API方法的使用》的有益的补充:

<?xml version="1.0" encoding="utf-8"?>
<namespace name="FMUX.Api" platform="Linux">
  <const name="ResName" type="string" file="FMUX.Api.pas" line="20">
    <value>
      fmux
    </value>
  </const>
  <const name="LibName" type="string" file="FMUX.Api.pas" line="21">
    <value>
      libfmux
    </value>
  </const>
  <const name="LibVer" type="string" file="FMUX.Api.pas" line="22">
    <value>
      1.52
    </value>
  </const>
  <const name="LibRev" type="string" file="FMUX.Api.pas" line="23">
    <value>
      $Rev: 701 $
    </value>
  </const>
  <const name="FMUX_INIT_NOWAYLAND" type="Integer" file="FMUX.Api.pas" line="26">
    <value>
      $1
    </value>
  </const>
  <const name="FMUX_INIT_NOBROADWAY" type="Integer" file="FMUX.Api.pas" line="27">
    <value>
      $2
    </value>
  </const>
  <variable name="FmuxInit" type="procedure(Flags: Integer)" file="FMUX.Api.pas" line="34" />
  <variable name="FmuxRun" type="procedure(IdleProc: TFmuxIdleProc)" file="FMUX.Api.pas" line="35" />
  <variable name="FmuxTerminate" type="procedure" file="FMUX.Api.pas" line="36" />
  <variable name="FmuxHandleMessage" type="function: Boolean;" file="FMUX.Api.pas" line="37" />
  <variable name="FmuxWakeMainThread" type="procedure(Proc: TFmuxWakeMainThreadProc)" file="FMUX.Api.pas" line="38" />
  <const name="FMUX_STATE_Shift" type="Integer" file="FMUX.Api.pas" line="41">
    <value>
      $1
    </value>
  </const>
  <const name="FMUX_STATE_Alt" type="Integer" file="FMUX.Api.pas" line="42">
    <value>
      $2
    </value>
  </const>
  <const name="FMUX_STATE_CTRL" type="Integer" file="FMUX.Api.pas" line="43">
    <value>
      $4
    </value>
  </const>
  <const name="FMUX_STATE_LEFT" type="Integer" file="FMUX.Api.pas" line="44">
    <value>
      $8
    </value>
  </const>
  <const name="FMUX_STATE_RIGHT" type="Integer" file="FMUX.Api.pas" line="45">
    <value>
      $10
    </value>
  </const>
  <const name="FMUX_STATE_MIDDLE" type="Integer" file="FMUX.Api.pas" line="46">
    <value>
      $20
    </value>
  </const>
  <const name="FMUX_STATE_DOUBLE" type="Integer" file="FMUX.Api.pas" line="47">
    <value>
      $40
    </value>
  </const>
  <pointer name="PRectFArray" type="TRectFArray" indircnt="1" file="FMUX.Api.pas" line="51" />
  <array name="TRectFArray" low="0" high="0">
    <element type="TRectF" />
  </array>
  <enum name="TFmuxWindowState" file="FMUX.Api.pas" line="54">
    <element value="0" name="Normal" file="FMUX.Api.pas" line="54" />
    <element value="1" name="Minimized" file="FMUX.Api.pas" line="54" />
    <element value="2" name="Maximized" file="FMUX.Api.pas" line="54" />
  </enum>
  <enum name="TFmuxMotionKind" file="FMUX.Api.pas" line="55">
    <element value="0" name="Move" file="FMUX.Api.pas" line="55" />
    <element value="1" name="Down" file="FMUX.Api.pas" line="55" />
    <element value="2" name="Up" file="FMUX.Api.pas" line="55" />
    <element value="3" name="Drag" file="FMUX.Api.pas" line="55" />
    <element value="4" name="Scroll" file="FMUX.Api.pas" line="55" />
  </enum>
  <enum name="TFmuxKeyKind" file="FMUX.Api.pas" line="56">
    <element value="0" name="Down" file="FMUX.Api.pas" line="56" />
    <element value="1" name="Up" file="FMUX.Api.pas" line="56" />
  </enum>
  <enum name="TFmuxDragAction" file="FMUX.Api.pas" line="57">
    <element value="0" name="Over" file="FMUX.Api.pas" line="57" />
    <element value="1" name="Drop" file="FMUX.Api.pas" line="57" />
    <element value="2" name="Cancel" file="FMUX.Api.pas" line="57" />
  </enum>
  <enum name="TFmuxDragOperation" file="FMUX.Api.pas" line="58">
    <element value="0" name="None" file="FMUX.Api.pas" line="58" />
    <element value="1" name="Move" file="FMUX.Api.pas" line="58" />
    <element value="2" name="Copy" file="FMUX.Api.pas" line="58" />
    <element value="3" name="Link" file="FMUX.Api.pas" line="58" />
  </enum>
  <enum name="TFmuxGestureKind" file="FMUX.Api.pas" line="59">
    <element value="0" name="Zoom" file="FMUX.Api.pas" line="59" />
    <element value="1" name="Pan" file="FMUX.Api.pas" line="59" />
    <element value="2" name="Rotate" file="FMUX.Api.pas" line="59" />
    <element value="3" name="TwoFingerTap" file="FMUX.Api.pas" line="59" />
    <element value="4" name="PressAndTap" file="FMUX.Api.pas" line="59" />
    <element value="5" name="LongTap" file="FMUX.Api.pas" line="59" />
    <element value="6" name="DoubleTap" file="FMUX.Api.pas" line="59" />
  </enum>
  <enum name="TFmuxGestureState" file="FMUX.Api.pas" line="60">
    <element value="0" name="Start" file="FMUX.Api.pas" line="60" />
    <element value="1" name="Inertia" file="FMUX.Api.pas" line="60" />
    <element value="2" name="Finish" file="FMUX.Api.pas" line="60" />
  </enum>
  <struct name="TFmuxGestureData" size="16" file="FMUX.Api.pas" line="61">
    <field name="Angle" type="Single" visibility="public" size="4" offset="0" file="FMUX.Api.pas" line="62" />
    <field name="AngleDelta" type="Single" visibility="public" size="4" offset="4" file="FMUX.Api.pas" line="62" />
    <field name="Direction" type="Integer" visibility="public" size="4" offset="8" file="FMUX.Api.pas" line="63" />
    <field name="Offset" type="Single" visibility="public" size="4" offset="12" file="FMUX.Api.pas" line="64" />
  </struct>
  <enum name="TFmuxTouchKind" file="FMUX.Api.pas" line="66">
    <element value="0" name="TouchBegin" file="FMUX.Api.pas" line="66" />
    <element value="1" name="TouchUpdate" file="FMUX.Api.pas" line="66" />
    <element value="2" name="TouchEnd" file="FMUX.Api.pas" line="66" />
  </enum>
  <struct name="TFmuxDragData" size="24" file="FMUX.Api.pas" line="67">
    <field name="Internal" type="Boolean" visibility="public" size="1" offset="0" file="FMUX.Api.pas" line="68" />
    <field name="Files" type="PPWideChar" visibility="public" size="8" offset="8" file="FMUX.Api.pas" line="69" />
    <field name="Text" type="PWideChar" visibility="public" size="8" offset="16" file="FMUX.Api.pas" line="70" />
  </struct>
  <enum name="TFmuxBorderStyle" file="FMUX.Api.pas" line="86">
    <element value="0" name="None" file="FMUX.Api.pas" line="86" />
    <element value="1" name="Single" file="FMUX.Api.pas" line="86" />
    <element value="2" name="Sizeable" file="FMUX.Api.pas" line="86" />
    <element value="3" name="ToolWindow" file="FMUX.Api.pas" line="86" />
    <element value="4" name="SizeToolWin" file="FMUX.Api.pas" line="86" />
  </enum>
  <struct name="TFmuxCreateStruct" size="152" file="FMUX.Api.pas" line="88">
    <field name="OpenGL" type="Boolean" visibility="public" size="1" offset="0" file="FMUX.Api.pas" line="89" />
    <field name="X" type="Single" visibility="public" size="4" offset="4" file="FMUX.Api.pas" line="90" />
    <field name="Y" type="Single" visibility="public" size="4" offset="8" file="FMUX.Api.pas" line="90" />
    <field name="Width" type="Single" visibility="public" size="4" offset="12" file="FMUX.Api.pas" line="90" />
    <field name="Height" type="Single" visibility="public" size="4" offset="16" file="FMUX.Api.pas" line="90" />
    <field name="BorderStyle" type="TFmuxBorderStyle" visibility="public" size="4" offset="20" file="FMUX.Api.pas" line="91" />
    <field name="Transparent" type="Boolean" visibility="public" size="1" offset="24" file="FMUX.Api.pas" line="92" />
    <field name="Popup" type="Boolean" visibility="public" size="1" offset="25" file="FMUX.Api.pas" line="93" />
    <field name="StayOnTop" type="Boolean" visibility="public" size="1" offset="26" file="FMUX.Api.pas" line="94" />
    <field name="Title" type="PWideChar" visibility="public" size="8" offset="32" file="FMUX.Api.pas" line="95" />
    <field name="Data" type="Pointer" visibility="public" size="8" offset="40" file="FMUX.Api.pas" line="96" />
    <field name="PaintCallback" type="TFmuxPaintCallback" visibility="public" size="8" offset="48" file="FMUX.Api.pas" line="97" />
    <field name="BoundsChanged" type="TFmuxBoundsChanged" visibility="public" size="8" offset="56" file="FMUX.Api.pas" line="98" />
    <field name="StateChanged" type="TFmuxStateChanged" visibility="public" size="8" offset="64" file="FMUX.Api.pas" line="99" />
    <field name="Close" type="TFmuxClose" visibility="public" size="8" offset="72" file="FMUX.Api.pas" line="100" />
    <field name="Motion" type="TFmuxMotion" visibility="public" size="8" offset="80" file="FMUX.Api.pas" line="101" />
    <field name="Key" type="TFmuxKey" visibility="public" size="8" offset="88" file="FMUX.Api.pas" line="102" />
    <field name="Activate" type="TFmuxWindowActivate" visibility="public" size="8" offset="96" file="FMUX.Api.pas" line="103" />
    <field name="Drag" type="TFmuxDrag" visibility="public" size="8" offset="104" file="FMUX.Api.pas" line="104" />
    <field name="SystemMenuIcon" type="Boolean" visibility="public" size="1" offset="112" file="FMUX.Api.pas" line="105" />
    <field name="MinimizeIcon" type="Boolean" visibility="public" size="1" offset="113" file="FMUX.Api.pas" line="106" />
    <field name="MaximizeIcon" type="Boolean" visibility="public" size="1" offset="114" file="FMUX.Api.pas" line="107" />
    <field name="ClosePopups" type="TFmuxClosePopups" visibility="public" size="8" offset="120" file="FMUX.Api.pas" line="108" />
    <field name="MenuAdded" type="TFmuxMenuAdded" visibility="public" size="8" offset="128" file="FMUX.Api.pas" line="109" />
    <field name="Gesture" type="TFmuxGesture" visibility="public" size="8" offset="136" file="FMUX.Api.pas" line="110" />
    <field name="Touch" type="TFmuxTouch" visibility="public" size="8" offset="144" file="FMUX.Api.pas" line="111" />
  </struct>
  <variable name="FmuxCreateWindow" type="function(CreateStruct: TFmuxCreateStruct): Pointer;" file="FMUX.Api.pas" line="115" />
  <variable name="FmuxDestroyWindow" type="procedure(Wnd: Pointer)" file="FMUX.Api.pas" line="116" />
  <variable name="FmuxSetWindowState" type="procedure(Wnd: Pointer; AState: TFmuxWindowState)" file="FMUX.Api.pas" line="117" />
  <variable name="FmuxSetWindowTitle" type="procedure(Wnd: Pointer; Title: PWideChar)" file="FMUX.Api.pas" line="118" />
  <variable name="FmuxSetWindowIcon" type="procedure(Wnd: Pointer; Data: Pointer; Size: Integer)" file="FMUX.Api.pas" line="119" />
  <variable name="FmuxShowWindow" type="procedure(Wnd: Pointer; Show: Boolean)" file="FMUX.Api.pas" line="120" />
  <variable name="FmuxGetClientSize" type="procedure(Wnd: Pointer; R: TPointF)" file="FMUX.Api.pas" line="121" />
  <variable name="FmuxSetClientSize" type="procedure(Wnd: Pointer; R: TPointF)" file="FMUX.Api.pas" line="122" />
  <variable name="FmuxGetWindowRect" type="procedure(Wnd: Pointer; R: TRectF)" file="FMUX.Api.pas" line="123" />
  <variable name="FmuxSetWindowRect" type="procedure(Wnd: Pointer; R: TRectF)" file="FMUX.Api.pas" line="124" />
  <variable name="FmuxInvalidateRect" type="procedure(Wnd: Pointer; R: TRectF)" file="FMUX.Api.pas" line="125" />
  <variable name="FmuxProcessUpdates" type="procedure(Wnd: Pointer)" file="FMUX.Api.pas" line="126" />
  <variable name="FmuxClientToScreen" type="function(Wnd: Pointer; Point: TPointF): TPointF;" file="FMUX.Api.pas" line="127" />
  <variable name="FmuxScreenToClient" type="function(Wnd: Pointer; Point: TPointF): TPointF;" file="FMUX.Api.pas" line="128" />
  <variable name="FmuxGetScreenSize" type="function: TPointF;" file="FMUX.Api.pas" line="129" />
  <variable name="FmuxGetScreenScale" type="function: Single;" file="FMUX.Api.pas" line="130" />
  <variable name="FmuxGetWindowScale" type="function(Wnd: Pointer): Single;" file="FMUX.Api.pas" line="131" />
  <variable name="FmuxGetWindowFullScreen" type="function(Wnd: Pointer): Boolean;" file="FMUX.Api.pas" line="132" />
  <variable name="FmuxSetWindowFullScreen" type="procedure(Wnd: Pointer; AValue: Boolean)" file="FMUX.Api.pas" line="133" />
  <variable name="FmuxSetCapture" type="procedure(Wnd: Pointer)" file="FMUX.Api.pas" line="135" />
  <variable name="FmuxReleaseCapture" type="procedure(Wnd: Pointer)" file="FMUX.Api.pas" line="136" />
  <variable name="FmuxGetWindowNativeHandle" type="function(Wnd: Pointer): Pointer;" file="FMUX.Api.pas" line="139" />
  <variable name="FmuxGetWindowNativeDrawingHandle" type="function(Wnd: Pointer): Pointer;" file="FMUX.Api.pas" line="141" />
  <variable name="FmuxAddTooltip" type="procedure(Wnd: Pointer; Text: PWideChar)" file="FMUX.Api.pas" line="143" />
  <variable name="FmuxRemoveTooltip" type="procedure(Wnd: Pointer)" file="FMUX.Api.pas" line="144" />
  <variable name="FmuxAddGestureRecognizer" type="procedure(Wnd: Pointer; ARec: Integer)" file="FMUX.Api.pas" line="146" />
  <variable name="FmuxRemoveGestureRecognizer" type="procedure(Wnd: Pointer; ARec: Integer)" file="FMUX.Api.pas" line="147" />
  <variable name="FmuxShowModal" type="function(Wnd: Pointer; Proc: TFmuxModal): Integer;" file="FMUX.Api.pas" line="154" />
  <enum name="TFmuxPathPointKind" file="FMUX.Api.pas" line="159">
    <element value="0" name="MoveTo" file="FMUX.Api.pas" line="159" />
    <element value="1" name="LineTo" file="FMUX.Api.pas" line="159" />
    <element value="2" name="CurveTo" file="FMUX.Api.pas" line="159" />
    <element value="3" name="Close" file="FMUX.Api.pas" line="159" />
  </enum>
  <pointer name="PFmuxPathPoint" type="TFmuxPathPoint" indircnt="1" file="FMUX.Api.pas" line="161" />
  <struct name="TFmuxPathPoint" size="12" file="FMUX.Api.pas" line="162">
    <field name="Kind" type="TFmuxPathPointKind" visibility="public" size="4" offset="0" file="FMUX.Api.pas" line="163" />
    <field name="Point" type="TPointF" visibility="public" size="8" offset="4" file="FMUX.Api.pas" line="164" />
  </struct>
  <pointer name="PFmuxPathPointArray" type="TFmuxPathPointArray" indircnt="1" file="FMUX.Api.pas" line="167" />
  <array name="TFmuxPathPointArray" low="0" high="0">
    <element type="TFmuxPathPoint" />
  </array>
  <pointer name="PFmuxGradient" type="TFmuxGradient" indircnt="1" file="FMUX.Api.pas" line="170" />
  <struct name="TFmuxGradient" size="8" file="FMUX.Api.pas" line="171">
    <field name="Offset" type="Single" visibility="public" size="4" offset="0" file="FMUX.Api.pas" line="172" />
    <field name="Color" type="TAlphaColor" visibility="public" size="4" offset="4" file="FMUX.Api.pas" line="173" />
  </struct>
  <pointer name="PFmuxGradientArray" type="TFmuxGradientArray" indircnt="1" file="FMUX.Api.pas" line="176" />
  <array name="TFmuxGradientArray" low="0" high="0">
    <element type="TFmuxGradient" />
  </array>
  <const name="FmuxCanvasQualityDefault" type="Integer" file="FMUX.Api.pas" line="180">
    <value>
      $0
    </value>
  </const>
  <const name="FmuxCanvasQualityHighPerformance" type="Integer" file="FMUX.Api.pas" line="181">
    <value>
      $1
    </value>
  </const>
  <const name="FmuxCanvasQualityHighQuality" type="Integer" file="FMUX.Api.pas" line="182">
    <value>
      $2
    </value>
  </const>
  <variable name="FmuxGetKeyState" type="function: Integer;" file="FMUX.Api.pas" line="185" />
  <variable name="FmuxCreateTimer" type="function(Interval: Integer; TimerFunc: TFmuxTimerProc; Data: Pointer; Code: Pointer): NativeInt;" file="FMUX.Api.pas" line="187" />
  <variable name="FmuxDestroyTimer" type="function(Timer: NativeInt): Boolean;" file="FMUX.Api.pas" line="188" />
  <variable name="FmuxSetClipRects" type="procedure(Ctx: Pointer; ARects: PRectF; Count: Integer)" file="FMUX.Api.pas" line="190" />
  <variable name="FmuxIntersectClipRect" type="procedure(Ctx: Pointer; ARect: TRectF)" file="FMUX.Api.pas" line="191" />
  <variable name="FmuxExcludeClipRect" type="procedure(Ctx: Pointer; ARect: TRectF)" file="FMUX.Api.pas" line="192" />
  <variable name="FmuxSave" type="procedure(Ctx: Pointer)" file="FMUX.Api.pas" line="193" />
  <variable name="FmuxRestore" type="procedure(Ctx: Pointer)" file="FMUX.Api.pas" line="194" />
  <variable name="FmuxCanvasSetQuality" type="procedure(Ctx: Pointer; Quality: Integer)" file="FMUX.Api.pas" line="196" />
  <variable name="FmuxCanvasClear" type="procedure(Ctx: Pointer; C: TAlphaColor)" file="FMUX.Api.pas" line="197" />
  <variable name="FmuxCanvasClearRect" type="procedure(Ctx: Pointer; R: TRectF; C: TAlphaColor)" file="FMUX.Api.pas" line="198" />
  <variable name="FmuxCanvasSetMatrix" type="procedure(Ctx: Pointer; m11: Single; m12: Single; m21: Single; m22: Single; m31: Single; m32: Single)" file="FMUX.Api.pas" line="199" />
  <variable name="FmuxCanvasSetFillColor" type="procedure(Ctx: Pointer; C: TAlphaColor)" file="FMUX.Api.pas" line="200" />
  <variable name="FmuxCanvasSetFillGradient" type="procedure(Ctx: Pointer; P1: TPointF; P2: TPointF; Gradient: PFmuxGradient; Count: Integer)" file="FMUX.Api.pas" line="201" />
  <variable name="FmuxCanvasSetFillRadialGradient" type="procedure(Ctx: Pointer; Center: TPointF; P1: TPointF; P2: TPointF; Gradient: PFmuxGradient; Count: Integer)" file="FMUX.Api.pas" line="202" />
  <variable name="FmuxCanvasSetFillBitmap" type="procedure(Ctx: Pointer; Bitmap: Pointer; Rect: TRectF; Mode: Integer)" file="FMUX.Api.pas" line="203" />
  <variable name="FmuxCanvasEllipse" type="procedure(Ctx: Pointer; R: TRectF)" file="FMUX.Api.pas" line="204" />
  <variable name="FmuxCanvasRect" type="procedure(Ctx: Pointer; R: TRectF)" file="FMUX.Api.pas" line="205" />
  <variable name="FmuxCanvasLine" type="procedure(Ctx: Pointer; APt1: TPointF; APt2: TPointF)" file="FMUX.Api.pas" line="206" />
  <variable name="FmuxCanvasPath" type="procedure(Ctx: Pointer; Pts: PFmuxPathPoint; Count: Integer)" file="FMUX.Api.pas" line="207" />
  <variable name="FmuxCanvasFill" type="procedure(Ctx: Pointer; Opacity: Single)" file="FMUX.Api.pas" line="208" />
  <variable name="FmuxCanvasPtInPath" type="function(Pt: TPointF; Pts: PFmuxPathPoint; Count: Integer): Boolean;" file="FMUX.Api.pas" line="209" />
  <variable name="FmuxCanvasStroke" type="procedure(Ctx: Pointer; Opacity: Single)" file="FMUX.Api.pas" line="210" />
  <variable name="FmuxCanvasSetStrokeWidth" type="procedure(Ctx: Pointer; Width: Single)" file="FMUX.Api.pas" line="211" />
  <variable name="FmuxCanvasSetStrokeCap" type="procedure(Ctx: Pointer; Cap: Integer)" file="FMUX.Api.pas" line="212" />
  <variable name="FmuxCanvasSetStrokeJoin" type="procedure(Ctx: Pointer; Join: Integer)" file="FMUX.Api.pas" line="213" />
  <variable name="FmuxCanvasSetStrokeDash" type="procedure(Ctx: Pointer; Offset: Single; DashArray: Pointer; Length: Integer)" file="FMUX.Api.pas" line="214" />
  <variable name="FmuxBitmapCreate" type="function(Width: Integer; Height: Integer; Bits: Pointer): Pointer;" file="FMUX.Api.pas" line="216" />
  <variable name="FmuxBitmapDestroy" type="procedure(Bitmap: Pointer)" file="FMUX.Api.pas" line="217" />
  <variable name="FmuxGetBitmapInfo" type="procedure(Bitmap: Pointer; Width: Integer; Height: Integer; Data: Pointer)" file="FMUX.Api.pas" line="218" />
  <variable name="FmuxCanvasDrawBitmap" type="procedure(Ctx: Pointer; Bitmap: Pointer; Src: TRectF; Dst: TRectF; Opacity: Single; HighSpeed: Boolean)" file="FMUX.Api.pas" line="219" />
  <variable name="FmuxCreateContext" type="function(Bitmap: Pointer): Pointer;" file="FMUX.Api.pas" line="221" />
  <variable name="FmuxDestroyContext" type="procedure(Ctx: Pointer)" file="FMUX.Api.pas" line="222" />
  <variable name="FmuxBitmapLoad" type="function(ReadFunc: TFmuxReadFunc; Param: Pointer; W: Integer; H: Integer; Bits: Pointer): Pointer;" file="FMUX.Api.pas" line="229" />
  <variable name="FmuxBitmapSave" type="function(ReadFunc: TFmuxReadFunc; Param: Pointer; W: Integer; H: Integer; Bits: Pointer; Extension: PWideChar): Boolean;" file="FMUX.Api.pas" line="230" />
  <struct name="TFmuxFont" size="24" file="FMUX.Api.pas" line="233">
    <field name="Family" type="PWideChar" visibility="public" size="8" offset="0" file="FMUX.Api.pas" line="234" />
    <field name="Size" type="Single" visibility="public" size="4" offset="8" file="FMUX.Api.pas" line="235" />
    <field name="Weight" type="Integer" visibility="public" size="4" offset="12" file="FMUX.Api.pas" line="236" />
    <field name="Slant" type="Integer" visibility="public" size="4" offset="16" file="FMUX.Api.pas" line="237" />
    <field name="Underline" type="Boolean" visibility="public" size="1" offset="20" file="FMUX.Api.pas" line="238" />
    <field name="Strikeout" type="Boolean" visibility="public" size="1" offset="21" file="FMUX.Api.pas" line="239" />
  </struct>
  <variable name="FmuxCreateTextLayout" type="function(Text: PWideChar; Font: TFmuxFont; Width: Single; Height: Single; Align: Integer; Trimming: Integer; WordWrap: Boolean): Pointer;" file="FMUX.Api.pas" line="243" />
  <variable name="FmuxDestroyTextLayout" type="procedure(Layout: Pointer)" file="FMUX.Api.pas" line="245" />
  <variable name="FmuxDrawTextLayout" type="procedure(Ctx: Pointer; Layout: Pointer; X: Single; Y: Single)" file="FMUX.Api.pas" line="246" />
  <variable name="FmuxGetTextLayoutRect" type="procedure(Layout: Pointer; R: TRectF)" file="FMUX.Api.pas" line="247" />
  <variable name="FmuxLayoutPositionAtPoint" type="function(Layout: Pointer; APoint: PPointF): Integer;" file="FMUX.Api.pas" line="248" />
  <variable name="FmuxLayoutMeasureRange" type="function(Layout: Pointer; APos: Integer; ALength: Integer; Region: PRectF): Integer;" file="FMUX.Api.pas" line="249" />
  <variable name="FmuxLayoutToPath" type="function(Layout: Pointer; Pts: PFmuxPathPoint; Count: Integer): Integer;" file="FMUX.Api.pas" line="250" />
  <variable name="FmuxAddCustomFont" type="function(FileName: PWideChar): Integer;" file="FMUX.Api.pas" line="251" />
  <variable name="FmuxGetFontCount" type="function: Integer;" file="FMUX.Api.pas" line="252" />
  <variable name="FmuxGetFontName" type="function(Index: Integer): PWideChar;" file="FMUX.Api.pas" line="253" />
  <variable name="FmuxSetLog" type="procedure(Log: TFmuxLog)" file="FMUX.Api.pas" line="260" />
  <variable name="FmuxCreateSharedContext" type="function: Pointer;" file="FMUX.Api.pas" line="262" />
  <variable name="FmuxFlushBuffer" type="procedure(Wnd: Pointer; Texture: Integer)" file="FMUX.Api.pas" line="263" />
  <pointer name="PFmuxMenuItem" type="TFmuxMenuItem" indircnt="1" file="FMUX.Api.pas" line="269" />
  <struct name="TFmuxMenuItem" size="40" file="FMUX.Api.pas" line="270">
    <field name="Text" type="PWideChar" visibility="public" size="8" offset="0" file="FMUX.Api.pas" line="271" />
    <field name="ShortCut" type="Integer" visibility="public" size="4" offset="8" file="FMUX.Api.pas" line="272" />
    <field name="Data" type="Pointer" visibility="public" size="8" offset="16" file="FMUX.Api.pas" line="273" />
    <field name="Visible" type="Boolean" visibility="public" size="1" offset="24" file="FMUX.Api.pas" line="274" />
    <field name="Checked" type="Boolean" visibility="public" size="1" offset="25" file="FMUX.Api.pas" line="275" />
    <field name="Radio" type="Boolean" visibility="public" size="1" offset="26" file="FMUX.Api.pas" line="276" />
    <field name="Click" type="TFmuxMenuClick" visibility="public" size="8" offset="32" file="FMUX.Api.pas" line="277" />
  </struct>
  <variable name="FmuxCreateMainMenu" type="function(Wnd: Pointer): Pointer;" file="FMUX.Api.pas" line="282" />
  <variable name="FmuxCreateMenu" type="function(Wnd: Pointer): Pointer;" file="FMUX.Api.pas" line="283" />
  <variable name="FmuxCreateMenuItem" type="function(Item: PFmuxMenuItem): Pointer;" file="FMUX.Api.pas" line="284" />
  <variable name="FmuxMenuAddItem" type="procedure(Menu: Pointer; Item: Pointer)" file="FMUX.Api.pas" line="285" />
  <variable name="FmuxSetSubmenu" type="procedure(Item: Pointer; Menu: Pointer)" file="FMUX.Api.pas" line="286" />
  <variable name="FmuxUpdateMenuItem" type="function(Item: Pointer; ItemRec: PFmuxMenuItem): Pointer;" file="FMUX.Api.pas" line="287" />
  <const name="FMUX_DGL_Warning" type="Integer" file="FMUX.Api.pas" line="290">
    <value>
      $0
    </value>
  </const>
  <const name="FMUX_DGL_Error" type="Integer" file="FMUX.Api.pas" line="291">
    <value>
      $1
    </value>
  </const>
  <const name="FMUX_DGL_Information" type="Integer" file="FMUX.Api.pas" line="292">
    <value>
      $2
    </value>
  </const>
  <const name="FMUX_DGL_Confirmation" type="Integer" file="FMUX.Api.pas" line="293">
    <value>
      $3
    </value>
  </const>
  <const name="FMUX_DGL_Custom" type="Integer" file="FMUX.Api.pas" line="294">
    <value>
      $4
    </value>
  </const>
  <const name="FMUX_BTN_Yes" type="Integer" file="FMUX.Api.pas" line="296">
    <value>
      $1
    </value>
  </const>
  <const name="FMUX_BTN_No" type="Integer" file="FMUX.Api.pas" line="297">
    <value>
      $2
    </value>
  </const>
  <const name="FMUX_BTN_OK" type="Integer" file="FMUX.Api.pas" line="298">
    <value>
      $4
    </value>
  </const>
  <const name="FMUX_BTN_Cancel" type="Integer" file="FMUX.Api.pas" line="299">
    <value>
      $8
    </value>
  </const>
  <const name="FMUX_BTN_Abort" type="Integer" file="FMUX.Api.pas" line="300">
    <value>
      $10
    </value>
  </const>
  <const name="FMUX_BTN_Retry" type="Integer" file="FMUX.Api.pas" line="301">
    <value>
      $20
    </value>
  </const>
  <const name="FMUX_BTN_Ignore" type="Integer" file="FMUX.Api.pas" line="302">
    <value>
      $40
    </value>
  </const>
  <const name="FMUX_BTN_All" type="Integer" file="FMUX.Api.pas" line="303">
    <value>
      $80
    </value>
  </const>
  <const name="FMUX_BTN_NoToAll" type="Integer" file="FMUX.Api.pas" line="304">
    <value>
      $100
    </value>
  </const>
  <const name="FMUX_BTN_YesToAll" type="Integer" file="FMUX.Api.pas" line="305">
    <value>
      $200
    </value>
  </const>
  <const name="FMUX_BTN_Help" type="Integer" file="FMUX.Api.pas" line="306">
    <value>
      $400
    </value>
  </const>
  <const name="FMUX_BTN_Close" type="Integer" file="FMUX.Api.pas" line="307">
    <value>
      $800
    </value>
  </const>
  <variable name="FmuxMessageDialog" type="function(AMessage: PWideChar; DlgType: Integer; Buttons: Integer): Integer;" file="FMUX.Api.pas" line="310" />
  <variable name="FmuxInputQuery" type="function(ACaption: PWideChar; APromt: PWideChar; AValue: PWideChar; MaxLength: Integer): Boolean;" file="FMUX.Api.pas" line="311" />
  <const name="FMUX_FilesDialog_OPEN" type="Integer" file="FMUX.Api.pas" line="317">
    <value>
      $1
    </value>
  </const>
  <const name="FMUX_FilesDialog_SAVE" type="Integer" file="FMUX.Api.pas" line="318">
    <value>
      $2
    </value>
  </const>
  <const name="FMUX_FilesDialog_FOLDER" type="Integer" file="FMUX.Api.pas" line="319">
    <value>
      $4
    </value>
  </const>
  <const name="FMUX_FilesDialog_MULTY" type="Integer" file="FMUX.Api.pas" line="320">
    <value>
      $8
    </value>
  </const>
  <const name="FMUX_FilesDialog_OVERWRITE" type="Integer" file="FMUX.Api.pas" line="321">
    <value>
      $10
    </value>
  </const>
  <variable name="FmuxFilesDialog" type="function(Title: PWideChar; Filter: PWideChar; InitialName: PWideChar; InitialDir: PWideChar; Files: PWideChar; MaxLength: Integer; FilterIndex: Integer; AOptions: Integer): Boolean;" file="FMUX.Api.pas" line="324" />
  <variable name="FmuxClipboardHasText" type="function: Boolean;" file="FMUX.Api.pas" line="327" />
  <variable name="FmuxClipboardGetText" type="function: PWideChar;" file="FMUX.Api.pas" line="328" />
  <variable name="FmuxClipboardSetText" type="procedure(Text: PWideChar)" file="FMUX.Api.pas" line="329" />
  <variable name="FmuxClipboardHasImage" type="function: Boolean;" file="FMUX.Api.pas" line="330" />
  <variable name="FmuxClipboardGetImage" type="procedure(Data: Pointer; W: Integer; H: Integer)" file="FMUX.Api.pas" line="331" />
  <variable name="FmuxClipboardSetImage" type="procedure(Data: Pointer; W: Integer; H: Integer)" file="FMUX.Api.pas" line="332" />
  <struct name="TFmuxPageSettings" size="28" file="FMUX.Api.pas" line="340">
    <field name="Width" type="Single" visibility="public" size="4" offset="0" file="FMUX.Api.pas" line="341" />
    <field name="Height" type="Single" visibility="public" size="4" offset="4" file="FMUX.Api.pas" line="342" />
    <field name="Orientation" type="Integer" visibility="public" size="4" offset="8" file="FMUX.Api.pas" line="343" />
    <field name="Margins" type="TRectF" visibility="public" size="16" offset="12" file="FMUX.Api.pas" line="344" />
  </struct>
  <const name="FMUX_poPrintToFile" type="Integer" file="FMUX.Api.pas" line="348">
    <value>
      $1
    </value>
  </const>
  <const name="FMUX_poPageNums" type="Integer" file="FMUX.Api.pas" line="349">
    <value>
      $2
    </value>
  </const>
  <const name="FMUX_poSelection" type="Integer" file="FMUX.Api.pas" line="350">
    <value>
      $4
    </value>
  </const>
  <const name="FMUX_poWarning" type="Integer" file="FMUX.Api.pas" line="351">
    <value>
      $8
    </value>
  </const>
  <const name="FMUX_poHelp" type="Integer" file="FMUX.Api.pas" line="352">
    <value>
      $10
    </value>
  </const>
  <const name="FMUX_poDisablePrintToFile" type="Integer" file="FMUX.Api.pas" line="353">
    <value>
      $20
    </value>
  </const>
  <variable name="FmuxEnumPrinters" type="procedure(EnumProc: TFmuxPrintersEnum; Data: Pointer)" file="FMUX.Api.pas" line="356" />
  <variable name="FmuxIsDefaultPrinter" type="function(Printer: Pointer): Boolean;" file="FMUX.Api.pas" line="357" />
  <variable name="FmuxGetPageSettings" type="function(Settings: TFmuxPageSettings): Boolean;" file="FMUX.Api.pas" line="358" />
  <variable name="FmuxPrintDialog" type="function(ACollate: Boolean; APrintToFile: Boolean; AFromPage: Integer; AToPage: Integer; ACopies: Integer; AMinPage: Integer; AMaxPage: Integer; APrintRange: TPrintRange; AOptions: Integer): Boolean;" file="FMUX.Api.pas" line="359" />
  <variable name="FmuxPageSetupDefault" type="function(AMargin: TRect; AMinMargin: TRect; APaperSize: TPointF; AUnits: TPageMeasureUnits; AOptions: Integer): Boolean;" file="FMUX.Api.pas" line="362" />
  <variable name="FmuxPageSetupDialog" type="function(AMargin: TRect; AMinMargin: TRect; APaperSize: TPointF; AUnits: TPageMeasureUnits; AOptions: Integer): Boolean;" file="FMUX.Api.pas" line="364" />
  <variable name="FmuxPrinterRun" type="function(ShowPrintDialog: Boolean; NumberOfPage: Integer; Data: Pointer; Proc: TFmuxPrintProc): Boolean;" file="FMUX.Api.pas" line="366" />
  <variable name="FmuxGetOrientation" type="function: Integer;" file="FMUX.Api.pas" line="367" />
  <variable name="FmuxSetOrientation" type="procedure(Orientation: Integer)" file="FMUX.Api.pas" line="368" />
  <variable name="FmuxCreatePDFContext" type="function(W: Single; H: Single): Pointer;" file="FMUX.Api.pas" line="371" />
  <variable name="FmuxDestroyPDFContext" type="procedure(context: Pointer)" file="FMUX.Api.pas" line="372" />
  <variable name="FmuxBeginDoc" type="function(Printer: Pointer; Ctx: Pointer): Boolean;" file="FMUX.Api.pas" line="374" />
  <variable name="FmuxAbortDoc" type="procedure(Printer: Pointer)" file="FMUX.Api.pas" line="375" />
  <variable name="FmuxEndDoc" type="function(Printer: Pointer): Boolean;" file="FMUX.Api.pas" line="376" />
  <variable name="FmuxBeginPage" type="function(Ctx: Pointer): Boolean;" file="FMUX.Api.pas" line="377" />
  <variable name="FmuxEnumPaperSizes" type="procedure(Printer: Pointer; EnumProc: TFmuxEnumPaperSizesProc; UserData: Pointer)" file="FMUX.Api.pas" line="383" />
  <variable name="FmuxSetCursor" type="procedure(Cursor: Integer)" file="FMUX.Api.pas" line="391" />
  <variable name="FmuxImeEnterControl" type="procedure(Wnd: Pointer; StartProc: TFmuxImeCommitProc; ChangedProc: TFmuxImeCommitProc; CommitProc: TFmuxImeCommitProc; Rect: TRect; Data: Pointer)" file="FMUX.Api.pas" line="399" />
  <variable name="FmuxImeExitControl" type="procedure(Wnd: Pointer)" file="FMUX.Api.pas" line="400" />
  <variable name="FmuxImeSetCaretPos" type="procedure(Value: TPoint)" file="FMUX.Api.pas" line="401" />
  <pointer name="PFmuxDisplayInfo" type="TFmuxDisplayInfo" indircnt="1" file="FMUX.Api.pas" line="406" />
  <struct name="TFmuxDisplayInfo" size="36" file="FMUX.Api.pas" line="407">
    <field name="Primary" type="Boolean" visibility="public" size="1" offset="0" file="FMUX.Api.pas" line="408" />
    <field name="BoundsRect" type="TRect" visibility="public" size="16" offset="4" file="FMUX.Api.pas" line="409" />
    <field name="WorkareaRect" type="TRect" visibility="public" size="16" offset="20" file="FMUX.Api.pas" line="410" />
  </struct>
  <variable name="FmuxGetDisplayInfo" type="function(DisplayInfo: PFmuxDisplayInfo; Index: Integer): Integer;" file="FMUX.Api.pas" line="414" />
  <variable name="FmuxGetDisplayFromWindow" type="function(Wnd: Pointer): Integer;" file="FMUX.Api.pas" line="415" />
  <variable name="FmuxGetDisplayFromPoint" type="function(Point: TPoint): Integer;" file="FMUX.Api.pas" line="416" />
  <variable name="FmuxTakeScreenshot" type="function: Pointer;" file="FMUX.Api.pas" line="418" />
  <struct name="TFmuxWebViewCallbacks" size="24" file="FMUX.Api.pas" line="425">
    <field name="LoadError" type="TFmuxWebProc" visibility="public" size="8" offset="0" file="FMUX.Api.pas" line="426" />
    <field name="LoadStarted" type="TFmuxWebProc" visibility="public" size="8" offset="8" file="FMUX.Api.pas" line="427" />
    <field name="LoadFinished" type="TFmuxWebProc" visibility="public" size="8" offset="16" file="FMUX.Api.pas" line="428" />
  </struct>
  <variable name="FmuxIsWebViewInstalled" type="function: Boolean;" file="FMUX.Api.pas" line="432" />
  <variable name="FmuxCreateWebView" type="function(Data: Pointer; Callbacks: TFmuxWebViewCallbacks): Pointer;" file="FMUX.Api.pas" line="433" />
  <variable name="FmuxWebViewShow" type="procedure(WebView: Pointer; Visible: Boolean)" file="FMUX.Api.pas" line="434" />
  <variable name="FmuxWebViewSetBounds" type="procedure(WebView: Pointer; Parent: Pointer; Rect: TRect)" file="FMUX.Api.pas" line="435" />
  <variable name="FmuxWebViewNavigate" type="procedure(WebView: Pointer; URL: PWideChar)" file="FMUX.Api.pas" line="436" />
  <variable name="FmuxWebViewLoadText" type="procedure(WebView: Pointer; Text: PWideChar; URL: PWideChar)" file="FMUX.Api.pas" line="437" />
  <variable name="FmuxWebViewCanGoBack" type="function(WebView: Pointer): Boolean;" file="FMUX.Api.pas" line="438" />
  <variable name="FmuxWebViewGoBack" type="procedure(WebView: Pointer)" file="FMUX.Api.pas" line="439" />
  <variable name="FmuxWebViewCanGoForward" type="function(WebView: Pointer): Boolean;" file="FMUX.Api.pas" line="440" />
  <variable name="FmuxWebViewGoForward" type="procedure(WebView: Pointer)" file="FMUX.Api.pas" line="441" />
  <variable name="FmuxWebViewReload" type="procedure(WebView: Pointer)" file="FMUX.Api.pas" line="442" />
  <variable name="FmuxEvaluateJavaScript" type="procedure(WebView: Pointer; JavaScript: PWideChar)" file="FMUX.Api.pas" line="443" />
  <variable name="FmuxWebViewGetUrl" type="function(WebView: Pointer): PWideChar;" file="FMUX.Api.pas" line="444" />
  <variable name="FmuxWebViewStop" type="procedure(WebView: Pointer)" file="FMUX.Api.pas" line="445" />
  <variable name="FmuxDestroyWebView" type="procedure(WebView: Pointer)" file="FMUX.Api.pas" line="446" />
  <variable name="FmuxOpenFile" type="procedure(FileName: PWideChar)" file="FMUX.Api.pas" line="451" />
  <variable name="FmuxOpenUrl" type="procedure(Url: PWideChar)" file="FMUX.Api.pas" line="452" />
  <variable name="FmuxGetFileIcon" type="function(FileName: PWideChar; Size: Integer): Pointer;" file="FMUX.Api.pas" line="453" />
  <variable name="FmuxGetFileType" type="function(FileName: PWideChar): PWideChar;" file="FMUX.Api.pas" line="454" />
  <const name="FMUX_MEDIA_Playing" type="Integer" file="FMUX.Api.pas" line="459">
    <value>
      $1
    </value>
  </const>
  <const name="FMUX_MEDIA_Stopped" type="Integer" file="FMUX.Api.pas" line="460">
    <value>
      $2
    </value>
  </const>
  <variable name="FmuxMediaInstalled" type="function: Boolean;" file="FMUX.Api.pas" line="463" />
  <variable name="FmuxCreateMedia" type="function(FileName: PWideChar): Pointer;" file="FMUX.Api.pas" line="464" />
  <variable name="FmuxDestroyMedia" type="procedure(Media: Pointer)" file="FMUX.Api.pas" line="465" />
  <variable name="FmuxMediaPlay" type="procedure(Media: Pointer)" file="FMUX.Api.pas" line="466" />
  <variable name="FmuxMediaStop" type="procedure(Media: Pointer)" file="FMUX.Api.pas" line="467" />
  <variable name="FmuxMediaGetDuration" type="function(Media: Pointer): Int64;" file="FMUX.Api.pas" line="468" />
  <variable name="FmuxMediaGetCurrent" type="function(Media: Pointer): Int64;" file="FMUX.Api.pas" line="469" />
  <variable name="FmuxMediaSetCurrent" type="procedure(Media: Pointer; ACurrent: Int64)" file="FMUX.Api.pas" line="470" />
  <variable name="FmuxMediaSetVisible" type="procedure(Media: Pointer; AVisible: Boolean)" file="FMUX.Api.pas" line="471" />
  <variable name="FmuxMediaSetBounds" type="procedure(Media: Pointer; Parent: Pointer; ABounds: TRectF)" file="FMUX.Api.pas" line="472" />
  <variable name="FmuxMediaGetVideoSize" type="function(Media: Pointer): TPoint;" file="FMUX.Api.pas" line="473" />
  <variable name="FmuxMediaGetVolume" type="function(Media: Pointer): Single;" file="FMUX.Api.pas" line="474" />
  <variable name="FmuxMediaSetVolume" type="procedure(Media: Pointer; AValue: Single)" file="FMUX.Api.pas" line="475" />
  <variable name="FmuxMediaGetState" type="function(Media: Pointer): Integer;" file="FMUX.Api.pas" line="476" />
  <variable name="FmuxBeginDragDrop" type="procedure(Wnd: Pointer; Data: Pointer; Bitmap: Pointer)" file="FMUX.Api.pas" line="481" />
  <variable name="FmuxCaptureDeviceEnum" type="procedure(EnumProc: TCaptureDeviceProc; UserData: Pointer)" file="FMUX.Api.pas" line="491" />
  <variable name="FmuxStartVideoCapture" type="function(Device: Pointer; Proc: TSampleReadyProc; UserData: Pointer): Boolean;" file="FMUX.Api.pas" line="492" />
  <variable name="FmuxStopVideoCapture" type="function(Device: Pointer): Boolean;" file="FMUX.Api.pas" line="493" />
  <variable name="FmuxGetMousePos" type="function: TPointF;" file="FMUX.Api.pas" line="498" />
  <variable name="FmuxGetDefaultCursor" type="function: Pointer;" file="FMUX.Api.pas" line="499" />
  <variable name="FmuxGetCursor" type="function: Pointer;" file="FMUX.Api.pas" line="500" />
  <variable name="FmuxGetCursorBitmap" type="function(HotX: Integer; HotY: Integer): Pointer;" file="FMUX.Api.pas" line="501" />
  <variable name="FmuxGenMouseMove" type="function(X: Single; Y: Single): Boolean;" file="FMUX.Api.pas" line="506" />
  <variable name="FmuxGenMouseDown" type="function(Button: Integer): Boolean;" file="FMUX.Api.pas" line="508" />
  <variable name="FmuxGenMouseUp" type="function(Button: Integer): Boolean;" file="FMUX.Api.pas" line="509" />
  <variable name="FmuxGenMouseWheel" type="function(DeltaX: Single; DeltaY: Single): Boolean;" file="FMUX.Api.pas" line="510" />
  <variable name="FmuxGenKeyDown" type="function(KeyCode: Cardinal; KeyChar: Char; State: Integer): Boolean;" file="FMUX.Api.pas" line="511" />
  <variable name="FmuxGenKeyUp" type="function(KeyCode: Cardinal; KeyChar: Char; State: Integer): Boolean;" file="FMUX.Api.pas" line="512" />
  <struct name="TFmuxVersionInfo" size="116" file="FMUX.Api.pas" line="522">
    <field name="Major" type="Cardinal" visibility="public" size="4" offset="0" file="FMUX.Api.pas" line="523" />
    <field name="Minor" type="Cardinal" visibility="public" size="4" offset="4" file="FMUX.Api.pas" line="523" />
    <field name="Build" type="Cardinal" visibility="public" size="4" offset="8" file="FMUX.Api.pas" line="523" />
    <field name="Extra" visibility="public" size="101" offset="12" file="FMUX.Api.pas" line="524">
      <array name="Extra" visibility="public" low="0" high="100">
        <element type="Byte" />
      </array>
    </field>
  </struct>
  <variable name="FmuxGetVersionInfo" type="procedure(VI: TFmuxVersionInfo)" file="FMUX.Api.pas" line="528" />
  <variable name="FmuxSetVersionInfo" type="procedure(VI: TFmuxVersionInfo)" file="FMUX.Api.pas" line="529" />
  <variable name="IsWayland" type="function: Boolean;" file="FMUX.Api.pas" line="534" />
  <variable name="IsBroadway" type="function: Boolean;" file="FMUX.Api.pas" line="535" />
  <function name="PrinterOptionToInt" visibility="public" file="FMUX.Api.pas" line="545">
    <parameters>
      <parameter name="AOptions" type="TPrintDialogOptions" />
      <retval type="Integer" />
    </parameters>
  </function>
  <function name="MsgDlgButtonsToButtons" visibility="public" file="FMUX.Api.pas" line="562">
    <parameters>
      <parameter name="Btns" type="TMsgDlgButtons" />
      <retval type="Integer" />
    </parameters>
  </function>
  <function name="FmuxStateToButton" visibility="public" file="FMUX.Api.pas" line="591">
    <parameters>
      <parameter name="State" type="Integer" />
      <retval type="TMouseButton" />
    </parameters>
  </function>
  <function name="FmuxButtonToState" visibility="public" file="FMUX.Api.pas" line="601">
    <parameters>
      <parameter name="Button" type="TMouseButton" />
      <retval type="Integer" />
    </parameters>
  </function>
  <function name="FmuxShiftStateToState" visibility="public" file="FMUX.Api.pas" line="615">
    <parameters>
      <parameter name="State" type="TShiftState" />
      <retval type="Integer" />
    </parameters>
  </function>
  <function name="FmuxStateToShiftState" visibility="public" file="FMUX.Api.pas" line="626">
    <parameters>
      <parameter name="State" type="Integer" />
      <retval type="TShiftState" />
    </parameters>
  </function>
</namespace>

 

 

官方博客:

https://bitbucket.org/crossvcl/fmxlinux/issues?status=new&status=open

https://ksdev.blogspot.com/2017/12/using-firemonkey-graphics-in-cgi-script.html

      :在Linux服务器上使用FireMonkey的图形:FmxLinux不仅是UI解决方案,还是一种在Web脚本或服务器应用程序中使用图形的简便方法

      :安装对服务器的依赖:要在服务器应用程序上使用图形功能,应安装一些依赖项。您无需将整个X11系统安装到服务器:在终端中输入以下内容:

sudo apt install libgl1-mesa-glx libglu1-mesa libgtk-3-common libgstreamer1.0 libgstreamer-plugins-base1.0

      :编写Web服务器脚本常见的Web服务器脚本应用程序只是常规控制台应用程序。创建新的控制台应用程序,然后像往常一样在Project Inspector中的Project上单击鼠标右键,然后选择“ Add FmxLinux”项(仅自FmxLinux 1.17开始可用)。接下来,我们显示生成PNG图像的简单Apache CGI脚本的完整源代码:

program FmxWebScript;

{$APPTYPE CONSOLE}

uses
  System.SysUtils,
  System.Types,
  System.Classes,
  System.UIConsts,
  FMX.Types,
  FMX.Graphics,
  FMX.Utils;

var
  B: TBitmap;
  Stream: TStream;
  Cur: PByte;
  I: Integer;
  Keys: TStrings;
  Text: string;
  W, H: Integer;
  Query: string;
begin
  Query := GetEnvironmentVariable('QUERY_STRING');
  if Query.IsEmpty then
  begin
    Writeln('This is CGI script app, which is run under web server');
    Exit;
  end;

  Keys := TStringList.Create;
  Keys.CommaText := Query.Replace('&', ',');

  if not TryStrToInt(Keys.Values['width'], W) then
    W := 400;
  if not TryStrToInt(Keys.Values['height'], H) then
    H := 300;

  B := TBitmap.Create(W, H);
  if Keys.Values['color'] <> '' then
  begin
    if Keys.Values['color'] = 'random' then
    begin
      Randomize;
      B.Canvas.Fill.Color := $FF000000 or random($FFFFFF);
    end
    else
      B.Canvas.Fill.Color := StringToAlphaColor(Keys.Values['color'])
  end
  else
    B.Canvas.Fill.Color := $FFFF0000;
  B.Canvas.FillEllipse(B.BoundsF, 1);
  B.Canvas.Stroke.Color := claBlack;
  B.Canvas.DrawEllipse(B.BoundsF, 1);

  B.Canvas.Fill.Color := $FF000000;
  Text := 'FmxLinux';
  if Keys.Values['text'] <> '' then
    Text := Keys.Values['text'].Replace('%20', ' ');
  B.Canvas.FillText(B.BoundsF, Text, False, 1, [], TTextAlign.Center);

  Stream := TMemoryStream.Create;
  B.SaveToStream(Stream);

  Writeln('Content-type: image/png');
  Writeln('Content-length: ' + Stream.Size.ToString);
  Writeln;

  Cur := TMemoryStream(Stream).Memory;
  for I := 0 to Stream.Size - 1 do
  begin
    Write(Utf8Char(Cur^));
    Inc(Cur);
  end;
end.

      :在ubuntu Linux Server上使用WebBrowserWebBrowser需要WebKitGtk,通常在每个Linux上默认安装该WebKit。但是,如果没有,请先安装-“ sudo apt install libwebkit2gtk-4.0”或“ sudo yum install webkitgtk2.x86_64”

sudo apt install libwebkit2gtk-4.0
或 
sudo yum install webkitgtk2.x86_64

 

太累了,看来,还是得慢慢写......

 

本博客关联:

      上一篇:  Linux开发之Delphi FMXLinux(一)、概述

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

专讲冷知识

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值