Guest User

Untitled

a guest
Jan 15th, 2020
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 18.08 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Runtime.CompilerServices;
  4. using System.Threading.Tasks;
  5. using Tmds.DBus;
  6.  
  7. [assembly: InternalsVisibleTo(Tmds.DBus.Connection.DynamicAssemblyName)]
  8. namespace Notifications.DBus
  9. {
  10.     [DBusInterface("org.kde.libkonq.FileUndoManager")]
  11.     interface IFileUndoManager : IDBusObject
  12.     {
  13.         Task<byte[]> getAsync();
  14.         Task<IDisposable> WatchlockAsync(Action handler, Action<Exception> onError = null);
  15.         Task<IDisposable> WatchpopAsync(Action handler, Action<Exception> onError = null);
  16.         Task<IDisposable> WatchpushAsync(Action<byte[]> handler, Action<Exception> onError = null);
  17.         Task<IDisposable> WatchunlockAsync(Action handler, Action<Exception> onError = null);
  18.     }
  19.  
  20.     [DBusInterface("org.kde.JobViewServer")]
  21.     interface IJobViewServer : IDBusObject
  22.     {
  23.         Task<ObjectPath> requestViewAsync(string AppName, string AppIconName, int Capabilities);
  24.     }
  25.  
  26.     [DBusInterface("org.kde.JobViewServerV2")]
  27.     interface IJobViewServerV2 : IDBusObject
  28.     {
  29.         Task<ObjectPath> requestViewAsync(string DesktopEntry, int Capabilities, IDictionary<string, object> Hints);
  30.     }
  31.  
  32.     [DBusInterface("org.kde.kuiserver")]
  33.     interface IKuiserver : IDBusObject
  34.     {
  35.         Task registerServiceAsync(string Service, string ObjectPath);
  36.         Task emitJobUrlsChangedAsync();
  37.         Task<bool> requiresJobTrackerAsync();
  38.         Task<string[]> registeredJobContactsAsync();
  39.         Task<IDisposable> WatchjobUrlsChangedAsync(Action<string[]> handler, Action<Exception> onError = null);
  40.     }
  41.  
  42.     [DBusInterface("org.qtproject.Qt.QApplication")]
  43.     interface IQApplication : IDBusObject
  44.     {
  45.         Task setStyleSheetAsync(string Sheet);
  46.         Task setAutoSipEnabledAsync(bool Enabled);
  47.         Task<bool> autoSipEnabledAsync();
  48.         Task closeAllWindowsAsync();
  49.         Task aboutQtAsync();
  50.         Task<T> GetAsync<T>(string prop);
  51.         Task<QApplicationProperties> GetAllAsync();
  52.         Task SetAsync(string prop, object val);
  53.         Task<IDisposable> WatchPropertiesAsync(Action<PropertyChanges> handler);
  54.     }
  55.  
  56.     [Dictionary]
  57.     class QApplicationProperties
  58.     {
  59.         private int _cursorFlashTime = default(int);
  60.         public int CursorFlashTime
  61.         {
  62.             get
  63.             {
  64.                 return _cursorFlashTime;
  65.             }
  66.  
  67.             set
  68.             {
  69.                 _cursorFlashTime = (value);
  70.             }
  71.         }
  72.  
  73.         private int _doubleClickInterval = default(int);
  74.         public int DoubleClickInterval
  75.         {
  76.             get
  77.             {
  78.                 return _doubleClickInterval;
  79.             }
  80.  
  81.             set
  82.             {
  83.                 _doubleClickInterval = (value);
  84.             }
  85.         }
  86.  
  87.         private int _keyboardInputInterval = default(int);
  88.         public int KeyboardInputInterval
  89.         {
  90.             get
  91.             {
  92.                 return _keyboardInputInterval;
  93.             }
  94.  
  95.             set
  96.             {
  97.                 _keyboardInputInterval = (value);
  98.             }
  99.         }
  100.  
  101.         private int _wheelScrollLines = default(int);
  102.         public int WheelScrollLines
  103.         {
  104.             get
  105.             {
  106.                 return _wheelScrollLines;
  107.             }
  108.  
  109.             set
  110.             {
  111.                 _wheelScrollLines = (value);
  112.             }
  113.         }
  114.  
  115.         private (int, int) _globalStrut = default((int, int));
  116.         public (int, int) GlobalStrut
  117.         {
  118.             get
  119.             {
  120.                 return _globalStrut;
  121.             }
  122.  
  123.             set
  124.             {
  125.                 _globalStrut = (value);
  126.             }
  127.         }
  128.  
  129.         private int _startDragTime = default(int);
  130.         public int StartDragTime
  131.         {
  132.             get
  133.             {
  134.                 return _startDragTime;
  135.             }
  136.  
  137.             set
  138.             {
  139.                 _startDragTime = (value);
  140.             }
  141.         }
  142.  
  143.         private int _startDragDistance = default(int);
  144.         public int StartDragDistance
  145.         {
  146.             get
  147.             {
  148.                 return _startDragDistance;
  149.             }
  150.  
  151.             set
  152.             {
  153.                 _startDragDistance = (value);
  154.             }
  155.         }
  156.  
  157.         private string _styleSheet = default(string);
  158.         public string StyleSheet
  159.         {
  160.             get
  161.             {
  162.                 return _styleSheet;
  163.             }
  164.  
  165.             set
  166.             {
  167.                 _styleSheet = (value);
  168.             }
  169.         }
  170.  
  171.         private bool _autoSipEnabled = default(bool);
  172.         public bool AutoSipEnabled
  173.         {
  174.             get
  175.             {
  176.                 return _autoSipEnabled;
  177.             }
  178.  
  179.             set
  180.             {
  181.                 _autoSipEnabled = (value);
  182.             }
  183.         }
  184.     }
  185.  
  186.     static class QApplicationExtensions
  187.     {
  188.         public static Task<int> GetCursorFlashTimeAsync(this IQApplication o) => o.GetAsync<int>("cursorFlashTime");
  189.         public static Task<int> GetDoubleClickIntervalAsync(this IQApplication o) => o.GetAsync<int>("doubleClickInterval");
  190.         public static Task<int> GetKeyboardInputIntervalAsync(this IQApplication o) => o.GetAsync<int>("keyboardInputInterval");
  191.         public static Task<int> GetWheelScrollLinesAsync(this IQApplication o) => o.GetAsync<int>("wheelScrollLines");
  192.         public static Task<(int, int)> GetGlobalStrutAsync(this IQApplication o) => o.GetAsync<(int, int)>("globalStrut");
  193.         public static Task<int> GetStartDragTimeAsync(this IQApplication o) => o.GetAsync<int>("startDragTime");
  194.         public static Task<int> GetStartDragDistanceAsync(this IQApplication o) => o.GetAsync<int>("startDragDistance");
  195.         public static Task<string> GetStyleSheetAsync(this IQApplication o) => o.GetAsync<string>("styleSheet");
  196.         public static Task<bool> GetAutoSipEnabledAsync(this IQApplication o) => o.GetAsync<bool>("autoSipEnabled");
  197.         public static Task SetCursorFlashTimeAsync(this IQApplication o, int val) => o.SetAsync("cursorFlashTime", val);
  198.         public static Task SetDoubleClickIntervalAsync(this IQApplication o, int val) => o.SetAsync("doubleClickInterval", val);
  199.         public static Task SetKeyboardInputIntervalAsync(this IQApplication o, int val) => o.SetAsync("keyboardInputInterval", val);
  200.         public static Task SetWheelScrollLinesAsync(this IQApplication o, int val) => o.SetAsync("wheelScrollLines", val);
  201.         public static Task SetGlobalStrutAsync(this IQApplication o, (int, int) val) => o.SetAsync("globalStrut", val);
  202.         public static Task SetStartDragTimeAsync(this IQApplication o, int val) => o.SetAsync("startDragTime", val);
  203.         public static Task SetStartDragDistanceAsync(this IQApplication o, int val) => o.SetAsync("startDragDistance", val);
  204.         public static Task SetStyleSheetAsync(this IQApplication o, string val) => o.SetAsync("styleSheet", val);
  205.         public static Task SetAutoSipEnabledAsync(this IQApplication o, bool val) => o.SetAsync("autoSipEnabled", val);
  206.     }
  207.  
  208.     [DBusInterface("org.qtproject.Qt.QGuiApplication")]
  209.     interface IQGuiApplication : IDBusObject
  210.     {
  211.         Task<T> GetAsync<T>(string prop);
  212.         Task<QGuiApplicationProperties> GetAllAsync();
  213.         Task SetAsync(string prop, object val);
  214.         Task<IDisposable> WatchPropertiesAsync(Action<PropertyChanges> handler);
  215.     }
  216.  
  217.     [Dictionary]
  218.     class QGuiApplicationProperties
  219.     {
  220.         private string _applicationDisplayName = default(string);
  221.         public string ApplicationDisplayName
  222.         {
  223.             get
  224.             {
  225.                 return _applicationDisplayName;
  226.             }
  227.  
  228.             set
  229.             {
  230.                 _applicationDisplayName = (value);
  231.             }
  232.         }
  233.  
  234.         private string _desktopFileName = default(string);
  235.         public string DesktopFileName
  236.         {
  237.             get
  238.             {
  239.                 return _desktopFileName;
  240.             }
  241.  
  242.             set
  243.             {
  244.                 _desktopFileName = (value);
  245.             }
  246.         }
  247.  
  248.         private int _layoutDirection = default(int);
  249.         public int LayoutDirection
  250.         {
  251.             get
  252.             {
  253.                 return _layoutDirection;
  254.             }
  255.  
  256.             set
  257.             {
  258.                 _layoutDirection = (value);
  259.             }
  260.         }
  261.  
  262.         private string _platformName = default(string);
  263.         public string PlatformName
  264.         {
  265.             get
  266.             {
  267.                 return _platformName;
  268.             }
  269.  
  270.             set
  271.             {
  272.                 _platformName = (value);
  273.             }
  274.         }
  275.  
  276.         private bool _quitOnLastWindowClosed = default(bool);
  277.         public bool QuitOnLastWindowClosed
  278.         {
  279.             get
  280.             {
  281.                 return _quitOnLastWindowClosed;
  282.             }
  283.  
  284.             set
  285.             {
  286.                 _quitOnLastWindowClosed = (value);
  287.             }
  288.         }
  289.     }
  290.  
  291.     static class QGuiApplicationExtensions
  292.     {
  293.         public static Task<string> GetApplicationDisplayNameAsync(this IQGuiApplication o) => o.GetAsync<string>("applicationDisplayName");
  294.         public static Task<string> GetDesktopFileNameAsync(this IQGuiApplication o) => o.GetAsync<string>("desktopFileName");
  295.         public static Task<int> GetLayoutDirectionAsync(this IQGuiApplication o) => o.GetAsync<int>("layoutDirection");
  296.         public static Task<string> GetPlatformNameAsync(this IQGuiApplication o) => o.GetAsync<string>("platformName");
  297.         public static Task<bool> GetQuitOnLastWindowClosedAsync(this IQGuiApplication o) => o.GetAsync<bool>("quitOnLastWindowClosed");
  298.         public static Task SetApplicationDisplayNameAsync(this IQGuiApplication o, string val) => o.SetAsync("applicationDisplayName", val);
  299.         public static Task SetDesktopFileNameAsync(this IQGuiApplication o, string val) => o.SetAsync("desktopFileName", val);
  300.         public static Task SetLayoutDirectionAsync(this IQGuiApplication o, int val) => o.SetAsync("layoutDirection", val);
  301.         public static Task SetQuitOnLastWindowClosedAsync(this IQGuiApplication o, bool val) => o.SetAsync("quitOnLastWindowClosed", val);
  302.     }
  303.  
  304.     [DBusInterface("org.qtproject.Qt.QCoreApplication")]
  305.     interface IQCoreApplication : IDBusObject
  306.     {
  307.         Task quitAsync();
  308.         Task<T> GetAsync<T>(string prop);
  309.         Task<QCoreApplicationProperties> GetAllAsync();
  310.         Task SetAsync(string prop, object val);
  311.         Task<IDisposable> WatchPropertiesAsync(Action<PropertyChanges> handler);
  312.     }
  313.  
  314.     [Dictionary]
  315.     class QCoreApplicationProperties
  316.     {
  317.         private string _applicationName = default(string);
  318.         public string ApplicationName
  319.         {
  320.             get
  321.             {
  322.                 return _applicationName;
  323.             }
  324.  
  325.             set
  326.             {
  327.                 _applicationName = (value);
  328.             }
  329.         }
  330.  
  331.         private string _applicationVersion = default(string);
  332.         public string ApplicationVersion
  333.         {
  334.             get
  335.             {
  336.                 return _applicationVersion;
  337.             }
  338.  
  339.             set
  340.             {
  341.                 _applicationVersion = (value);
  342.             }
  343.         }
  344.  
  345.         private string _organizationName = default(string);
  346.         public string OrganizationName
  347.         {
  348.             get
  349.             {
  350.                 return _organizationName;
  351.             }
  352.  
  353.             set
  354.             {
  355.                 _organizationName = (value);
  356.             }
  357.         }
  358.  
  359.         private string _organizationDomain = default(string);
  360.         public string OrganizationDomain
  361.         {
  362.             get
  363.             {
  364.                 return _organizationDomain;
  365.             }
  366.  
  367.             set
  368.             {
  369.                 _organizationDomain = (value);
  370.             }
  371.         }
  372.  
  373.         private bool _quitLockEnabled = default(bool);
  374.         public bool QuitLockEnabled
  375.         {
  376.             get
  377.             {
  378.                 return _quitLockEnabled;
  379.             }
  380.  
  381.             set
  382.             {
  383.                 _quitLockEnabled = (value);
  384.             }
  385.         }
  386.     }
  387.  
  388.     static class QCoreApplicationExtensions
  389.     {
  390.         public static Task<string> GetApplicationNameAsync(this IQCoreApplication o) => o.GetAsync<string>("applicationName");
  391.         public static Task<string> GetApplicationVersionAsync(this IQCoreApplication o) => o.GetAsync<string>("applicationVersion");
  392.         public static Task<string> GetOrganizationNameAsync(this IQCoreApplication o) => o.GetAsync<string>("organizationName");
  393.         public static Task<string> GetOrganizationDomainAsync(this IQCoreApplication o) => o.GetAsync<string>("organizationDomain");
  394.         public static Task<bool> GetQuitLockEnabledAsync(this IQCoreApplication o) => o.GetAsync<bool>("quitLockEnabled");
  395.         public static Task SetApplicationNameAsync(this IQCoreApplication o, string val) => o.SetAsync("applicationName", val);
  396.         public static Task SetApplicationVersionAsync(this IQCoreApplication o, string val) => o.SetAsync("applicationVersion", val);
  397.         public static Task SetOrganizationNameAsync(this IQCoreApplication o, string val) => o.SetAsync("organizationName", val);
  398.         public static Task SetOrganizationDomainAsync(this IQCoreApplication o, string val) => o.SetAsync("organizationDomain", val);
  399.         public static Task SetQuitLockEnabledAsync(this IQCoreApplication o, bool val) => o.SetAsync("quitLockEnabled", val);
  400.     }
  401.  
  402.     [DBusInterface("org.kde.PlasmaShell")]
  403.     interface IPlasmaShell : IDBusObject
  404.     {
  405.         Task toggleDashboardAsync();
  406.         Task toggleActivityManagerAsync();
  407.         Task toggleWidgetExplorerAsync();
  408.         Task setDashboardShownAsync(bool Show);
  409.         Task showInteractiveConsoleAsync();
  410.         Task loadScriptInInteractiveConsoleAsync(string Script);
  411.         Task showInteractiveKWinConsoleAsync();
  412.         Task loadKWinScriptInInteractiveConsoleAsync(string Script);
  413.         Task evaluateScriptAsync(string Script);
  414.         Task<byte[]> dumpCurrentLayoutJSAsync();
  415.         Task loadLookAndFeelDefaultLayoutAsync(string Layout);
  416.         Task activateLauncherMenuAsync();
  417.     }
  418.  
  419.     [DBusInterface("org.kde.klipper.klipper")]
  420.     interface IKlipper : IDBusObject
  421.     {
  422.         Task<string> getClipboardContentsAsync();
  423.         Task setClipboardContentsAsync(string S);
  424.         Task clearClipboardContentsAsync();
  425.         Task clearClipboardHistoryAsync();
  426.         Task saveClipboardHistoryAsync();
  427.         Task<string[]> getClipboardHistoryMenuAsync();
  428.         Task<string> getClipboardHistoryItemAsync(int I);
  429.         Task showKlipperPopupMenuAsync();
  430.         Task showKlipperManuallyInvokeActionMenuAsync();
  431.     }
  432.  
  433.     [DBusInterface("org.freedesktop.Notifications")]
  434.     interface INotifications : IDBusObject
  435.     {
  436.         Task<uint> NotifyAsync(string AppName, uint ReplacesId, string AppIcon, string Summary, string Body, string[] Actions, IDictionary<string, object> Hints, int Timeout);
  437.         Task CloseNotificationAsync(uint Id);
  438.         Task<string[]> GetCapabilitiesAsync();
  439.         Task<(string name, string vendor, string version, string specVersion)> GetServerInformationAsync();
  440.         Task<uint> InhibitAsync(string DesktopEntry, string Reason, IDictionary<string, object> Hints);
  441.         Task UnInhibitAsync(uint arg0);
  442.         Task<IDisposable> WatchNotificationClosedAsync(Action<(uint id, uint reason)> handler, Action<Exception> onError = null);
  443.         Task<IDisposable> WatchActionInvokedAsync(Action<(uint id, string actionKey)> handler, Action<Exception> onError = null);
  444.         Task<T> GetAsync<T>(string prop);
  445.         Task<NotificationsProperties> GetAllAsync();
  446.         Task SetAsync(string prop, object val);
  447.         Task<IDisposable> WatchPropertiesAsync(Action<PropertyChanges> handler);
  448.     }
  449.  
  450.     [Dictionary]
  451.     class NotificationsProperties
  452.     {
  453.         private bool _Inhibited = default(bool);
  454.         public bool Inhibited
  455.         {
  456.             get
  457.             {
  458.                 return _Inhibited;
  459.             }
  460.  
  461.             set
  462.             {
  463.                 _Inhibited = (value);
  464.             }
  465.         }
  466.     }
  467.  
  468.     static class NotificationsExtensions
  469.     {
  470.         public static Task<bool> GetInhibitedAsync(this INotifications o) => o.GetAsync<bool>("Inhibited");
  471.     }
  472.  
  473.     [DBusInterface("org.kde.osdService")]
  474.     interface IOsdService : IDBusObject
  475.     {
  476.         Task brightnessChangedAsync(int Percent);
  477.         Task keyboardBrightnessChangedAsync(int Percent);
  478.         Task volumeChangedAsync(int Percent);
  479.         Task microphoneVolumeChangedAsync(int Percent);
  480.         Task mediaPlayerVolumeChangedAsync(int Percent, string PlayerName, string PlayerIconName);
  481.         Task kbdLayoutChangedAsync(string LayoutName);
  482.         Task virtualDesktopChangedAsync(string CurrentVirtualDesktopName);
  483.         Task touchpadEnabledChangedAsync(bool TouchpadEnabled);
  484.         Task wifiEnabledChangedAsync(bool WifiEnabled);
  485.         Task bluetoothEnabledChangedAsync(bool BluetoothEnabled);
  486.         Task wwanEnabledChangedAsync(bool WwanEnabled);
  487.         Task virtualKeyboardEnabledChangedAsync(bool VirtualKeyboardEnabled);
  488.         Task showTextAsync(string Icon, string Text);
  489.         Task<IDisposable> WatchosdProgressAsync(Action<(string icon, int percent, string additionalText)> handler, Action<Exception> onError = null);
  490.         Task<IDisposable> WatchosdTextAsync(Action<(string icon, string text)> handler, Action<Exception> onError = null);
  491.     }
  492.  
  493.     [DBusInterface("org.freedesktop.Application")]
  494.     interface IApplication : IDBusObject
  495.     {
  496.         Task ActivateAsync(IDictionary<string, object> PlatformData);
  497.         Task OpenAsync(string[] Uris, IDictionary<string, object> PlatformData);
  498.         Task ActivateActionAsync(string ActionName, object[] Parameter, IDictionary<string, object> PlatformData);
  499.     }
  500.  
  501.     [DBusInterface("org.kde.KDBusService")]
  502.     interface IKDBusService : IDBusObject
  503.     {
  504.         Task<int> CommandLineAsync(string[] Arguments, string WorkingDir, IDictionary<string, object> PlatformData);
  505.     }
  506. }
Advertisement
Add Comment
Please, Sign In to add comment