package theme import "git.tebibyte.media/tomo/tomo" import "git.tebibyte.media/tomo/tomo/data" // IconSize represents the size of an icon. type IconSize int; const ( IconSizeSmall IconSize = iota; IconSizeMedium IconSizeLarge ) // Icon represents an icon ID. type Icon int; const ( // --- Objects --- // // files IconFile Icon = iota IconDirectory IconDirectoryFull // places IconDownloads IconPhotos IconBooks IconDocuments IconRepositories IconMusic IconArchives IconFonts IconBinaries IconVideos Icon3DObjects IconHistory IconPreferences // storage IconStorage // generic IconMagneticTape IconFloppyDisk IconHardDisk IconSolidStateDrive IconFlashDrive IconMemoryCard IconROMDisk IconRAMDisk IconCD IconDVD // network IconNetwork // generic IconLocalNetwork IconInternet IconEthernet IconWireless IconCell IconBluetooth IconRadio // devices IconDevice // generic IconRouter IconServer IconDesktop IconLaptop IconTablet IconPhone IconWatch IconCamera // peripherals IconPeripheral // generic IconKeyboard IconMouse IconMonitor IconWebcam IconMicrophone IconSpeaker IconPenTablet IconTrackpad IconController // i/o IconPort // generic IconEthernetPort IconUSBPort IconParallelPort IconSerialPort IconPS2Port IconDisplayConnector IconCGAPort IconVGAPort IconHDMIPort IconDisplayPort IconInfrared // --- Actions --- // // files IconOpen IconOpenIn IconSave IconSaveAs IconPrints IconNew IconNewDirectory IconDelete IconRename IconGetInformation IconChangePermissions IconRevert // list management IconAdd IconRemove IconAddBookmark IconRemoveBookmark IconAddFavorite IconRemoveFavorite // media IconPlay IconPause IconStop IconFastForward IconRewind IconToBeginning IconToEnd IconRecord IconVolumeUp IconVolumeDown IconMute // editing IconUndo IconRedo IconCut IconCopy IconPaste IconFind IconReplace IconSelectAll IconSelectNone IconIncrement IconDecrement // window management IconClose IconQuit IconIconify IconShade IconMaximize IconFullScreen IconRestore // view controls IconExpand IconContract IconBack IconForward IconUp IconDown IconReload IconZoomIn IconZoomOut IconZoomReset IconMove IconResize IconGoTo // tools IconTransform IconTranslate IconRotate IconScale IconWarp IconCornerPin IconSelectRectangle IconSelectEllipse IconSelectLasso IconSelectGeometric IconSelectAuto IconCrop IconFill IconGradient IconPencil IconBrush IconEraser IconText IconEyedropper // --- Status --- // // dialogs IconInformation IconQuestion IconWarning IconError IconCancel IconOkay // network IconCellSignal0 IconCellSignal1 IconCellSignal2 IconCellSignal3 IconWirelessSignal0 IconWirelessSignal1 IconWirelessSignal2 IconWirelessSignal3 // power IconBattery0 IconBattery1 IconBattery2 IconBattery3 IconBrightness0 IconBrightness1 IconBrightness2 IconBrightness3 // media IconVolume0 IconVolume1 IconVolume2 IconVolume3 ) // Texture returns a texture of the corresponding icon ID. func (id Icon) Texture (size IconSize) tomo.Texture { if current == nil { return nil } return current.Icon(id, size) } // MimeIcon returns an icon corresponding to a MIME type. func MimeIcon (mime data.Mime, size IconSize) tomo.Texture { if current == nil { return nil } return current.MimeIcon(mime, size) } // ApplicationIcon describes the icon of the application. type ApplicationIcon struct { // The name or ID of the application. If applicable, this should // correspond to the file name (without the path or extension) of the // icon on the system. This field is optional. Name string // Role describes what the application does. If a specific icon file // cannot be found, a generic one is picked using this field. Role ApplicationRole } // Texture returns a texture of the corresponding icon ID. func (icon ApplicationIcon) Texture (size IconSize) tomo.Texture { if current == nil { return nil } return current.ApplicationIcon(icon, size) } // ApplicationRole describes what an application does. type ApplicationRole int; const ( RoleUnknown ApplicationRole = iota RoleWebBrowser RoleMesssanger RolePhone RoleMail RoleTerminalEmulator RoleFileBrowser RoleTextEditor RoleDocumentViewer RoleWordProcessor RoleSpreadsheet RoleSlideshow RoleCalculator RolePreferences RoleProcessManager RoleSystemInformation RoleManual RoleCamera RoleImageViewer RoleMediaPlayer RoleImageEditor RoleAudioEditor RoleVideoEditor RoleClock RoleCalendar RoleChecklist )