github.com/secoba/wails/v2@v2.6.4/internal/frontend/runtime/wrapper/runtime.js (about)

     1  /*
     2   _       __      _ __
     3  | |     / /___ _(_) /____
     4  | | /| / / __ `/ / / ___/
     5  | |/ |/ / /_/ / / (__  )
     6  |__/|__/\__,_/_/_/____/
     7  The electron alternative for Go
     8  (c) Lea Anthony 2019-present
     9  */
    10  
    11  export function LogPrint(message) {
    12      window.runtime.LogPrint(message);
    13  }
    14  
    15  export function LogTrace(message) {
    16      window.runtime.LogTrace(message);
    17  }
    18  
    19  export function LogDebug(message) {
    20      window.runtime.LogDebug(message);
    21  }
    22  
    23  export function LogInfo(message) {
    24      window.runtime.LogInfo(message);
    25  }
    26  
    27  export function LogWarning(message) {
    28      window.runtime.LogWarning(message);
    29  }
    30  
    31  export function LogError(message) {
    32      window.runtime.LogError(message);
    33  }
    34  
    35  export function LogFatal(message) {
    36      window.runtime.LogFatal(message);
    37  }
    38  
    39  export function EventsOnMultiple(eventName, callback, maxCallbacks) {
    40      return window.runtime.EventsOnMultiple(eventName, callback, maxCallbacks);
    41  }
    42  
    43  export function EventsOn(eventName, callback) {
    44      return EventsOnMultiple(eventName, callback, -1);
    45  }
    46  
    47  export function EventsOff(eventName, ...additionalEventNames) {
    48      return window.runtime.EventsOff(eventName, ...additionalEventNames);
    49  }
    50  
    51  export function EventsOnce(eventName, callback) {
    52      return EventsOnMultiple(eventName, callback, 1);
    53  }
    54  
    55  export function EventsEmit(eventName) {
    56      let args = [eventName].slice.call(arguments);
    57      return window.runtime.EventsEmit.apply(null, args);
    58  }
    59  
    60  export function WindowReload() {
    61      window.runtime.WindowReload();
    62  }
    63  
    64  export function WindowReloadApp() {
    65      window.runtime.WindowReloadApp();
    66  }
    67  
    68  export function WindowSetAlwaysOnTop(b) {
    69      window.runtime.WindowSetAlwaysOnTop(b);
    70  }
    71  
    72  export function WindowSetSystemDefaultTheme() {
    73      window.runtime.WindowSetSystemDefaultTheme();
    74  }
    75  
    76  export function WindowSetLightTheme() {
    77      window.runtime.WindowSetLightTheme();
    78  }
    79  
    80  export function WindowSetDarkTheme() {
    81      window.runtime.WindowSetDarkTheme();
    82  }
    83  
    84  export function WindowCenter() {
    85      window.runtime.WindowCenter();
    86  }
    87  
    88  export function WindowSetTitle(title) {
    89      window.runtime.WindowSetTitle(title);
    90  }
    91  
    92  export function WindowFullscreen() {
    93      window.runtime.WindowFullscreen();
    94  }
    95  
    96  export function WindowUnfullscreen() {
    97      window.runtime.WindowUnfullscreen();
    98  }
    99  
   100  export function WindowIsFullscreen() {
   101      return window.runtime.WindowIsFullscreen();
   102  }
   103  
   104  export function WindowGetSize() {
   105      return window.runtime.WindowGetSize();
   106  }
   107  
   108  export function WindowSetSize(width, height) {
   109      window.runtime.WindowSetSize(width, height);
   110  }
   111  
   112  export function WindowSetMaxSize(width, height) {
   113      window.runtime.WindowSetMaxSize(width, height);
   114  }
   115  
   116  export function WindowSetMinSize(width, height) {
   117      window.runtime.WindowSetMinSize(width, height);
   118  }
   119  
   120  export function WindowSetPosition(x, y) {
   121      window.runtime.WindowSetPosition(x, y);
   122  }
   123  
   124  export function WindowGetPosition() {
   125      return window.runtime.WindowGetPosition();
   126  }
   127  
   128  export function WindowHide() {
   129      window.runtime.WindowHide();
   130  }
   131  
   132  export function WindowShow() {
   133      window.runtime.WindowShow();
   134  }
   135  
   136  export function WindowMaximise() {
   137      window.runtime.WindowMaximise();
   138  }
   139  
   140  export function WindowToggleMaximise() {
   141      window.runtime.WindowToggleMaximise();
   142  }
   143  
   144  export function WindowUnmaximise() {
   145      window.runtime.WindowUnmaximise();
   146  }
   147  
   148  export function WindowIsMaximised() {
   149      return window.runtime.WindowIsMaximised();
   150  }
   151  
   152  export function WindowMinimise() {
   153      window.runtime.WindowMinimise();
   154  }
   155  
   156  export function WindowUnminimise() {
   157      window.runtime.WindowUnminimise();
   158  }
   159  
   160  export function WindowSetBackgroundColour(R, G, B, A) {
   161      window.runtime.WindowSetBackgroundColour(R, G, B, A);
   162  }
   163  
   164  export function ScreenGetAll() {
   165      return window.runtime.ScreenGetAll();
   166  }
   167  
   168  export function WindowIsMinimised() {
   169      return window.runtime.WindowIsMinimised();
   170  }
   171  
   172  export function WindowIsNormal() {
   173      return window.runtime.WindowIsNormal();
   174  }
   175  
   176  export function BrowserOpenURL(url) {
   177      window.runtime.BrowserOpenURL(url);
   178  }
   179  
   180  export function Environment() {
   181      return window.runtime.Environment();
   182  }
   183  
   184  export function Quit() {
   185      window.runtime.Quit();
   186  }
   187  
   188  export function Hide() {
   189      window.runtime.Hide();
   190  }
   191  
   192  export function Show() {
   193      window.runtime.Show();
   194  }
   195  
   196  export function ClipboardGetText() {
   197      return window.runtime.ClipboardGetText();
   198  }
   199  
   200  export function ClipboardSetText(text) {
   201      return window.runtime.ClipboardSetText(text);
   202  }