-
Notifications
You must be signed in to change notification settings - Fork 6
/
adw-password-entry-row_1_2.go
163 lines (144 loc) · 4.09 KB
/
adw-password-entry-row_1_2.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
// Code generated by girgen. DO NOT EDIT.
package adw
import (
"unsafe"
"github.com/diamondburned/gotk4/pkg/core/gextras"
coreglib "github.com/diamondburned/gotk4/pkg/core/glib"
"github.com/diamondburned/gotk4/pkg/gtk/v4"
)
// #include <stdlib.h>
// #include <adwaita.h>
// #include <glib-object.h>
import "C"
// GType values.
var (
GTypePasswordEntryRow = coreglib.Type(C.adw_password_entry_row_get_type())
)
func init() {
coreglib.RegisterGValueMarshalers([]coreglib.TypeMarshaler{
coreglib.TypeMarshaler{T: GTypePasswordEntryRow, F: marshalPasswordEntryRow},
})
}
// PasswordEntryRowOverrides contains methods that are overridable.
type PasswordEntryRowOverrides struct {
}
func defaultPasswordEntryRowOverrides(v *PasswordEntryRow) PasswordEntryRowOverrides {
return PasswordEntryRowOverrides{}
}
// PasswordEntryRow: entryrow tailored for entering secrets.
//
// <picture> <source srcset="password-entry-row-dark.png"
// media="(prefers-color-scheme: dark)"> <img src="password-entry-row.png"
// alt="password-entry-row"> </picture>
//
// It does not show its contents in clear text, does not allow to copy it
// to the clipboard, and shows a warning when Caps Lock is engaged. If the
// underlying platform allows it, AdwPasswordEntryRow will also place the text
// in a non-pageable memory area, to avoid it being written out to disk by the
// operating system.
//
// It offer a way to reveal the contents in clear text.
//
// # CSS Nodes
//
// AdwPasswordEntryRow has a single CSS node with name row that carries .entry
// and .password style classes.
type PasswordEntryRow struct {
_ [0]func() // equal guard
EntryRow
}
var (
_ coreglib.Objector = (*PasswordEntryRow)(nil)
_ gtk.Widgetter = (*PasswordEntryRow)(nil)
)
func init() {
coreglib.RegisterClassInfo[*PasswordEntryRow, *PasswordEntryRowClass, PasswordEntryRowOverrides](
GTypePasswordEntryRow,
initPasswordEntryRowClass,
wrapPasswordEntryRow,
defaultPasswordEntryRowOverrides,
)
}
func initPasswordEntryRowClass(gclass unsafe.Pointer, overrides PasswordEntryRowOverrides, classInitFunc func(*PasswordEntryRowClass)) {
if classInitFunc != nil {
class := (*PasswordEntryRowClass)(gextras.NewStructNative(gclass))
classInitFunc(class)
}
}
func wrapPasswordEntryRow(obj *coreglib.Object) *PasswordEntryRow {
return &PasswordEntryRow{
EntryRow: EntryRow{
PreferencesRow: PreferencesRow{
ListBoxRow: gtk.ListBoxRow{
Widget: gtk.Widget{
InitiallyUnowned: coreglib.InitiallyUnowned{
Object: obj,
},
Object: obj,
Accessible: gtk.Accessible{
Object: obj,
},
Buildable: gtk.Buildable{
Object: obj,
},
ConstraintTarget: gtk.ConstraintTarget{
Object: obj,
},
},
Object: obj,
Actionable: gtk.Actionable{
Widget: gtk.Widget{
InitiallyUnowned: coreglib.InitiallyUnowned{
Object: obj,
},
Object: obj,
Accessible: gtk.Accessible{
Object: obj,
},
Buildable: gtk.Buildable{
Object: obj,
},
ConstraintTarget: gtk.ConstraintTarget{
Object: obj,
},
},
},
},
},
Object: obj,
EditableTextWidget: gtk.EditableTextWidget{
Widget: gtk.Widget{
InitiallyUnowned: coreglib.InitiallyUnowned{
Object: obj,
},
Object: obj,
Accessible: gtk.Accessible{
Object: obj,
},
Buildable: gtk.Buildable{
Object: obj,
},
ConstraintTarget: gtk.ConstraintTarget{
Object: obj,
},
},
},
},
}
}
func marshalPasswordEntryRow(p uintptr) (interface{}, error) {
return wrapPasswordEntryRow(coreglib.ValueFromNative(unsafe.Pointer(p)).Object()), nil
}
// NewPasswordEntryRow creates a new AdwPasswordEntryRow.
//
// The function returns the following values:
//
// - passwordEntryRow: newly created AdwPasswordEntryRow.
//
func NewPasswordEntryRow() *PasswordEntryRow {
var _cret *C.GtkWidget // in
_cret = C.adw_password_entry_row_new()
var _passwordEntryRow *PasswordEntryRow // out
_passwordEntryRow = wrapPasswordEntryRow(coreglib.Take(unsafe.Pointer(_cret)))
return _passwordEntryRow
}