Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DE/dde-daemon: add appearance document #16

Merged
merged 1 commit into from
Aug 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 137 additions & 0 deletions docs/DE/dde-daemon/appearance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# appearance
--------

Manage desktop appearance

## Usage

```go
const (
TypeDTheme string = "dtheme"
TypeGtkTheme = "gtk"
TypeIconTheme = "icon"
TypeCursorTheme = "cursor"
TypeBackground = "background"
TypeStandardFont = "standardfont"
TypeMonospaceFont = "monospacefont"
TypeFontSize = "fontsize"
)
```

#### type Theme

subthemes.Theme

```go
type Theme struct {
Id string
Path string

Deletable bool
}
```


#### type Background

background.Background

```go
type Background struct {
URI string

Deletable bool
}
```

#### type Family

fonts.Family

```go
type Family struct {
Id string
Name string

Styles []string
}
```


#### type DTheme

```go
type DTheme struct {
Id string
Name string
Path string
Thumbnail string

Previews []string

Deletable bool

Gtk *subthemes.Theme
Icon *subthemes.Theme
Cursor *subthemes.Theme

Background *background.Background

StandardFont *fonts.Family
MonospaceFont *fonts.Family
FontSize int32
}
```


#### type Manager

```go
type Manager struct {
// Current desktop theme
Theme string
// Current desktop font size
FontSize int32

// Theme changed signal
// ty, name
Changed func(string, string)
}
```


#### func (*Manager) Delete

```go
func (m *Manager) Delete(ty, name string) error
```
Delete delete the special 'name'


#### func (*Manager) List

```go
func (m *Manager) List(ty string) ([]string, error)
```
List list all available for the special type

#### func (*Manager) Set

```go
func (m *Manager) Set(ty, value string) error
```
Set set to the special 'value'

#### func (*Manager) Show

```go
func (m *Manager) Show(ty, name string) (string, error)
```
Show show detail info for the special type ret0: detail info, json format

#### func (*Manager) Thumbnail

```go
func (m *Manager) Thumbnail(ty, name string) (string, error)
```
Thumbnail get thumbnail for the special 'name'