v0.2.1 c0399be

gmountoperation.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
16type MountOperationClass struct {
17	_ structs.HostLayout
18
19	ParentClass gobject.ObjectClass
20
21	xAskPassword uintptr
22
23	xAskQuestion uintptr
24
25	xReply uintptr
26
27	xAborted uintptr
28
29	xShowProcesses uintptr
30
31	xShowUnmountProgress uintptr
32
33	xGReserved1 uintptr
34
35	xGReserved2 uintptr
36
37	xGReserved3 uintptr
38
39	xGReserved4 uintptr
40
41	xGReserved5 uintptr
42
43	xGReserved6 uintptr
44
45	xGReserved7 uintptr
46
47	xGReserved8 uintptr
48
49	xGReserved9 uintptr
50}
51
52func (x *MountOperationClass) GoPointer() uintptr {
53	return uintptr(unsafe.Pointer(x))
54}
55
56// OverrideAskPassword sets the "ask_password" callback function.
57func (x *MountOperationClass) OverrideAskPassword(cb func(*MountOperation, string, string, string, AskPasswordFlags)) {
58	if cb == nil {
59		x.xAskPassword = 0
60	} else {
61		x.xAskPassword = purego.NewCallback(func(OpVarp uintptr, MessageVarp string, DefaultUserVarp string, DefaultDomainVarp string, FlagsVarp AskPasswordFlags) {
62			cb(MountOperationNewFromInternalPtr(OpVarp), MessageVarp, DefaultUserVarp, DefaultDomainVarp, FlagsVarp)
63		})
64	}
65}
66
67// GetAskPassword gets the "ask_password" callback function.
68func (x *MountOperationClass) GetAskPassword() func(*MountOperation, string, string, string, AskPasswordFlags) {
69	if x.xAskPassword == 0 {
70		return nil
71	}
72	var rawCallback func(OpVarp uintptr, MessageVarp string, DefaultUserVarp string, DefaultDomainVarp string, FlagsVarp AskPasswordFlags)
73	purego.RegisterFunc(&rawCallback, x.xAskPassword)
74	return func(OpVar *MountOperation, MessageVar string, DefaultUserVar string, DefaultDomainVar string, FlagsVar AskPasswordFlags) {
75		rawCallback(OpVar.GoPointer(), MessageVar, DefaultUserVar, DefaultDomainVar, FlagsVar)
76	}
77}
78
79// OverrideAskQuestion sets the "ask_question" callback function.
80func (x *MountOperationClass) OverrideAskQuestion(cb func(*MountOperation, string, []string)) {
81	if cb == nil {
82		x.xAskQuestion = 0
83	} else {
84		x.xAskQuestion = purego.NewCallback(func(OpVarp uintptr, MessageVarp string, ChoicesVarp []string) {
85			cb(MountOperationNewFromInternalPtr(OpVarp), MessageVarp, ChoicesVarp)
86		})
87	}
88}
89
90// GetAskQuestion gets the "ask_question" callback function.
91func (x *MountOperationClass) GetAskQuestion() func(*MountOperation, string, []string) {
92	if x.xAskQuestion == 0 {
93		return nil
94	}
95	var rawCallback func(OpVarp uintptr, MessageVarp string, ChoicesVarp []string)
96	purego.RegisterFunc(&rawCallback, x.xAskQuestion)
97	return func(OpVar *MountOperation, MessageVar string, ChoicesVar []string) {
98		rawCallback(OpVar.GoPointer(), MessageVar, ChoicesVar)
99	}
100}
101
102// OverrideReply sets the "reply" callback function.
103func (x *MountOperationClass) OverrideReply(cb func(*MountOperation, MountOperationResult)) {
104	if cb == nil {
105		x.xReply = 0
106	} else {
107		x.xReply = purego.NewCallback(func(OpVarp uintptr, ResultVarp MountOperationResult) {
108			cb(MountOperationNewFromInternalPtr(OpVarp), ResultVarp)
109		})
110	}
111}
112
113// GetReply gets the "reply" callback function.
114func (x *MountOperationClass) GetReply() func(*MountOperation, MountOperationResult) {
115	if x.xReply == 0 {
116		return nil
117	}
118	var rawCallback func(OpVarp uintptr, ResultVarp MountOperationResult)
119	purego.RegisterFunc(&rawCallback, x.xReply)
120	return func(OpVar *MountOperation, ResultVar MountOperationResult) {
121		rawCallback(OpVar.GoPointer(), ResultVar)
122	}
123}
124
125// OverrideAborted sets the "aborted" callback function.
126func (x *MountOperationClass) OverrideAborted(cb func(*MountOperation)) {
127	if cb == nil {
128		x.xAborted = 0
129	} else {
130		x.xAborted = purego.NewCallback(func(OpVarp uintptr) {
131			cb(MountOperationNewFromInternalPtr(OpVarp))
132		})
133	}
134}
135
136// GetAborted gets the "aborted" callback function.
137func (x *MountOperationClass) GetAborted() func(*MountOperation) {
138	if x.xAborted == 0 {
139		return nil
140	}
141	var rawCallback func(OpVarp uintptr)
142	purego.RegisterFunc(&rawCallback, x.xAborted)
143	return func(OpVar *MountOperation) {
144		rawCallback(OpVar.GoPointer())
145	}
146}
147
148// OverrideShowProcesses sets the "show_processes" callback function.
149func (x *MountOperationClass) OverrideShowProcesses(cb func(*MountOperation, string, []glib.Pid, []string)) {
150	if cb == nil {
151		x.xShowProcesses = 0
152	} else {
153		x.xShowProcesses = purego.NewCallback(func(OpVarp uintptr, MessageVarp string, ProcessesVarp []glib.Pid, ChoicesVarp []string) {
154			cb(MountOperationNewFromInternalPtr(OpVarp), MessageVarp, ProcessesVarp, ChoicesVarp)
155		})
156	}
157}
158
159// GetShowProcesses gets the "show_processes" callback function.
160func (x *MountOperationClass) GetShowProcesses() func(*MountOperation, string, []glib.Pid, []string) {
161	if x.xShowProcesses == 0 {
162		return nil
163	}
164	var rawCallback func(OpVarp uintptr, MessageVarp string, ProcessesVarp []glib.Pid, ChoicesVarp []string)
165	purego.RegisterFunc(&rawCallback, x.xShowProcesses)
166	return func(OpVar *MountOperation, MessageVar string, ProcessesVar []glib.Pid, ChoicesVar []string) {
167		rawCallback(OpVar.GoPointer(), MessageVar, ProcessesVar, ChoicesVar)
168	}
169}
170
171// OverrideShowUnmountProgress sets the "show_unmount_progress" callback function.
172func (x *MountOperationClass) OverrideShowUnmountProgress(cb func(*MountOperation, string, int64, int64)) {
173	if cb == nil {
174		x.xShowUnmountProgress = 0
175	} else {
176		x.xShowUnmountProgress = purego.NewCallback(func(OpVarp uintptr, MessageVarp string, TimeLeftVarp int64, BytesLeftVarp int64) {
177			cb(MountOperationNewFromInternalPtr(OpVarp), MessageVarp, TimeLeftVarp, BytesLeftVarp)
178		})
179	}
180}
181
182// GetShowUnmountProgress gets the "show_unmount_progress" callback function.
183func (x *MountOperationClass) GetShowUnmountProgress() func(*MountOperation, string, int64, int64) {
184	if x.xShowUnmountProgress == 0 {
185		return nil
186	}
187	var rawCallback func(OpVarp uintptr, MessageVarp string, TimeLeftVarp int64, BytesLeftVarp int64)
188	purego.RegisterFunc(&rawCallback, x.xShowUnmountProgress)
189	return func(OpVar *MountOperation, MessageVar string, TimeLeftVar int64, BytesLeftVar int64) {
190		rawCallback(OpVar.GoPointer(), MessageVar, TimeLeftVar, BytesLeftVar)
191	}
192}
193
194// OverrideGReserved1 sets the "_g_reserved1" callback function.
195func (x *MountOperationClass) OverrideGReserved1(cb func()) {
196	if cb == nil {
197		x.xGReserved1 = 0
198	} else {
199		x.xGReserved1 = purego.NewCallback(func() {
200			cb()
201		})
202	}
203}
204
205// GetGReserved1 gets the "_g_reserved1" callback function.
206func (x *MountOperationClass) GetGReserved1() func() {
207	if x.xGReserved1 == 0 {
208		return nil
209	}
210	var rawCallback func()
211	purego.RegisterFunc(&rawCallback, x.xGReserved1)
212	return func() {
213		rawCallback()
214	}
215}
216
217// OverrideGReserved2 sets the "_g_reserved2" callback function.
218func (x *MountOperationClass) OverrideGReserved2(cb func()) {
219	if cb == nil {
220		x.xGReserved2 = 0
221	} else {
222		x.xGReserved2 = purego.NewCallback(func() {
223			cb()
224		})
225	}
226}
227
228// GetGReserved2 gets the "_g_reserved2" callback function.
229func (x *MountOperationClass) GetGReserved2() func() {
230	if x.xGReserved2 == 0 {
231		return nil
232	}
233	var rawCallback func()
234	purego.RegisterFunc(&rawCallback, x.xGReserved2)
235	return func() {
236		rawCallback()
237	}
238}
239
240// OverrideGReserved3 sets the "_g_reserved3" callback function.
241func (x *MountOperationClass) OverrideGReserved3(cb func()) {
242	if cb == nil {
243		x.xGReserved3 = 0
244	} else {
245		x.xGReserved3 = purego.NewCallback(func() {
246			cb()
247		})
248	}
249}
250
251// GetGReserved3 gets the "_g_reserved3" callback function.
252func (x *MountOperationClass) GetGReserved3() func() {
253	if x.xGReserved3 == 0 {
254		return nil
255	}
256	var rawCallback func()
257	purego.RegisterFunc(&rawCallback, x.xGReserved3)
258	return func() {
259		rawCallback()
260	}
261}
262
263// OverrideGReserved4 sets the "_g_reserved4" callback function.
264func (x *MountOperationClass) OverrideGReserved4(cb func()) {
265	if cb == nil {
266		x.xGReserved4 = 0
267	} else {
268		x.xGReserved4 = purego.NewCallback(func() {
269			cb()
270		})
271	}
272}
273
274// GetGReserved4 gets the "_g_reserved4" callback function.
275func (x *MountOperationClass) GetGReserved4() func() {
276	if x.xGReserved4 == 0 {
277		return nil
278	}
279	var rawCallback func()
280	purego.RegisterFunc(&rawCallback, x.xGReserved4)
281	return func() {
282		rawCallback()
283	}
284}
285
286// OverrideGReserved5 sets the "_g_reserved5" callback function.
287func (x *MountOperationClass) OverrideGReserved5(cb func()) {
288	if cb == nil {
289		x.xGReserved5 = 0
290	} else {
291		x.xGReserved5 = purego.NewCallback(func() {
292			cb()
293		})
294	}
295}
296
297// GetGReserved5 gets the "_g_reserved5" callback function.
298func (x *MountOperationClass) GetGReserved5() func() {
299	if x.xGReserved5 == 0 {
300		return nil
301	}
302	var rawCallback func()
303	purego.RegisterFunc(&rawCallback, x.xGReserved5)
304	return func() {
305		rawCallback()
306	}
307}
308
309// OverrideGReserved6 sets the "_g_reserved6" callback function.
310func (x *MountOperationClass) OverrideGReserved6(cb func()) {
311	if cb == nil {
312		x.xGReserved6 = 0
313	} else {
314		x.xGReserved6 = purego.NewCallback(func() {
315			cb()
316		})
317	}
318}
319
320// GetGReserved6 gets the "_g_reserved6" callback function.
321func (x *MountOperationClass) GetGReserved6() func() {
322	if x.xGReserved6 == 0 {
323		return nil
324	}
325	var rawCallback func()
326	purego.RegisterFunc(&rawCallback, x.xGReserved6)
327	return func() {
328		rawCallback()
329	}
330}
331
332// OverrideGReserved7 sets the "_g_reserved7" callback function.
333func (x *MountOperationClass) OverrideGReserved7(cb func()) {
334	if cb == nil {
335		x.xGReserved7 = 0
336	} else {
337		x.xGReserved7 = purego.NewCallback(func() {
338			cb()
339		})
340	}
341}
342
343// GetGReserved7 gets the "_g_reserved7" callback function.
344func (x *MountOperationClass) GetGReserved7() func() {
345	if x.xGReserved7 == 0 {
346		return nil
347	}
348	var rawCallback func()
349	purego.RegisterFunc(&rawCallback, x.xGReserved7)
350	return func() {
351		rawCallback()
352	}
353}
354
355// OverrideGReserved8 sets the "_g_reserved8" callback function.
356func (x *MountOperationClass) OverrideGReserved8(cb func()) {
357	if cb == nil {
358		x.xGReserved8 = 0
359	} else {
360		x.xGReserved8 = purego.NewCallback(func() {
361			cb()
362		})
363	}
364}
365
366// GetGReserved8 gets the "_g_reserved8" callback function.
367func (x *MountOperationClass) GetGReserved8() func() {
368	if x.xGReserved8 == 0 {
369		return nil
370	}
371	var rawCallback func()
372	purego.RegisterFunc(&rawCallback, x.xGReserved8)
373	return func() {
374		rawCallback()
375	}
376}
377
378// OverrideGReserved9 sets the "_g_reserved9" callback function.
379func (x *MountOperationClass) OverrideGReserved9(cb func()) {
380	if cb == nil {
381		x.xGReserved9 = 0
382	} else {
383		x.xGReserved9 = purego.NewCallback(func() {
384			cb()
385		})
386	}
387}
388
389// GetGReserved9 gets the "_g_reserved9" callback function.
390func (x *MountOperationClass) GetGReserved9() func() {
391	if x.xGReserved9 == 0 {
392		return nil
393	}
394	var rawCallback func()
395	purego.RegisterFunc(&rawCallback, x.xGReserved9)
396	return func() {
397		rawCallback()
398	}
399}
400
401type MountOperationPrivate struct {
402	_ structs.HostLayout
403}
404
405func (x *MountOperationPrivate) GoPointer() uintptr {
406	return uintptr(unsafe.Pointer(x))
407}
408
409// `GMountOperation` provides a mechanism for interacting with the user.
410// It can be used for authenticating mountable operations, such as loop
411// mounting files, hard drive partitions or server locations. It can
412// also be used to ask the user questions or show a list of applications
413// preventing unmount or eject operations from completing.
414//
415// Note that `GMountOperation` is used for more than just [iface@Gio.Mount]
416// objects – for example it is also used in [method@Gio.Drive.start] and
417// [method@Gio.Drive.stop].
418//
419// Users should instantiate a subclass of this that implements all the
420// various callbacks to show the required dialogs, such as
421// [`GtkMountOperation`](https://docs.gtk.org/gtk4/class.MountOperation.html).
422// If no user interaction is desired (for example when automounting
423// filesystems at login time), usually `NULL` can be passed, see each method
424// taking a `GMountOperation` for details.
425//
426// Throughout the API, the term ‘TCRYPT’ is used to mean ‘compatible with TrueCrypt and VeraCrypt’.
427// [TrueCrypt](https://en.wikipedia.org/wiki/TrueCrypt) is a discontinued system for
428// encrypting file containers, partitions or whole disks, typically used with Windows.
429// [VeraCrypt](https://www.veracrypt.fr/) is a maintained fork of TrueCrypt with various
430// improvements and auditing fixes.
431type MountOperation struct {
432	gobject.Object
433}
434
435var xMountOperationGLibType func() types.GType
436
437func MountOperationGLibType() types.GType {
438	return xMountOperationGLibType()
439}
440
441func MountOperationNewFromInternalPtr(ptr uintptr) *MountOperation {
442	cls := &MountOperation{}
443	cls.Ptr = ptr
444	return cls
445}
446
447var xNewMountOperation func() uintptr
448
449// Creates a new mount operation.
450func NewMountOperation() *MountOperation {
451	var cls *MountOperation
452
453	cret := xNewMountOperation()
454
455	if cret == 0 {
456		return nil
457	}
458	cls = &MountOperation{}
459	cls.Ptr = cret
460	return cls
461}
462
463var xMountOperationGetAnonymous func(uintptr) bool
464
465// Check to see whether the mount operation is being used
466// for an anonymous user.
467func (x *MountOperation) GetAnonymous() bool {
468
469	cret := xMountOperationGetAnonymous(x.GoPointer())
470	return cret
471}
472
473var xMountOperationGetChoice func(uintptr) int
474
475// Gets a choice from the mount operation.
476func (x *MountOperation) GetChoice() int {
477
478	cret := xMountOperationGetChoice(x.GoPointer())
479	return cret
480}
481
482var xMountOperationGetDomain func(uintptr) string
483
484// Gets the domain of the mount operation.
485func (x *MountOperation) GetDomain() string {
486
487	cret := xMountOperationGetDomain(x.GoPointer())
488	return cret
489}
490
491var xMountOperationGetIsTcryptHiddenVolume func(uintptr) bool
492
493// Check to see whether the mount operation is being used
494// for a TCRYPT hidden volume.
495func (x *MountOperation) GetIsTcryptHiddenVolume() bool {
496
497	cret := xMountOperationGetIsTcryptHiddenVolume(x.GoPointer())
498	return cret
499}
500
501var xMountOperationGetIsTcryptSystemVolume func(uintptr) bool
502
503// Check to see whether the mount operation is being used
504// for a TCRYPT system volume.
505func (x *MountOperation) GetIsTcryptSystemVolume() bool {
506
507	cret := xMountOperationGetIsTcryptSystemVolume(x.GoPointer())
508	return cret
509}
510
511var xMountOperationGetPassword func(uintptr) string
512
513// Gets a password from the mount operation.
514func (x *MountOperation) GetPassword() string {
515
516	cret := xMountOperationGetPassword(x.GoPointer())
517	return cret
518}
519
520var xMountOperationGetPasswordSave func(uintptr) PasswordSave
521
522// Gets the state of saving passwords for the mount operation.
523func (x *MountOperation) GetPasswordSave() PasswordSave {
524
525	cret := xMountOperationGetPasswordSave(x.GoPointer())
526	return cret
527}
528
529var xMountOperationGetPim func(uintptr) uint
530
531// Gets a PIM from the mount operation.
532func (x *MountOperation) GetPim() uint {
533
534	cret := xMountOperationGetPim(x.GoPointer())
535	return cret
536}
537
538var xMountOperationGetUsername func(uintptr) string
539
540// Get the user name from the mount operation.
541func (x *MountOperation) GetUsername() string {
542
543	cret := xMountOperationGetUsername(x.GoPointer())
544	return cret
545}
546
547var xMountOperationReply func(uintptr, MountOperationResult)
548
549// Emits the #GMountOperation::reply signal.
550func (x *MountOperation) Reply(ResultVar MountOperationResult) {
551
552	xMountOperationReply(x.GoPointer(), ResultVar)
553
554}
555
556var xMountOperationSetAnonymous func(uintptr, bool)
557
558// Sets the mount operation to use an anonymous user if @anonymous is %TRUE.
559func (x *MountOperation) SetAnonymous(AnonymousVar bool) {
560
561	xMountOperationSetAnonymous(x.GoPointer(), AnonymousVar)
562
563}
564
565var xMountOperationSetChoice func(uintptr, int)
566
567// Sets a default choice for the mount operation.
568func (x *MountOperation) SetChoice(ChoiceVar int) {
569
570	xMountOperationSetChoice(x.GoPointer(), ChoiceVar)
571
572}
573
574var xMountOperationSetDomain func(uintptr, uintptr)
575
576// Sets the mount operation's domain.
577func (x *MountOperation) SetDomain(DomainVar *string) {
578
579	DomainVarPtr := core.GStrdupNullable(DomainVar)
580	defer core.GFreeNullable(DomainVarPtr)
581
582	xMountOperationSetDomain(x.GoPointer(), DomainVarPtr)
583
584}
585
586var xMountOperationSetIsTcryptHiddenVolume func(uintptr, bool)
587
588// Sets the mount operation to use a hidden volume if @hidden_volume is %TRUE.
589func (x *MountOperation) SetIsTcryptHiddenVolume(HiddenVolumeVar bool) {
590
591	xMountOperationSetIsTcryptHiddenVolume(x.GoPointer(), HiddenVolumeVar)
592
593}
594
595var xMountOperationSetIsTcryptSystemVolume func(uintptr, bool)
596
597// Sets the mount operation to use a system volume if @system_volume is %TRUE.
598func (x *MountOperation) SetIsTcryptSystemVolume(SystemVolumeVar bool) {
599
600	xMountOperationSetIsTcryptSystemVolume(x.GoPointer(), SystemVolumeVar)
601
602}
603
604var xMountOperationSetPassword func(uintptr, uintptr)
605
606// Sets the mount operation's password to @password.
607func (x *MountOperation) SetPassword(PasswordVar *string) {
608
609	PasswordVarPtr := core.GStrdupNullable(PasswordVar)
610	defer core.GFreeNullable(PasswordVarPtr)
611
612	xMountOperationSetPassword(x.GoPointer(), PasswordVarPtr)
613
614}
615
616var xMountOperationSetPasswordSave func(uintptr, PasswordSave)
617
618// Sets the state of saving passwords for the mount operation.
619func (x *MountOperation) SetPasswordSave(SaveVar PasswordSave) {
620
621	xMountOperationSetPasswordSave(x.GoPointer(), SaveVar)
622
623}
624
625var xMountOperationSetPim func(uintptr, uint)
626
627// Sets the mount operation's PIM to @pim.
628func (x *MountOperation) SetPim(PimVar uint) {
629
630	xMountOperationSetPim(x.GoPointer(), PimVar)
631
632}
633
634var xMountOperationSetUsername func(uintptr, uintptr)
635
636// Sets the user name within @op to @username.
637func (x *MountOperation) SetUsername(UsernameVar *string) {
638
639	UsernameVarPtr := core.GStrdupNullable(UsernameVar)
640	defer core.GFreeNullable(UsernameVarPtr)
641
642	xMountOperationSetUsername(x.GoPointer(), UsernameVarPtr)
643
644}
645
646func (c *MountOperation) GoPointer() uintptr {
647	if c == nil {
648		return 0
649	}
650	return c.Ptr
651}
652
653func (c *MountOperation) SetGoPointer(ptr uintptr) {
654	c.Ptr = ptr
655}
656
657// SetPropertyAnonymous sets the "anonymous" property.
658// Whether to use an anonymous user when authenticating.
659func (x *MountOperation) SetPropertyAnonymous(value bool) {
660	var v gobject.Value
661	v.Init(gobject.TypeBooleanVal)
662	v.SetBoolean(value)
663	x.SetProperty("anonymous", &v)
664}
665
666// GetPropertyAnonymous gets the "anonymous" property.
667// Whether to use an anonymous user when authenticating.
668func (x *MountOperation) GetPropertyAnonymous() bool {
669	var v gobject.Value
670	x.GetProperty("anonymous", &v)
671	return v.GetBoolean()
672}
673
674// SetPropertyChoice sets the "choice" property.
675// The index of the user's choice when a question is asked during the
676// mount operation. See the #GMountOperation::ask-question signal.
677func (x *MountOperation) SetPropertyChoice(value int) {
678	var v gobject.Value
679	v.Init(gobject.TypeIntVal)
680	v.SetInt(value)
681	x.SetProperty("choice", &v)
682}
683
684// GetPropertyChoice gets the "choice" property.
685// The index of the user's choice when a question is asked during the
686// mount operation. See the #GMountOperation::ask-question signal.
687func (x *MountOperation) GetPropertyChoice() int {
688	var v gobject.Value
689	x.GetProperty("choice", &v)
690	return v.GetInt()
691}
692
693// SetPropertyDomain sets the "domain" property.
694// The domain to use for the mount operation.
695func (x *MountOperation) SetPropertyDomain(value string) {
696	var v gobject.Value
697	v.Init(gobject.TypeStringVal)
698	v.SetString(&value)
699	x.SetProperty("domain", &v)
700}
701
702// GetPropertyDomain gets the "domain" property.
703// The domain to use for the mount operation.
704func (x *MountOperation) GetPropertyDomain() string {
705	var v gobject.Value
706	x.GetProperty("domain", &v)
707	return v.GetString()
708}
709
710// SetPropertyIsTcryptHiddenVolume sets the "is-tcrypt-hidden-volume" property.
711// Whether the device to be unlocked is a TCRYPT hidden volume.
712// See [the VeraCrypt documentation](https://www.veracrypt.fr/en/Hidden%20Volume.html).
713func (x *MountOperation) SetPropertyIsTcryptHiddenVolume(value bool) {
714	var v gobject.Value
715	v.Init(gobject.TypeBooleanVal)
716	v.SetBoolean(value)
717	x.SetProperty("is-tcrypt-hidden-volume", &v)
718}
719
720// GetPropertyIsTcryptHiddenVolume gets the "is-tcrypt-hidden-volume" property.
721// Whether the device to be unlocked is a TCRYPT hidden volume.
722// See [the VeraCrypt documentation](https://www.veracrypt.fr/en/Hidden%20Volume.html).
723func (x *MountOperation) GetPropertyIsTcryptHiddenVolume() bool {
724	var v gobject.Value
725	x.GetProperty("is-tcrypt-hidden-volume", &v)
726	return v.GetBoolean()
727}
728
729// SetPropertyIsTcryptSystemVolume sets the "is-tcrypt-system-volume" property.
730// Whether the device to be unlocked is a TCRYPT system volume.
731// In this context, a system volume is a volume with a bootloader
732// and operating system installed. This is only supported for Windows
733// operating systems. For further documentation, see
734// [the VeraCrypt documentation](https://www.veracrypt.fr/en/System%20Encryption.html).
735func (x *MountOperation) SetPropertyIsTcryptSystemVolume(value bool) {
736	var v gobject.Value
737	v.Init(gobject.TypeBooleanVal)
738	v.SetBoolean(value)
739	x.SetProperty("is-tcrypt-system-volume", &v)
740}
741
742// GetPropertyIsTcryptSystemVolume gets the "is-tcrypt-system-volume" property.
743// Whether the device to be unlocked is a TCRYPT system volume.
744// In this context, a system volume is a volume with a bootloader
745// and operating system installed. This is only supported for Windows
746// operating systems. For further documentation, see
747// [the VeraCrypt documentation](https://www.veracrypt.fr/en/System%20Encryption.html).
748func (x *MountOperation) GetPropertyIsTcryptSystemVolume() bool {
749	var v gobject.Value
750	x.GetProperty("is-tcrypt-system-volume", &v)
751	return v.GetBoolean()
752}
753
754// SetPropertyPassword sets the "password" property.
755// The password that is used for authentication when carrying out
756// the mount operation.
757func (x *MountOperation) SetPropertyPassword(value string) {
758	var v gobject.Value
759	v.Init(gobject.TypeStringVal)
760	v.SetString(&value)
761	x.SetProperty("password", &v)
762}
763
764// GetPropertyPassword gets the "password" property.
765// The password that is used for authentication when carrying out
766// the mount operation.
767func (x *MountOperation) GetPropertyPassword() string {
768	var v gobject.Value
769	x.GetProperty("password", &v)
770	return v.GetString()
771}
772
773// SetPropertyPim sets the "pim" property.
774// The VeraCrypt PIM value, when unlocking a VeraCrypt volume. See
775// [the VeraCrypt documentation](https://www.veracrypt.fr/en/Personal%20Iterations%20Multiplier%20(PIM).html).
776func (x *MountOperation) SetPropertyPim(value uint) {
777	var v gobject.Value
778	v.Init(gobject.TypeUintVal)
779	v.SetUint(value)
780	x.SetProperty("pim", &v)
781}
782
783// GetPropertyPim gets the "pim" property.
784// The VeraCrypt PIM value, when unlocking a VeraCrypt volume. See
785// [the VeraCrypt documentation](https://www.veracrypt.fr/en/Personal%20Iterations%20Multiplier%20(PIM).html).
786func (x *MountOperation) GetPropertyPim() uint {
787	var v gobject.Value
788	x.GetProperty("pim", &v)
789	return v.GetUint()
790}
791
792// SetPropertyUsername sets the "username" property.
793// The user name that is used for authentication when carrying out
794// the mount operation.
795func (x *MountOperation) SetPropertyUsername(value string) {
796	var v gobject.Value
797	v.Init(gobject.TypeStringVal)
798	v.SetString(&value)
799	x.SetProperty("username", &v)
800}
801
802// GetPropertyUsername gets the "username" property.
803// The user name that is used for authentication when carrying out
804// the mount operation.
805func (x *MountOperation) GetPropertyUsername() string {
806	var v gobject.Value
807	x.GetProperty("username", &v)
808	return v.GetString()
809}
810
811// Emitted by the backend when e.g. a device becomes unavailable
812// while a mount operation is in progress.
813//
814// Implementations of GMountOperation should handle this signal
815// by dismissing open password dialogs.
816func (x *MountOperation) ConnectAborted(cb *func(MountOperation)) uint {
817	cbPtr := uintptr(unsafe.Pointer(cb))
818	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
819		handlerID := gobject.SignalConnect(x.GoPointer(), "aborted", cbRefPtr)
820		glib.SaveHandlerMapping(handlerID, cbPtr)
821		return handlerID
822	}
823
824	fcb := func(clsPtr uintptr) {
825		fa := MountOperation{}
826		fa.Ptr = clsPtr
827		cbFn := *cb
828
829		cbFn(fa)
830
831	}
832	cbRefPtr := purego.NewCallback(fcb)
833	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
834	handlerID := gobject.SignalConnect(x.GoPointer(), "aborted", cbRefPtr)
835	glib.SaveHandlerMapping(handlerID, cbPtr)
836	return handlerID
837}
838
839// Emitted when a mount operation asks the user for a password.
840//
841// If the message contains a line break, the first line should be
842// presented as a heading. For example, it may be used as the
843// primary text in a #GtkMessageDialog.
844func (x *MountOperation) ConnectAskPassword(cb *func(MountOperation, string, string, string, AskPasswordFlags)) uint {
845	cbPtr := uintptr(unsafe.Pointer(cb))
846	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
847		handlerID := gobject.SignalConnect(x.GoPointer(), "ask-password", cbRefPtr)
848		glib.SaveHandlerMapping(handlerID, cbPtr)
849		return handlerID
850	}
851
852	fcb := func(clsPtr uintptr, MessageVarp uintptr, DefaultUserVarp uintptr, DefaultDomainVarp uintptr, FlagsVarp AskPasswordFlags) {
853		fa := MountOperation{}
854		fa.Ptr = clsPtr
855		cbFn := *cb
856
857		cbFn(fa, core.GoString(MessageVarp), core.GoString(DefaultUserVarp), core.GoString(DefaultDomainVarp), FlagsVarp)
858
859	}
860	cbRefPtr := purego.NewCallback(fcb)
861	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
862	handlerID := gobject.SignalConnect(x.GoPointer(), "ask-password", cbRefPtr)
863	glib.SaveHandlerMapping(handlerID, cbPtr)
864	return handlerID
865}
866
867// Emitted when asking the user a question and gives a list of
868// choices for the user to choose from.
869//
870// If the message contains a line break, the first line should be
871// presented as a heading. For example, it may be used as the
872// primary text in a #GtkMessageDialog.
873func (x *MountOperation) ConnectAskQuestion(cb *func(MountOperation, string, []string)) uint {
874	cbPtr := uintptr(unsafe.Pointer(cb))
875	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
876		handlerID := gobject.SignalConnect(x.GoPointer(), "ask-question", cbRefPtr)
877		glib.SaveHandlerMapping(handlerID, cbPtr)
878		return handlerID
879	}
880
881	fcb := func(clsPtr uintptr, MessageVarp uintptr, ChoicesVarp []string) {
882		fa := MountOperation{}
883		fa.Ptr = clsPtr
884		cbFn := *cb
885
886		cbFn(fa, core.GoString(MessageVarp), ChoicesVarp)
887
888	}
889	cbRefPtr := purego.NewCallback(fcb)
890	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
891	handlerID := gobject.SignalConnect(x.GoPointer(), "ask-question", cbRefPtr)
892	glib.SaveHandlerMapping(handlerID, cbPtr)
893	return handlerID
894}
895
896// Emitted when the user has replied to the mount operation.
897func (x *MountOperation) ConnectReply(cb *func(MountOperation, MountOperationResult)) uint {
898	cbPtr := uintptr(unsafe.Pointer(cb))
899	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
900		handlerID := gobject.SignalConnect(x.GoPointer(), "reply", cbRefPtr)
901		glib.SaveHandlerMapping(handlerID, cbPtr)
902		return handlerID
903	}
904
905	fcb := func(clsPtr uintptr, ResultVarp MountOperationResult) {
906		fa := MountOperation{}
907		fa.Ptr = clsPtr
908		cbFn := *cb
909
910		cbFn(fa, ResultVarp)
911
912	}
913	cbRefPtr := purego.NewCallback(fcb)
914	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
915	handlerID := gobject.SignalConnect(x.GoPointer(), "reply", cbRefPtr)
916	glib.SaveHandlerMapping(handlerID, cbPtr)
917	return handlerID
918}
919
920// Emitted when one or more processes are blocking an operation
921// e.g. unmounting/ejecting a #GMount or stopping a #GDrive.
922//
923// Note that this signal may be emitted several times to update the
924// list of blocking processes as processes close files. The
925// application should only respond with g_mount_operation_reply() to
926// the latest signal (setting #GMountOperation:choice to the choice
927// the user made).
928//
929// If the message contains a line break, the first line should be
930// presented as a heading. For example, it may be used as the
931// primary text in a #GtkMessageDialog.
932func (x *MountOperation) ConnectShowProcesses(cb *func(MountOperation, string, []glib.Pid, []string)) uint {
933	cbPtr := uintptr(unsafe.Pointer(cb))
934	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
935		handlerID := gobject.SignalConnect(x.GoPointer(), "show-processes", cbRefPtr)
936		glib.SaveHandlerMapping(handlerID, cbPtr)
937		return handlerID
938	}
939
940	fcb := func(clsPtr uintptr, MessageVarp uintptr, ProcessesVarp []glib.Pid, ChoicesVarp []string) {
941		fa := MountOperation{}
942		fa.Ptr = clsPtr
943		cbFn := *cb
944
945		cbFn(fa, core.GoString(MessageVarp), ProcessesVarp, ChoicesVarp)
946
947	}
948	cbRefPtr := purego.NewCallback(fcb)
949	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
950	handlerID := gobject.SignalConnect(x.GoPointer(), "show-processes", cbRefPtr)
951	glib.SaveHandlerMapping(handlerID, cbPtr)
952	return handlerID
953}
954
955// Emitted when an unmount operation has been busy for more than some time
956// (typically 1.5 seconds).
957//
958// When unmounting or ejecting a volume, the kernel might need to flush
959// pending data in its buffers to the volume stable storage, and this operation
960// can take a considerable amount of time. This signal may be emitted several
961// times as long as the unmount operation is outstanding, and then one
962// last time when the operation is completed, with @bytes_left set to zero.
963//
964// Implementations of GMountOperation should handle this signal by
965// showing an UI notification, and then dismiss it, or show another notification
966// of completion, when @bytes_left reaches zero.
967//
968// If the message contains a line break, the first line should be
969// presented as a heading. For example, it may be used as the
970// primary text in a #GtkMessageDialog.
971func (x *MountOperation) ConnectShowUnmountProgress(cb *func(MountOperation, string, int64, int64)) uint {
972	cbPtr := uintptr(unsafe.Pointer(cb))
973	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
974		handlerID := gobject.SignalConnect(x.GoPointer(), "show-unmount-progress", cbRefPtr)
975		glib.SaveHandlerMapping(handlerID, cbPtr)
976		return handlerID
977	}
978
979	fcb := func(clsPtr uintptr, MessageVarp uintptr, TimeLeftVarp int64, BytesLeftVarp int64) {
980		fa := MountOperation{}
981		fa.Ptr = clsPtr
982		cbFn := *cb
983
984		cbFn(fa, core.GoString(MessageVarp), TimeLeftVarp, BytesLeftVarp)
985
986	}
987	cbRefPtr := purego.NewCallback(fcb)
988	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
989	handlerID := gobject.SignalConnect(x.GoPointer(), "show-unmount-progress", cbRefPtr)
990	glib.SaveHandlerMapping(handlerID, cbPtr)
991	return handlerID
992}
993
994func init() {
995	core.SetPackageName("GIO", "gio-2.0")
996	core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0"})
997	var libs []uintptr
998	for _, libPath := range core.GetPaths("GIO") {
999		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
1000		if err != nil {
1001			panic(err)
1002		}
1003		libs = append(libs, lib)
1004	}
1005
1006	core.PuregoSafeRegister(&xMountOperationGLibType, libs, "g_mount_operation_get_type")
1007
1008	core.PuregoSafeRegister(&xNewMountOperation, libs, "g_mount_operation_new")
1009
1010	core.PuregoSafeRegister(&xMountOperationGetAnonymous, libs, "g_mount_operation_get_anonymous")
1011	core.PuregoSafeRegister(&xMountOperationGetChoice, libs, "g_mount_operation_get_choice")
1012	core.PuregoSafeRegister(&xMountOperationGetDomain, libs, "g_mount_operation_get_domain")
1013	core.PuregoSafeRegister(&xMountOperationGetIsTcryptHiddenVolume, libs, "g_mount_operation_get_is_tcrypt_hidden_volume")
1014	core.PuregoSafeRegister(&xMountOperationGetIsTcryptSystemVolume, libs, "g_mount_operation_get_is_tcrypt_system_volume")
1015	core.PuregoSafeRegister(&xMountOperationGetPassword, libs, "g_mount_operation_get_password")
1016	core.PuregoSafeRegister(&xMountOperationGetPasswordSave, libs, "g_mount_operation_get_password_save")
1017	core.PuregoSafeRegister(&xMountOperationGetPim, libs, "g_mount_operation_get_pim")
1018	core.PuregoSafeRegister(&xMountOperationGetUsername, libs, "g_mount_operation_get_username")
1019	core.PuregoSafeRegister(&xMountOperationReply, libs, "g_mount_operation_reply")
1020	core.PuregoSafeRegister(&xMountOperationSetAnonymous, libs, "g_mount_operation_set_anonymous")
1021	core.PuregoSafeRegister(&xMountOperationSetChoice, libs, "g_mount_operation_set_choice")
1022	core.PuregoSafeRegister(&xMountOperationSetDomain, libs, "g_mount_operation_set_domain")
1023	core.PuregoSafeRegister(&xMountOperationSetIsTcryptHiddenVolume, libs, "g_mount_operation_set_is_tcrypt_hidden_volume")
1024	core.PuregoSafeRegister(&xMountOperationSetIsTcryptSystemVolume, libs, "g_mount_operation_set_is_tcrypt_system_volume")
1025	core.PuregoSafeRegister(&xMountOperationSetPassword, libs, "g_mount_operation_set_password")
1026	core.PuregoSafeRegister(&xMountOperationSetPasswordSave, libs, "g_mount_operation_set_password_save")
1027	core.PuregoSafeRegister(&xMountOperationSetPim, libs, "g_mount_operation_set_pim")
1028	core.PuregoSafeRegister(&xMountOperationSetUsername, libs, "g_mount_operation_set_username")
1029
1030}

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