summaryrefslogtreecommitdiff
path: root/src/wayland-client.ads
diff options
context:
space:
mode:
Diffstat (limited to 'src/wayland-client.ads')
-rw-r--r--src/wayland-client.ads206
1 files changed, 206 insertions, 0 deletions
diff --git a/src/wayland-client.ads b/src/wayland-client.ads
new file mode 100644
index 0000000..2d6fff0
--- /dev/null
+++ b/src/wayland-client.ads
@@ -0,0 +1,206 @@
+
+
+package Wayland.Client is
+
+
+ subtype Num_Events_Dispatched is Natural;
+ subtype Num_Bytes_Sent is Natural;
+
+
+
+
+ type Proxy is new Wayland_Object with private;
+ type Proxy_Access is access Proxy;
+
+
+ type Display is new Proxy with private;
+ type Display_Access is access Display;
+
+
+ type Event_Queue is new Wayland_Object private;
+ type Event_Queue_Access is access Event_Queue;
+
+
+
+
+ type Dispatcher_Function is access procedure
+ (Obj : in Wayland_Object;
+ Op : in Opcode);
+
+
+
+
+ -- Proxy
+
+ function Create
+ (Factory : in Proxy;
+ My_Interface : in Protocol_Interface)
+ return Proxy;
+
+ procedure Marshal
+ (This : in out Proxy;
+ Op : in Opcode;
+ Args : in Argument_Array);
+
+ function Marshal_Constructor
+ (This : in out Proxy;
+ My_Interface : in Protocol_Interface;
+ Op : in Opcode;
+ Args : in Argument_Array)
+ return Proxy;
+
+ function Marshal_Constructor
+ (This : in out Proxy;
+ My_Interface : in Protocol_Interface;
+ Op : in Opcode;
+ Args : in Argument_Array;
+ Version : in Version_Number)
+ return Proxy;
+
+ procedure Add_Listener
+ (This : in out Proxy;
+ Op : in Opcode;
+ Func : in Listener_Function);
+
+ function Get_Listener
+ (This : in Proxy;
+ Op : in Opcode)
+ return Listener_Function;
+
+ procedure Remove_Listener
+ (This : in out Proxy;
+ Op : in Opcode);
+
+ procedure Set_Dispatcher
+ (This : in out Proxy;
+ Func : in Dispatcher_Function);
+
+ function Get_Version
+ (This : in Proxy)
+ return Version_Number;
+
+ function Get_ID
+ (This : in Proxy)
+ return ID_Number;
+
+ function Get_Interface_Name
+ (This : in Proxy)
+ return String;
+
+ procedure Set_Queue
+ (This : in out Proxy;
+ Queue : in Event_Queue_Access);
+
+
+
+
+ -- Display
+
+ function Connect
+ (Name : in String)
+ return Display;
+
+ function Connect_To_FD
+ (FD : in File_Descriptor)
+ return Display;
+
+ procedure Disconnect
+ (This : in out Display);
+
+ function Get_FD
+ (This : in Display)
+ return File_Descriptor;
+
+ function Dispatch
+ (This : in out Display)
+ return Num_Events_Dispatched;
+
+ function Dispatch_Pending
+ (This : in out Display)
+ return Num_Events_Dispatched;
+
+ function Dispatch_Queue
+ (This : in out Display;
+ Queue : in out Event_Queue)
+ return Num_Events_Dispatched;
+
+ function Dispatch_Queue_Pending
+ (This : in out Display;
+ Queue : in out Event_Queue)
+ return Num_Events_Dispatched;
+
+ function Get_Error
+ (This : in out Display)
+ return Error_Value;
+
+ function Get_Protocol_Error
+ (This : in Display;
+ My_Interface : in Protocol_Interface_Access;
+ ID : in ID_Number)
+ return Error_Value;
+
+ function Flush
+ (This : in out Display)
+ return Num_Bytes_Sent;
+
+ function Roundtrip_Queue
+ (This : in out Display;
+ Queue : in out Event_Queue)
+ return Num_Events_Dispatched;
+
+ function Roundtrip
+ (This : in out Display)
+ return Num_Events_Dispatched;
+
+ procedure Read_Events
+ (This : in out Display);
+
+ procedure Read_Events
+ (This : in out Display;
+ Queue : in out Event_Queue);
+
+
+
+
+ -- Event_Queue
+
+ function Create_Queue
+ (This : in out Display)
+ return Event_Queue;
+
+
+
+
+ -- Log
+
+ procedure Set_Log_Handler
+ (Handler : in Log_Function);
+
+
+private
+
+
+ type Proxy is new Wayland_Object with null record;
+
+ procedure Finalize
+ (This : in out Proxy);
+
+
+
+
+ type Display is new Proxy with null record;
+
+ procedure Finalize
+ (This : in out Display);
+
+
+
+
+ type Event_Queue is new Wayland_Object with null record;
+
+ procedure Finalize
+ (This : in out Event_Queue);
+
+
+end Wayland.Client;
+