Skip to content

Commit 135e68b

Browse files
committed
Move to the new API url structure of v2 and redirect all possible previous v2.x locations
1 parent 3aacc55 commit 135e68b

File tree

334 files changed

+4158
-1950
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

334 files changed

+4158
-1950
lines changed

_gen/genapi.sh

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ go install github.com/andydotxyz/godocdown/godocdown@latest
1111
# generate API docs
1212

1313
DIRS=`find $ROOT -type d | grep -v .git | grep -v vendor | grep -v internal | grep -v testdata | grep -v cmd | grep -v tools`
14-
PREFIX="content/docs/api/$VERSION"
14+
PREFIX="content/docs/api/v2"
1515
mkdir $PREFIX 2>&1 > /dev/null
1616

1717
godocdown -template="_gen/api.md" -outputDir "$PREFIX/" $ROOT 2>&1 | grep -v "Could not find package"
@@ -55,11 +55,21 @@ for DIR in $DIRS; do
5555
PKGNAME="fyne"
5656
mv $PREFIX/$OUT $PREFIX/fyne/$OUT
5757
fi
58+
59+
declare -a vers=("v2.0" "v2.1" "v2.2" "v2.3" "v2.4" "v2.5" "v2.6" "v2.7")
60+
61+
ALIASLIST=""
62+
for i in "${vers[@]}"
63+
do
64+
ALIASLIST=$ALIASLIST"\n- \/api\/$i\/$PKGPATH"
65+
done
5866

59-
sed -i.bak "s|slug:|slug: $NAME\n\naliases:\n- \/api\/$VERSION\/$PKGPATH|" "$PREFIX/$PKGNAME/$OUT"
60-
sed -i.bak "s|# .*||" "$PREFIX/$PKGNAME/$OUT"
67+
if [[ "$OUT" != '*.md' ]]; then
68+
sed -i.bak "s|slug:|slug: $NAME\n\naliases:$ALIASLIST|" "$PREFIX/$PKGNAME/$OUT"
69+
sed -i.bak "s|^# .*||" "$PREFIX/$PKGNAME/$OUT"
70+
fi
6171
done
6272
done
6373

64-
rm content/docs/api/$VERSION/_index.md
74+
rm content/docs/api/v2/_index.md
6575
find content/docs/api/ -name \*.bak -exec rm {} \;
File renamed without changes.
Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ title: app (package)
44
slug: (package)
55

66
aliases:
7+
- /api/v2.0/app
8+
- /api/v2.1/app
9+
- /api/v2.2/app
10+
- /api/v2.3/app
11+
- /api/v2.4/app
12+
- /api/v2.5/app
13+
- /api/v2.6/app
714
- /api/v2.7/app
815

916
package: fyne.io/fyne/v2/app
@@ -17,23 +24,23 @@ import "fyne.io/fyne/v2/app"
1724

1825
Package app provides app implementations for working with Fyne graphical interfaces. The fastest way to get started is to call app.New() which will normally load a new desktop application. If the "ci" tag is passed to go (go run -tags ci myapp.go) it will run an in-memory application.
1926

20-
#
27+
## Usage
2128

22-
###
29+
#### func New
2330

2431
```go
2532
func New() fyne.App
2633
```
2734
New returns a new application instance with the default driver and no unique ID (unless specified in FyneApp.toml)
2835

29-
###
36+
#### func NewWithID
3037

3138
```go
3239
func NewWithID(id string) fyne.App
3340
```
3441
NewWithID returns a new app instance using the appropriate runtime driver. The ID string should be globally unique to this app.
3542

36-
###
43+
#### func SetDriverDetails
3744

3845
```go
3946
func SetDriverDetails(a fyne.App, d embedded.Driver)
@@ -44,13 +51,13 @@ SetDriverDetails provides the required information to our app to run without a s
4451
<div class="since">Since: <code>
4552
2.7</code></div>
4653

47-
###
54+
#### func SetMetadata
4855

4956
```go
5057
func SetMetadata(m fyne.AppMetadata)
5158
```
5259
SetMetadata overrides the packaged application metadata. This data can be used in many places like notifications and about screens.
5360

54-
###
61+
#### types
5562

5663
* [SettingsSchema](settingsschema.html)

content/docs/api/v2.7/app/settingsschema.md renamed to content/docs/api/v2/app/settingsschema.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ title: app.SettingsSchema
44
slug: settingsschema
55

66
aliases:
7+
- /api/v2.0/app/settingsschema
8+
- /api/v2.1/app/settingsschema
9+
- /api/v2.2/app/settingsschema
10+
- /api/v2.3/app/settingsschema
11+
- /api/v2.4/app/settingsschema
12+
- /api/v2.5/app/settingsschema
13+
- /api/v2.6/app/settingsschema
714
- /api/v2.7/app/settingsschema
815

916
package: fyne.io/fyne/v2/app
@@ -15,9 +22,9 @@ package: fyne.io/fyne/v2/app
1522
import "fyne.io/fyne/v2/app"
1623
```
1724

18-
#
25+
## Usage
1926

20-
###
27+
#### type SettingsSchema
2128

2229
```go
2330
type SettingsSchema struct {
@@ -33,7 +40,7 @@ type SettingsSchema struct {
3340

3441
SettingsSchema is used for loading and storing global settings
3542

36-
###
43+
#### func (*SettingsSchema) StoragePath
3744

3845
```go
3946
func (sc *SettingsSchema) StoragePath() string
Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ title: canvas.Arc
44
slug: arc
55

66
aliases:
7+
- /api/v2.0/canvas/arc
8+
- /api/v2.1/canvas/arc
9+
- /api/v2.2/canvas/arc
10+
- /api/v2.3/canvas/arc
11+
- /api/v2.4/canvas/arc
12+
- /api/v2.5/canvas/arc
13+
- /api/v2.6/canvas/arc
714
- /api/v2.7/canvas/arc
815

916
package: fyne.io/fyne/v2/canvas
@@ -15,9 +22,9 @@ package: fyne.io/fyne/v2/canvas
1522
import "fyne.io/fyne/v2/canvas"
1623
```
1724

18-
#
25+
## Usage
1926

20-
###
27+
#### type Arc
2128

2229
```go
2330
type Arc struct {
@@ -37,91 +44,91 @@ Arc represents a filled arc or annular sector primitive that can be drawn on a F
3744
<div class="since">Since: <code>
3845
2.7</code></div>
3946

40-
###
47+
#### func NewArc
4148

4249
```go
4350
func NewArc(startAngle, endAngle, cutoutRatio float32, color color.Color) *Arc
4451
```
4552
NewArc returns a new Arc instance with the specified start and end angles (in degrees), fill color and cutout ratio.
4653

47-
###
54+
#### func NewDoughnutArc
4855

4956
```go
5057
func NewDoughnutArc(startAngle, endAngle float32, color color.Color) *Arc
5158
```
5259
NewDoughnutArc returns a new doughnut-shaped Arc instance with the specified start and end angles (in degrees), fill color and cutout ratio set to 0.5.
5360

54-
###
61+
#### func NewPieArc
5562

5663
```go
5764
func NewPieArc(startAngle, endAngle float32, color color.Color) *Arc
5865
```
5966
NewPieArc returns a new pie-shaped Arc instance with the specified start and end angles (in degrees), fill color and cutout ratio set to 0.
6067

61-
###
68+
#### func (*Arc) Hide
6269

6370
```go
6471
func (a *Arc) Hide()
6572
```
6673
Hide will set this arc to not be visible.
6774

68-
###
75+
#### func (*Arc) MinSize
6976

7077
```go
7178
func (o *Arc) MinSize() fyne.Size
7279
```
7380
MinSize returns the specified minimum size, if set, or {1, 1} otherwise.
7481

75-
###
82+
#### func (*Arc) Move
7683

7784
```go
7885
func (a *Arc) Move(pos fyne.Position)
7986
```
8087
Move the arc to a new position, relative to its parent / canvas. The position specifies the **center** of the arc.
8188

82-
###
89+
#### func (*Arc) Position
8390

8491
```go
8592
func (o *Arc) Position() fyne.Position
8693
```
8794
Position gets the current position of this canvas object, relative to its parent.
8895

89-
###
96+
#### func (*Arc) Refresh
9097

9198
```go
9299
func (a *Arc) Refresh()
93100
```
94101
Refresh causes this arc to be redrawn with its configured state.
95102

96-
###
103+
#### func (*Arc) Resize
97104

98105
```go
99106
func (a *Arc) Resize(s fyne.Size)
100107
```
101108
Resize updates the logical size of the arc. The arc is always drawn centered on its Position().
102109

103-
###
110+
#### func (*Arc) SetMinSize
104111

105112
```go
106113
func (o *Arc) SetMinSize(size fyne.Size)
107114
```
108115
SetMinSize specifies the smallest size this object should be.
109116

110-
###
117+
#### func (*Arc) Show
111118

112119
```go
113120
func (o *Arc) Show()
114121
```
115122
Show will set this object to be visible.
116123

117-
###
124+
#### func (*Arc) Size
118125

119126
```go
120127
func (o *Arc) Size() fyne.Size
121128
```
122129
Size returns the current size of this canvas object.
123130

124-
###
131+
#### func (*Arc) Visible
125132

126133
```go
127134
func (o *Arc) Visible() bool
Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ title: canvas.Circle
44
slug: circle
55

66
aliases:
7+
- /api/v2.0/canvas/circle
8+
- /api/v2.1/canvas/circle
9+
- /api/v2.2/canvas/circle
10+
- /api/v2.3/canvas/circle
11+
- /api/v2.4/canvas/circle
12+
- /api/v2.5/canvas/circle
13+
- /api/v2.6/canvas/circle
714
- /api/v2.7/canvas/circle
815

916
package: fyne.io/fyne/v2/canvas
@@ -15,9 +22,9 @@ package: fyne.io/fyne/v2/canvas
1522
import "fyne.io/fyne/v2/canvas"
1623
```
1724

18-
#
25+
## Usage
1926

20-
###
27+
#### type Circle
2128

2229
```go
2330
type Circle struct {
@@ -33,70 +40,70 @@ type Circle struct {
3340

3441
Circle describes a colored circle primitive in a Fyne canvas
3542

36-
###
43+
#### func NewCircle
3744

3845
```go
3946
func NewCircle(color color.Color) *Circle
4047
```
4148
NewCircle returns a new Circle instance
4249

43-
###
50+
#### func (*Circle) Hide
4451

4552
```go
4653
func (c *Circle) Hide()
4754
```
4855
Hide will set this circle to not be visible
4956

50-
###
57+
#### func (*Circle) MinSize
5158

5259
```go
5360
func (c *Circle) MinSize() fyne.Size
5461
```
5562
MinSize for a Circle simply returns Size{1, 1} as there is no explicit content
5663

57-
###
64+
#### func (*Circle) Move
5865

5966
```go
6067
func (c *Circle) Move(pos fyne.Position)
6168
```
6269
Move the circle object to a new position, relative to its parent / canvas
6370

64-
###
71+
#### func (*Circle) Position
6572

6673
```go
6774
func (c *Circle) Position() fyne.Position
6875
```
6976
Position gets the current top-left position of this circle object, relative to its parent / canvas
7077

71-
###
78+
#### func (*Circle) Refresh
7279

7380
```go
7481
func (c *Circle) Refresh()
7582
```
7683
Refresh causes this object to be redrawn with its configured state.
7784

78-
###
85+
#### func (*Circle) Resize
7986

8087
```go
8188
func (c *Circle) Resize(size fyne.Size)
8289
```
8390
Resize sets a new bottom-right position for the circle object If it has a stroke width this will cause it to Refresh.
8491

85-
###
92+
#### func (*Circle) Show
8693

8794
```go
8895
func (c *Circle) Show()
8996
```
9097
Show will set this circle to be visible
9198

92-
###
99+
#### func (*Circle) Size
93100

94101
```go
95102
func (c *Circle) Size() fyne.Size
96103
```
97104
Size returns the current size of bounding box for this circle object
98105

99-
###
106+
#### func (*Circle) Visible
100107

101108
```go
102109
func (c *Circle) Visible() bool

0 commit comments

Comments
 (0)