v0.2.1 c0399be

gapplicationcommandline.go RawHistoryFolder

1// Package gio was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gio
3
4import (
5	"structs"
6	"unsafe"
7
8	"github.com/ebitengine/purego"
9
10	"github.com/bnema/puregotk/pkg/core"
11	"github.com/bnema/puregotk/v4/glib"
12	"github.com/bnema/puregotk/v4/gobject"
13	"github.com/bnema/puregotk/v4/gobject/types"
14)
15
16// The #GApplicationCommandLineClass-struct
17// contains private data only.
18type ApplicationCommandLineClass struct {
19	_ structs.HostLayout
20
21	ParentClass gobject.ObjectClass
22
23	xPrintLiteral uintptr
24
25	xPrinterrLiteral uintptr
26
27	xGetStdin uintptr
28
29	xDone uintptr
30
31	Padding [10]uintptr
32}
33
34func (x *ApplicationCommandLineClass) GoPointer() uintptr {
35	return uintptr(unsafe.Pointer(x))
36}
37
38// OverridePrintLiteral sets the "print_literal" callback function.
39func (x *ApplicationCommandLineClass) OverridePrintLiteral(cb func(*ApplicationCommandLine, string)) {
40	if cb == nil {
41		x.xPrintLiteral = 0
42	} else {
43		x.xPrintLiteral = purego.NewCallback(func(CmdlineVarp uintptr, MessageVarp string) {
44			cb(ApplicationCommandLineNewFromInternalPtr(CmdlineVarp), MessageVarp)
45		})
46	}
47}
48
49// GetPrintLiteral gets the "print_literal" callback function.
50func (x *ApplicationCommandLineClass) GetPrintLiteral() func(*ApplicationCommandLine, string) {
51	if x.xPrintLiteral == 0 {
52		return nil
53	}
54	var rawCallback func(CmdlineVarp uintptr, MessageVarp string)
55	purego.RegisterFunc(&rawCallback, x.xPrintLiteral)
56	return func(CmdlineVar *ApplicationCommandLine, MessageVar string) {
57		rawCallback(CmdlineVar.GoPointer(), MessageVar)
58	}
59}
60
61// OverridePrinterrLiteral sets the "printerr_literal" callback function.
62func (x *ApplicationCommandLineClass) OverridePrinterrLiteral(cb func(*ApplicationCommandLine, string)) {
63	if cb == nil {
64		x.xPrinterrLiteral = 0
65	} else {
66		x.xPrinterrLiteral = purego.NewCallback(func(CmdlineVarp uintptr, MessageVarp string) {
67			cb(ApplicationCommandLineNewFromInternalPtr(CmdlineVarp), MessageVarp)
68		})
69	}
70}
71
72// GetPrinterrLiteral gets the "printerr_literal" callback function.
73func (x *ApplicationCommandLineClass) GetPrinterrLiteral() func(*ApplicationCommandLine, string) {
74	if x.xPrinterrLiteral == 0 {
75		return nil
76	}
77	var rawCallback func(CmdlineVarp uintptr, MessageVarp string)
78	purego.RegisterFunc(&rawCallback, x.xPrinterrLiteral)
79	return func(CmdlineVar *ApplicationCommandLine, MessageVar string) {
80		rawCallback(CmdlineVar.GoPointer(), MessageVar)
81	}
82}
83
84// OverrideGetStdin sets the "get_stdin" callback function.
85func (x *ApplicationCommandLineClass) OverrideGetStdin(cb func(*ApplicationCommandLine) *InputStream) {
86	if cb == nil {
87		x.xGetStdin = 0
88	} else {
89		x.xGetStdin = purego.NewCallback(func(CmdlineVarp uintptr) uintptr {
90			ret := cb(ApplicationCommandLineNewFromInternalPtr(CmdlineVarp))
91			if ret == nil {
92				return 0
93			}
94			return ret.GoPointer()
95		})
96	}
97}
98
99// GetGetStdin gets the "get_stdin" callback function.
100func (x *ApplicationCommandLineClass) GetGetStdin() func(*ApplicationCommandLine) *InputStream {
101	if x.xGetStdin == 0 {
102		return nil
103	}
104	var rawCallback func(CmdlineVarp uintptr) uintptr
105	purego.RegisterFunc(&rawCallback, x.xGetStdin)
106	return func(CmdlineVar *ApplicationCommandLine) *InputStream {
107		rawRet := rawCallback(CmdlineVar.GoPointer())
108		if rawRet == 0 {
109			return nil
110		}
111		ret := &InputStream{}
112		ret.Ptr = rawRet
113		return ret
114	}
115}
116
117// OverrideDone sets the "done" callback function.
118func (x *ApplicationCommandLineClass) OverrideDone(cb func(*ApplicationCommandLine)) {
119	if cb == nil {
120		x.xDone = 0
121	} else {
122		x.xDone = purego.NewCallback(func(CmdlineVarp uintptr) {
123			cb(ApplicationCommandLineNewFromInternalPtr(CmdlineVarp))
124		})
125	}
126}
127
128// GetDone gets the "done" callback function.
129func (x *ApplicationCommandLineClass) GetDone() func(*ApplicationCommandLine) {
130	if x.xDone == 0 {
131		return nil
132	}
133	var rawCallback func(CmdlineVarp uintptr)
134	purego.RegisterFunc(&rawCallback, x.xDone)
135	return func(CmdlineVar *ApplicationCommandLine) {
136		rawCallback(CmdlineVar.GoPointer())
137	}
138}
139
140type ApplicationCommandLinePrivate struct {
141	_ structs.HostLayout
142}
143
144func (x *ApplicationCommandLinePrivate) GoPointer() uintptr {
145	return uintptr(unsafe.Pointer(x))
146}
147
148// `GApplicationCommandLine` represents a command-line invocation of
149// an application.
150//
151// It is created by [class@Gio.Application] and emitted
152// in the [signal@Gio.Application::command-line] signal and virtual function.
153//
154// The class contains the list of arguments that the program was invoked
155// with. It is also possible to query if the commandline invocation was
156// local (ie: the current process is running in direct response to the
157// invocation) or remote (ie: some other process forwarded the
158// commandline to this process).
159//
160// The `GApplicationCommandLine` object can provide the @argc and @argv
161// parameters for use with the [struct@GLib.OptionContext] command-line parsing API,
162// with the [method@Gio.ApplicationCommandLine.get_arguments] function. See
163// [gapplication-example-cmdline3.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline3.c)
164// for an example.
165//
166// The exit status of the originally-invoked process may be set and
167// messages can be printed to stdout or stderr of that process.
168//
169// For remote invocation, the originally-invoked process exits when
170// [method@Gio.ApplicationCommandLine.done] method is called. This method is
171// also automatically called when the object is disposed.
172//
173// The main use for `GApplicationCommandLine` (and the
174// [signal@Gio.Application::command-line] signal) is 'Emacs server' like use cases:
175// You can set the `EDITOR` environment variable to have e.g. git use
176// your favourite editor to edit commit messages, and if you already
177// have an instance of the editor running, the editing will happen
178// in the running instance, instead of opening a new one. An important
179// aspect of this use case is that the process that gets started by git
180// does not return until the editing is done.
181//
182// Normally, the commandline is completely handled in the
183// [signal@Gio.Application::command-line] handler. The launching instance exits
184// once the signal handler in the primary instance has returned, and
185// the return value of the signal handler becomes the exit status
186// of the launching instance.
187//
188// ```c
189// static int
190// command_line (GApplication            *application,
191//
192//	GApplicationCommandLine *cmdline)
193//
194//	{
195//	  gchar **argv;
196//	  gint argc;
197//	  gint i;
198//
199//	  argv = g_application_command_line_get_arguments (cmdline, &argc);
200//
201//	  g_application_command_line_print (cmdline,
202//	                                    "This text is written back\n"
203//	                                    "to stdout of the caller\n");
204//
205//	  for (i = 0; i < argc; i++)
206//	    g_print ("argument %d: %s\n", i, argv[i]);
207//
208//	  g_strfreev (argv);
209//
210//	  return 0;
211//	}
212//
213// ```
214//
215// The complete example can be found here:
216// [gapplication-example-cmdline.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline.c)
217//
218// In more complicated cases, the handling of the commandline can be
219// split between the launcher and the primary instance.
220//
221// ```c
222// static gboolean
223//
224//	test_local_cmdline (GApplication   *application,
225//	                    gchar        ***arguments,
226//	                    gint           *exit_status)
227//
228//	{
229//	  gint i, j;
230//	  gchar **argv;
231//
232//	  argv = *arguments;
233//
234//	  if (argv[0] == NULL)
235//	    {
236//	      *exit_status = 0;
237//	      return FALSE;
238//	    }
239//
240//	  i = 1;
241//	  while (argv[i])
242//	    {
243//	      if (g_str_has_prefix (argv[i], "--local-"))
244//	        {
245//	          g_print ("handling argument %s locally\n", argv[i]);
246//	          g_free (argv[i]);
247//	          for (j = i; argv[j]; j++)
248//	            argv[j] = argv[j + 1];
249//	        }
250//	      else
251//	        {
252//	          g_print ("not handling argument %s locally\n", argv[i]);
253//	          i++;
254//	        }
255//	    }
256//
257//	  *exit_status = 0;
258//
259//	  return FALSE;
260//	}
261//
262// static void
263// test_application_class_init (TestApplicationClass *class)
264//
265//	{
266//	  G_APPLICATION_CLASS (class)->local_command_line = test_local_cmdline;
267//
268//	  ...
269//	}
270//
271// ```
272//
273// In this example of split commandline handling, options that start
274// with `--local-` are handled locally, all other options are passed
275// to the [signal@Gio.Application::command-line] handler which runs in the primary
276// instance.
277//
278// The complete example can be found here:
279// [gapplication-example-cmdline2.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline2.c)
280//
281// If handling the commandline requires a lot of work, it may be better to defer it.
282//
283// ```c
284// static gboolean
285// my_cmdline_handler (gpointer data)
286//
287//	{
288//	  GApplicationCommandLine *cmdline = data;
289//
290//	  // do the heavy lifting in an idle
291//
292//	  g_application_command_line_set_exit_status (cmdline, 0);
293//	  g_object_unref (cmdline); // this releases the application
294//
295//	  return G_SOURCE_REMOVE;
296//	}
297//
298// static int
299// command_line (GApplication            *application,
300//
301//	GApplicationCommandLine *cmdline)
302//
303//	{
304//	  // keep the application running until we are done with this commandline
305//	  g_application_hold (application);
306//
307//	  g_object_set_data_full (G_OBJECT (cmdline),
308//	                          "application", application,
309//	                          (GDestroyNotify)g_application_release);
310//
311//	  g_object_ref (cmdline);
312//	  g_idle_add (my_cmdline_handler, cmdline);
313//
314//	  return 0;
315//	}
316//
317// ```
318//
319// In this example the commandline is not completely handled before
320// the [signal@Gio.Application::command-line] handler returns. Instead, we keep
321// a reference to the `GApplicationCommandLine` object and handle it
322// later (in this example, in an idle). Note that it is necessary to
323// hold the application until you are done with the commandline.
324//
325// The complete example can be found here:
326// [gapplication-example-cmdline3.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gapplication-example-cmdline3.c)
327type ApplicationCommandLine struct {
328	gobject.Object
329}
330
331var xApplicationCommandLineGLibType func() types.GType
332
333func ApplicationCommandLineGLibType() types.GType {
334	return xApplicationCommandLineGLibType()
335}
336
337func ApplicationCommandLineNewFromInternalPtr(ptr uintptr) *ApplicationCommandLine {
338	cls := &ApplicationCommandLine{}
339	cls.Ptr = ptr
340	return cls
341}
342
343var xApplicationCommandLineCreateFileForArg func(uintptr, string) uintptr
344
345// Creates a #GFile corresponding to a filename that was given as part
346// of the invocation of @cmdline.
347//
348// This differs from g_file_new_for_commandline_arg() in that it
349// resolves relative pathnames using the current working directory of
350// the invoking process rather than the local process.
351func (x *ApplicationCommandLine) CreateFileForArg(ArgVar string) *FileBase {
352	var cls *FileBase
353
354	cret := xApplicationCommandLineCreateFileForArg(x.GoPointer(), ArgVar)
355
356	if cret == 0 {
357		return nil
358	}
359	cls = &FileBase{}
360	cls.Ptr = cret
361	return cls
362}
363
364var xApplicationCommandLineDone func(uintptr)
365
366// Signals that command line processing is completed.
367//
368// For remote invocation, it causes the invoking process to terminate.
369//
370// For local invocation, it does nothing.
371//
372// This method should be called in the [signal@Gio.Application::command-line]
373// handler, after the exit status is set and all messages are printed.
374//
375// After this call, g_application_command_line_set_exit_status() has no effect.
376// Subsequent calls to this method are no-ops.
377//
378// This method is automatically called when the #GApplicationCommandLine
379// object is disposed — so you can omit the call in non-garbage collected
380// languages.
381func (x *ApplicationCommandLine) Done() {
382
383	xApplicationCommandLineDone(x.GoPointer())
384
385}
386
387var xApplicationCommandLineGetArguments func(uintptr, *int) []string
388
389// Gets the list of arguments that was passed on the command line.
390//
391// The strings in the array may contain non-UTF-8 data on UNIX (such as
392// filenames or arguments given in the system locale) but are always in
393// UTF-8 on Windows.
394//
395// If you wish to use the return value with #GOptionContext, you must
396// use g_option_context_parse_strv().
397//
398// The return value is %NULL-terminated and should be freed using
399// g_strfreev().
400func (x *ApplicationCommandLine) GetArguments(ArgcVar *int) []string {
401
402	cret := xApplicationCommandLineGetArguments(x.GoPointer(), ArgcVar)
403	return cret
404}
405
406var xApplicationCommandLineGetCwd func(uintptr) string
407
408// Gets the working directory of the command line invocation.
409// The string may contain non-utf8 data.
410//
411// It is possible that the remote application did not send a working
412// directory, so this may be %NULL.
413//
414// The return value should not be modified or freed and is valid for as
415// long as @cmdline exists.
416func (x *ApplicationCommandLine) GetCwd() string {
417
418	cret := xApplicationCommandLineGetCwd(x.GoPointer())
419	return cret
420}
421
422var xApplicationCommandLineGetEnviron func(uintptr) []string
423
424// Gets the contents of the 'environ' variable of the command line
425// invocation, as would be returned by g_get_environ(), ie as a
426// %NULL-terminated list of strings in the form 'NAME=VALUE'.
427// The strings may contain non-utf8 data.
428//
429// The remote application usually does not send an environment.  Use
430// %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
431// set it is possible that the environment is still not available (due
432// to invocation messages from other applications).
433//
434// The return value should not be modified or freed and is valid for as
435// long as @cmdline exists.
436//
437// See g_application_command_line_getenv() if you are only interested
438// in the value of a single environment variable.
439func (x *ApplicationCommandLine) GetEnviron() []string {
440
441	cret := xApplicationCommandLineGetEnviron(x.GoPointer())
442	return cret
443}
444
445var xApplicationCommandLineGetExitStatus func(uintptr) int
446
447// Gets the exit status of @cmdline.  See
448// g_application_command_line_set_exit_status() for more information.
449func (x *ApplicationCommandLine) GetExitStatus() int {
450
451	cret := xApplicationCommandLineGetExitStatus(x.GoPointer())
452	return cret
453}
454
455var xApplicationCommandLineGetIsRemote func(uintptr) bool
456
457// Determines if @cmdline represents a remote invocation.
458func (x *ApplicationCommandLine) GetIsRemote() bool {
459
460	cret := xApplicationCommandLineGetIsRemote(x.GoPointer())
461	return cret
462}
463
464var xApplicationCommandLineGetOptionsDict func(uintptr) *glib.VariantDict
465
466// Gets the options that were passed to g_application_command_line().
467//
468// If you did not override local_command_line() then these are the same
469// options that were parsed according to the #GOptionEntrys added to the
470// application with g_application_add_main_option_entries() and possibly
471// modified from your GApplication::handle-local-options handler.
472//
473// If no options were sent then an empty dictionary is returned so that
474// you don't need to check for %NULL.
475//
476// The data has been passed via an untrusted external process, so the types of
477// all values must be checked before being used.
478func (x *ApplicationCommandLine) GetOptionsDict() *glib.VariantDict {
479
480	cret := xApplicationCommandLineGetOptionsDict(x.GoPointer())
481	return cret
482}
483
484var xApplicationCommandLineGetPlatformData func(uintptr) *glib.Variant
485
486// Gets the platform data associated with the invocation of @cmdline.
487//
488// This is a #GVariant dictionary containing information about the
489// context in which the invocation occurred.  It typically contains
490// information like the current working directory and the startup
491// notification ID.
492//
493// It comes from an untrusted external process and hence the types of all
494// values must be validated before being used.
495//
496// For local invocation, it will be %NULL.
497func (x *ApplicationCommandLine) GetPlatformData() *glib.Variant {
498
499	cret := xApplicationCommandLineGetPlatformData(x.GoPointer())
500	return cret
501}
502
503var xApplicationCommandLineGetStdin func(uintptr) uintptr
504
505// Gets the stdin of the invoking process.
506//
507// The #GInputStream can be used to read data passed to the standard
508// input of the invoking process.
509// This doesn't work on all platforms.  Presently, it is only available
510// on UNIX when using a D-Bus daemon capable of passing file descriptors.
511// If stdin is not available then %NULL will be returned.  In the
512// future, support may be expanded to other platforms.
513//
514// You must only call this function once per commandline invocation.
515func (x *ApplicationCommandLine) GetStdin() *InputStream {
516	var cls *InputStream
517
518	cret := xApplicationCommandLineGetStdin(x.GoPointer())
519
520	if cret == 0 {
521		return nil
522	}
523	cls = &InputStream{}
524	cls.Ptr = cret
525	return cls
526}
527
528var xApplicationCommandLineGetenv func(uintptr, string) string
529
530// Gets the value of a particular environment variable of the command
531// line invocation, as would be returned by g_getenv().  The strings may
532// contain non-utf8 data.
533//
534// The remote application usually does not send an environment.  Use
535// %G_APPLICATION_SEND_ENVIRONMENT to affect that.  Even with this flag
536// set it is possible that the environment is still not available (due
537// to invocation messages from other applications).
538//
539// The return value should not be modified or freed and is valid for as
540// long as @cmdline exists.
541func (x *ApplicationCommandLine) Getenv(NameVar string) string {
542
543	cret := xApplicationCommandLineGetenv(x.GoPointer(), NameVar)
544	return cret
545}
546
547var xApplicationCommandLinePrint func(uintptr, string, ...interface{})
548
549// Formats a message and prints it using the stdout print handler in the
550// invoking process.
551//
552// If @cmdline is a local invocation then this is exactly equivalent to
553// g_print().  If @cmdline is remote then this is equivalent to calling
554// g_print() in the invoking process.
555func (x *ApplicationCommandLine) Print(FormatVar string, varArgs ...interface{}) {
556
557	xApplicationCommandLinePrint(x.GoPointer(), FormatVar, varArgs...)
558
559}
560
561var xApplicationCommandLinePrintLiteral func(uintptr, string)
562
563// Prints a message using the stdout print handler in the invoking process.
564//
565// Unlike g_application_command_line_print(), @message is not a `printf()`-style
566// format string. Use this function if @message contains text you don't have
567// control over, that could include `printf()` escape sequences.
568func (x *ApplicationCommandLine) PrintLiteral(MessageVar string) {
569
570	xApplicationCommandLinePrintLiteral(x.GoPointer(), MessageVar)
571
572}
573
574var xApplicationCommandLinePrinterr func(uintptr, string, ...interface{})
575
576// Formats a message and prints it using the stderr print handler in the
577// invoking process.
578//
579// If @cmdline is a local invocation then this is exactly equivalent to
580// g_printerr().  If @cmdline is remote then this is equivalent to
581// calling g_printerr() in the invoking process.
582func (x *ApplicationCommandLine) Printerr(FormatVar string, varArgs ...interface{}) {
583
584	xApplicationCommandLinePrinterr(x.GoPointer(), FormatVar, varArgs...)
585
586}
587
588var xApplicationCommandLinePrinterrLiteral func(uintptr, string)
589
590// Prints a message using the stderr print handler in the invoking process.
591//
592// Unlike g_application_command_line_printerr(), @message is not
593// a `printf()`-style format string. Use this function if @message contains text
594// you don't have control over, that could include `printf()` escape sequences.
595func (x *ApplicationCommandLine) PrinterrLiteral(MessageVar string) {
596
597	xApplicationCommandLinePrinterrLiteral(x.GoPointer(), MessageVar)
598
599}
600
601var xApplicationCommandLineSetExitStatus func(uintptr, int)
602
603// Sets the exit status that will be used when the invoking process
604// exits.
605//
606// The return value of the #GApplication::command-line signal is
607// passed to this function when the handler returns.  This is the usual
608// way of setting the exit status.
609//
610// In the event that you want the remote invocation to continue running
611// and want to decide on the exit status in the future, you can use this
612// call.  For the case of a remote invocation, the remote process will
613// typically exit when the last reference is dropped on @cmdline.  The
614// exit status of the remote process will be equal to the last value
615// that was set with this function.
616//
617// In the case that the commandline invocation is local, the situation
618// is slightly more complicated.  If the commandline invocation results
619// in the mainloop running (ie: because the use-count of the application
620// increased to a non-zero value) then the application is considered to
621// have been 'successful' in a certain sense, and the exit status is
622// always zero.  If the application use count is zero, though, the exit
623// status of the local #GApplicationCommandLine is used.
624//
625// This method is a no-op if g_application_command_line_done() has
626// been called.
627func (x *ApplicationCommandLine) SetExitStatus(ExitStatusVar int) {
628
629	xApplicationCommandLineSetExitStatus(x.GoPointer(), ExitStatusVar)
630
631}
632
633func (c *ApplicationCommandLine) GoPointer() uintptr {
634	if c == nil {
635		return 0
636	}
637	return c.Ptr
638}
639
640func (c *ApplicationCommandLine) SetGoPointer(ptr uintptr) {
641	c.Ptr = ptr
642}
643
644// SetPropertyArguments sets the "arguments" property.
645// The commandline that caused this [signal@Gio.Application::command-line]
646// signal emission.
647func (x *ApplicationCommandLine) SetPropertyArguments(value uintptr) {
648	var v gobject.Value
649	v.Init(gobject.TypePointerVal)
650	v.SetPointer(value)
651	x.SetProperty("arguments", &v)
652}
653
654// GetPropertyIsRemote gets the "is-remote" property.
655// Whether this is a remote commandline.
656func (x *ApplicationCommandLine) GetPropertyIsRemote() bool {
657	var v gobject.Value
658	x.GetProperty("is-remote", &v)
659	return v.GetBoolean()
660}
661
662// SetPropertyOptions sets the "options" property.
663// The options sent along with the commandline.
664func (x *ApplicationCommandLine) SetPropertyOptions(value uintptr) {
665	var v gobject.Value
666	v.Init(gobject.TypePointerVal)
667	v.SetPointer(value)
668	x.SetProperty("options", &v)
669}
670
671// SetPropertyPlatformData sets the "platform-data" property.
672// Platform-specific data for the commandline.
673func (x *ApplicationCommandLine) SetPropertyPlatformData(value uintptr) {
674	var v gobject.Value
675	v.Init(gobject.TypePointerVal)
676	v.SetPointer(value)
677	x.SetProperty("platform-data", &v)
678}
679
680func init() {
681	core.SetPackageName("GIO", "gio-2.0")
682	core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0"})
683	var libs []uintptr
684	for _, libPath := range core.GetPaths("GIO") {
685		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
686		if err != nil {
687			panic(err)
688		}
689		libs = append(libs, lib)
690	}
691
692	core.PuregoSafeRegister(&xApplicationCommandLineGLibType, libs, "g_application_command_line_get_type")
693
694	core.PuregoSafeRegister(&xApplicationCommandLineCreateFileForArg, libs, "g_application_command_line_create_file_for_arg")
695	core.PuregoSafeRegister(&xApplicationCommandLineDone, libs, "g_application_command_line_done")
696	core.PuregoSafeRegister(&xApplicationCommandLineGetArguments, libs, "g_application_command_line_get_arguments")
697	core.PuregoSafeRegister(&xApplicationCommandLineGetCwd, libs, "g_application_command_line_get_cwd")
698	core.PuregoSafeRegister(&xApplicationCommandLineGetEnviron, libs, "g_application_command_line_get_environ")
699	core.PuregoSafeRegister(&xApplicationCommandLineGetExitStatus, libs, "g_application_command_line_get_exit_status")
700	core.PuregoSafeRegister(&xApplicationCommandLineGetIsRemote, libs, "g_application_command_line_get_is_remote")
701	core.PuregoSafeRegister(&xApplicationCommandLineGetOptionsDict, libs, "g_application_command_line_get_options_dict")
702	core.PuregoSafeRegister(&xApplicationCommandLineGetPlatformData, libs, "g_application_command_line_get_platform_data")
703	core.PuregoSafeRegister(&xApplicationCommandLineGetStdin, libs, "g_application_command_line_get_stdin")
704	core.PuregoSafeRegister(&xApplicationCommandLineGetenv, libs, "g_application_command_line_getenv")
705	core.PuregoSafeRegister(&xApplicationCommandLinePrint, libs, "g_application_command_line_print")
706	core.PuregoSafeRegister(&xApplicationCommandLinePrintLiteral, libs, "g_application_command_line_print_literal")
707	core.PuregoSafeRegister(&xApplicationCommandLinePrinterr, libs, "g_application_command_line_printerr")
708	core.PuregoSafeRegister(&xApplicationCommandLinePrinterrLiteral, libs, "g_application_command_line_printerr_literal")
709	core.PuregoSafeRegister(&xApplicationCommandLineSetExitStatus, libs, "g_application_command_line_set_exit_status")
710
711}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close