├── .gitignore ├── Makefile.common ├── Makefile.in ├── README ├── config.guess ├── config.h.in ├── config.sub ├── configure ├── configure.in ├── cosmoe.sh ├── cosmoe.specs.in ├── distconfigure.sh ├── headers ├── Makefile.in ├── os │ ├── AppKit.h │ ├── Be.h │ ├── BeBuild.h │ ├── DeviceKit.h │ ├── GameKit.h │ ├── InterfaceKit.h │ ├── KernelKit.h │ ├── MailKit.h │ ├── MediaKit.h │ ├── MidiKit.h │ ├── NetKit.h │ ├── NetworkKit.h │ ├── StorageKit.h │ ├── SupportKit.h │ ├── TranslationKit.h │ ├── add-ons │ │ ├── file_system │ │ │ └── fsproto.h │ │ └── graphics │ │ │ ├── Accelerant.h │ │ │ └── GraphicsCard.h │ ├── app │ │ ├── AppDefs.h │ │ ├── Application.h │ │ ├── Clipboard.h │ │ ├── Cursor.h │ │ ├── Handler.h │ │ ├── Invoker.h │ │ ├── Looper.h │ │ ├── Message.h │ │ ├── MessageFilter.h │ │ ├── MessageQueue.h │ │ ├── MessageRunner.h │ │ ├── Messenger.h │ │ ├── PropertyInfo.h │ │ └── Roster.h │ ├── interface │ │ ├── Alert.h │ │ ├── Bitmap.h │ │ ├── Box.h │ │ ├── Button.h │ │ ├── CheckBox.h │ │ ├── ColorControl.h │ │ ├── ColorUtils.h │ │ ├── Control.h │ │ ├── Deskbar.h │ │ ├── DirectoryView.h │ │ ├── Dragger.h │ │ ├── Font.h │ │ ├── GraphicsDefs.h │ │ ├── Input.h │ │ ├── InterfaceDefs.h │ │ ├── ListItem.h │ │ ├── ListView.h │ │ ├── Menu.h │ │ ├── MenuBar.h │ │ ├── MenuField.h │ │ ├── MenuItem.h │ │ ├── OptionControl.h │ │ ├── OutlineListView.h │ │ ├── Picture.h │ │ ├── PictureButton.h │ │ ├── Point.h │ │ ├── Polygon.h │ │ ├── PopUpMenu.h │ │ ├── RadioButton.h │ │ ├── Rect.h │ │ ├── Region.h │ │ ├── Screen.h │ │ ├── ScrollBar.h │ │ ├── ScrollView.h │ │ ├── Shape.h │ │ ├── Shelf.h │ │ ├── Slider.h │ │ ├── Spinner.h │ │ ├── StatusBar.h │ │ ├── StringItem.h │ │ ├── StringView.h │ │ ├── TabView.h │ │ ├── TextControl.h │ │ ├── TextView.h │ │ ├── UnicodeBlockObjects.h │ │ ├── View.h │ │ └── Window.h │ ├── kernel │ │ ├── OS.h │ │ ├── fs_attr.h │ │ ├── fs_index.h │ │ ├── fs_info.h │ │ ├── fs_query.h │ │ ├── image.h │ │ └── macros.h │ ├── storage │ │ ├── AppFileInfo.h │ │ ├── Directory.h │ │ ├── Entry.h │ │ ├── EntryList.h │ │ ├── File.h │ │ ├── FilePanel.h │ │ ├── FindDirectory.h │ │ ├── Mime.h │ │ ├── MimeType.h │ │ ├── Node.h │ │ ├── NodeInfo.h │ │ ├── NodeMonitor.h │ │ ├── Path.h │ │ ├── Query.h │ │ ├── ResourceStrings.h │ │ ├── Resources.h │ │ ├── Statable.h │ │ ├── StorageDefs.h │ │ ├── SymLink.h │ │ ├── Volume.h │ │ └── VolumeRoster.h │ ├── support │ │ ├── Archivable.h │ │ ├── Autolock.h │ │ ├── Beep.h │ │ ├── BlockCache.h │ │ ├── BufferIO.h │ │ ├── ByteOrder.h │ │ ├── ClassInfo.h │ │ ├── DataIO.h │ │ ├── Debug.h │ │ ├── Errors.h │ │ ├── Flattenable.h │ │ ├── List.h │ │ ├── Locker.h │ │ ├── StopWatch.h │ │ ├── String.h │ │ ├── SupportDefs.h │ │ ├── TypeConstants.h │ │ ├── UTF8.h │ │ ├── parsedate.h │ │ └── syslog.h │ └── translation │ │ ├── BitmapStream.h │ │ ├── FuncTranslator.h │ │ ├── TranslationDefs.h │ │ ├── TranslationErrors.h │ │ ├── TranslationKit.h │ │ ├── TranslationUtils.h │ │ ├── Translator.h │ │ ├── TranslatorAddOn.h │ │ ├── TranslatorFormats.h │ │ └── TranslatorRoster.h └── private │ ├── app │ ├── AppMisc.h │ ├── AppServerLink.h │ ├── AreaLink.h │ ├── LinkMsgReader.h │ ├── LinkMsgSender.h │ ├── LooperList.h │ ├── MessageBody.h │ ├── MessageField.h │ ├── MessagePrivate.h │ ├── MessageUtils.h │ ├── MessengerPrivate.h │ ├── PortLink.h │ ├── PortMessage.h │ ├── PortQueue.h │ ├── RegistrarDefs.h │ ├── RegistrarThread.h │ ├── RegistrarThreadManager.h │ ├── RosterPrivate.h │ ├── ServerProtocol.h │ ├── Session.h │ ├── SysCursor.h │ └── TokenSpace.h │ ├── interface │ ├── BMCPrivate.h │ ├── ClientFontList.h │ ├── PictureProtocol.h │ ├── PrivateScreen.h │ ├── RegionSupport.h │ ├── TPicture.h │ ├── TextInput.h │ ├── TextViewSupportBuffer.h │ ├── ViewAux.h │ ├── WidthBuffer.h │ ├── WindowAux.h │ ├── ZombieReplicantView.h │ ├── clipping.h │ ├── input_globals.h │ └── moreUTF8.h │ ├── servers │ └── app │ │ ├── BitmapManager.h │ │ ├── ColorSet.h │ │ ├── CursorHandler.h │ │ ├── Decorator.h │ │ ├── DisplayDriver.h │ │ ├── DisplaySupport.h │ │ ├── FontFamily.h │ │ ├── FontServer.h │ │ ├── GraphicsBuffer.h │ │ ├── IPoint.h │ │ ├── LayerData.h │ │ ├── PatternHandler.h │ │ ├── PixelRenderer.h │ │ ├── RGBColor.h │ │ ├── RectUtils.h │ │ ├── ServerBitmap.h │ │ ├── ServerConfig.h │ │ ├── ServerCursor.h │ │ ├── ServerFont.h │ │ ├── SharedObject.h │ │ ├── SystemPalette.h │ │ └── TokenHandler.h │ ├── shared │ ├── DataBuffer.h │ ├── ObjectList.h │ └── ObjectLocker.h │ └── storage │ ├── Elf.h │ ├── Exception.h │ ├── MimeTypes.h │ ├── OffsetFile.h │ ├── Pef.h │ ├── QueryPredicate.h │ ├── ResourceFile.h │ ├── ResourceItem.h │ ├── ResourcesContainer.h │ ├── ResourcesDefs.h │ ├── kernel_interface.h │ ├── mime │ ├── AssociatedTypes.h │ ├── CVS │ │ ├── Entries │ │ ├── Repository │ │ └── Root │ ├── CreateAppMetaMimeThread.h │ ├── Database.h │ ├── InstalledTypes.h │ ├── MimeUpdateThread.h │ ├── SnifferRules.h │ ├── Supertype.h │ ├── SupportingApps.h │ ├── UpdateMimeInfoThread.h │ ├── database_access.h │ └── database_support.h │ ├── sniffer │ ├── CVS │ │ ├── Entries │ │ ├── Repository │ │ └── Root │ ├── CharStream.h │ ├── DisjList.h │ ├── Err.h │ ├── Parser.h │ ├── Pattern.h │ ├── PatternList.h │ ├── RPattern.h │ ├── RPatternList.h │ ├── Range.h │ └── Rule.h │ └── storage_support.h ├── install-sh ├── makefile.rules └── src ├── add-ons ├── Makefile.in └── translators │ ├── Makefile.in │ ├── bmptranslator │ ├── BMPMain.cpp │ ├── BMPTranslator.cpp │ ├── BMPTranslator.h │ ├── BMPView.cpp │ ├── BMPView.h │ ├── BMPWindow.cpp │ ├── BMPWindow.h │ └── Makefile.in │ ├── jpeg2000translator │ ├── JPEG2000Translator.cpp │ ├── JPEG2000Translator.h │ ├── README │ └── libjasper │ │ ├── LICENSE │ │ ├── README │ │ ├── jas_debug.c │ │ ├── jas_getopt.c │ │ ├── jas_image.c │ │ ├── jas_init.c │ │ ├── jas_malloc.c │ │ ├── jas_seq.c │ │ ├── jas_stream.c │ │ ├── jas_string.c │ │ ├── jas_tvp.c │ │ ├── jas_version.c │ │ ├── jasper.h │ │ ├── jasper │ │ ├── jas_debug.h │ │ ├── jas_fix.h │ │ ├── jas_getopt.h │ │ ├── jas_image.h │ │ ├── jas_init.h │ │ ├── jas_malloc.h │ │ ├── jas_math.h │ │ ├── jas_seq.h │ │ ├── jas_stream.h │ │ ├── jas_string.h │ │ ├── jas_tvp.h │ │ ├── jas_types.h │ │ └── jas_version.h │ │ ├── jp2_cod.c │ │ ├── jp2_cod.h │ │ ├── jp2_dec.c │ │ ├── jp2_dec.h │ │ ├── jp2_enc.c │ │ ├── jpc_bs.c │ │ ├── jpc_bs.h │ │ ├── jpc_cod.h │ │ ├── jpc_cs.c │ │ ├── jpc_cs.h │ │ ├── jpc_dec.c │ │ ├── jpc_dec.h │ │ ├── jpc_enc.c │ │ ├── jpc_enc.h │ │ ├── jpc_fix.h │ │ ├── jpc_flt.h │ │ ├── jpc_math.c │ │ ├── jpc_math.h │ │ ├── jpc_mct.c │ │ ├── jpc_mct.h │ │ ├── jpc_mqcod.c │ │ ├── jpc_mqcod.h │ │ ├── jpc_mqdec.c │ │ ├── jpc_mqdec.h │ │ ├── jpc_mqenc.c │ │ ├── jpc_mqenc.h │ │ ├── jpc_qmfb.c │ │ ├── jpc_qmfb.h │ │ ├── jpc_t1cod.c │ │ ├── jpc_t1cod.h │ │ ├── jpc_t1dec.c │ │ ├── jpc_t1dec.h │ │ ├── jpc_t1enc.c │ │ ├── jpc_t1enc.h │ │ ├── jpc_t2cod.c │ │ ├── jpc_t2cod.h │ │ ├── jpc_t2dec.c │ │ ├── jpc_t2dec.h │ │ ├── jpc_t2enc.c │ │ ├── jpc_t2enc.h │ │ ├── jpc_tagtree.c │ │ ├── jpc_tagtree.h │ │ ├── jpc_tsfb.c │ │ ├── jpc_tsfb.h │ │ ├── jpc_util.c │ │ └── jpc_util.h │ ├── jpegtranslator │ ├── JPEGTranslator.cpp │ ├── JPEGTranslator.h │ ├── README │ ├── be_jdatadst.cpp │ ├── be_jdatasrc.cpp │ ├── be_jerror.cpp │ └── libjpeg │ │ ├── README │ │ ├── __changes_by_Shard.txt │ │ ├── filelist.txt │ │ ├── jcapimin.c │ │ ├── jcapistd.c │ │ ├── jccoefct.c │ │ ├── jccolor.c │ │ ├── jcdctmgr.c │ │ ├── jcdiffct.c │ │ ├── jchuff.c │ │ ├── jchuff.h │ │ ├── jcinit.c │ │ ├── jclhuff.c │ │ ├── jclossls.c │ │ ├── jclossy.c │ │ ├── jcmainct.c │ │ ├── jcmarker.c │ │ ├── jcmaster.c │ │ ├── jcodec.c │ │ ├── jcomapi.c │ │ ├── jconfig.doc │ │ ├── jconfig.h │ │ ├── jcparam.c │ │ ├── jcphuff.c │ │ ├── jcpred.c │ │ ├── jcprepct.c │ │ ├── jcsample.c │ │ ├── jcscale.c │ │ ├── jcshuff.c │ │ ├── jctrans.c │ │ ├── jdapimin.c │ │ ├── jdapistd.c │ │ ├── jdatadst.c │ │ ├── jdatasrc.c │ │ ├── jdcoefct.c │ │ ├── jdcolor.c │ │ ├── jdct.h │ │ ├── jddctmgr.c │ │ ├── jddiffct.c │ │ ├── jdhuff.c │ │ ├── jdhuff.h │ │ ├── jdinput.c │ │ ├── jdlhuff.c │ │ ├── jdlossls.c │ │ ├── jdlossy.c │ │ ├── jdmainct.c │ │ ├── jdmarker.c │ │ ├── jdmaster.c │ │ ├── jdmerge.c │ │ ├── jdphuff.c │ │ ├── jdpostct.c │ │ ├── jdpred.c │ │ ├── jdsample.c │ │ ├── jdscale.c │ │ ├── jdshuff.c │ │ ├── jdtrans.c │ │ ├── jerror.c │ │ ├── jerror.h │ │ ├── jfdctflt.c │ │ ├── jfdctfst.c │ │ ├── jfdctint.c │ │ ├── jidctflt.c │ │ ├── jidctfst.c │ │ ├── jidctint.c │ │ ├── jidctred.c │ │ ├── jinclude.h │ │ ├── jlossls.h │ │ ├── jlossy.h │ │ ├── jmemansi.c │ │ ├── jmemmgr.c │ │ ├── jmemname.c │ │ ├── jmemnobs.c │ │ ├── jmemsys.h │ │ ├── jmorecfg.h │ │ ├── jpegint.h │ │ ├── jpeglib.h │ │ ├── jquant1.c │ │ ├── jquant2.c │ │ ├── jutils.c │ │ └── jversion.h │ ├── libtifftranslator │ ├── TIFFMain.cpp │ ├── TIFFTranslator.cpp │ ├── TIFFTranslator.h │ ├── TIFFTranslatorSettings.cpp │ ├── TIFFTranslatorSettings.h │ ├── TIFFView.cpp │ ├── TIFFView.h │ ├── TIFFWindow.cpp │ ├── TIFFWindow.h │ ├── t4.h │ ├── tif_aux.c │ ├── tif_close.c │ ├── tif_codec.c │ ├── tif_color.c │ ├── tif_compress.c │ ├── tif_dir.c │ ├── tif_dir.h │ ├── tif_dirinfo.c │ ├── tif_dirread.c │ ├── tif_dirwrite.c │ ├── tif_dumpmode.c │ ├── tif_error.c │ ├── tif_extension.c │ ├── tif_fax3.c │ ├── tif_fax3.h │ ├── tif_fax3sm.c │ ├── tif_flush.c │ ├── tif_getimage.c │ ├── tif_luv.c │ ├── tif_lzw.c │ ├── tif_next.c │ ├── tif_open.c │ ├── tif_packbits.c │ ├── tif_predict.c │ ├── tif_predict.h │ ├── tif_print.c │ ├── tif_read.c │ ├── tif_strip.c │ ├── tif_swab.c │ ├── tif_thunder.c │ ├── tif_tile.c │ ├── tif_unix.c │ ├── tif_version.c │ ├── tif_warning.c │ ├── tif_write.c │ ├── tif_zip.c │ ├── tiff.h │ ├── tiffcomp.h │ ├── tiffconf.h │ ├── tiffio.h │ ├── tiffiop.h │ ├── tiffvers.h │ └── uvcode.h │ ├── pngtranslator │ ├── Makefile.in │ ├── PNGMain.cpp │ ├── PNGTranslator.cpp │ ├── PNGTranslator.h │ ├── PNGTranslatorSettings.cpp │ ├── PNGTranslatorSettings.h │ ├── PNGView.cpp │ ├── PNGView.h │ ├── PNGWindow.cpp │ └── PNGWindow.h │ ├── ppmtranslator │ ├── LICENSE │ ├── PPMMain.cpp │ ├── PPMTranslator.cpp │ ├── colorspace.cpp │ └── colorspace.h │ ├── stxttranslator │ ├── STXTMain.cpp │ ├── STXTTranslator.cpp │ ├── STXTTranslator.h │ ├── STXTView.cpp │ ├── STXTView.h │ ├── STXTWindow.cpp │ └── STXTWindow.h │ ├── tgatranslator │ ├── StreamBuffer.cpp │ ├── StreamBuffer.h │ ├── TGAMain.cpp │ ├── TGATranslator.cpp │ ├── TGATranslator.h │ ├── TGATranslatorSettings.cpp │ ├── TGATranslatorSettings.h │ ├── TGAView.cpp │ ├── TGAView.h │ ├── TGAWindow.cpp │ └── TGAWindow.h │ └── tifftranslator │ ├── BitReader.cpp │ ├── BitReader.h │ ├── DecodeTree.cpp │ ├── DecodeTree.h │ ├── TIFFMain.cpp │ ├── TIFFTranslator.cpp │ ├── TIFFTranslator.h │ ├── TIFFView.cpp │ ├── TIFFView.h │ ├── TIFFWindow.cpp │ ├── TIFFWindow.h │ ├── TiffField.cpp │ ├── TiffField.h │ ├── TiffIfd.cpp │ ├── TiffIfd.h │ ├── TiffIfdList.cpp │ ├── TiffIfdList.h │ ├── TiffUintField.cpp │ ├── TiffUintField.h │ ├── TiffUnknownField.cpp │ └── TiffUnknownField.h ├── apps ├── Makefile.in ├── OpenTracker │ ├── Makefile │ ├── deskbar │ │ ├── .ppc_dependencies │ │ ├── .x86_dependencies │ │ ├── AUTHORS │ │ ├── BarApp.cpp │ │ ├── BarApp.h │ │ ├── BarMenuBar.cpp │ │ ├── BarMenuBar.h │ │ ├── BarMenuTitle.cpp │ │ ├── BarMenuTitle.h │ │ ├── BarView.cpp │ │ ├── BarView.h │ │ ├── BarWindow.cpp │ │ ├── BarWindow.h │ │ ├── BeMenu.cpp │ │ ├── BeMenu.h │ │ ├── DeskBarUtils.cpp │ │ ├── DeskBarUtils.h │ │ ├── Deskbar.rsrc │ │ ├── Deskbar.wks │ │ ├── ExpandoMenuBar.cpp │ │ ├── ExpandoMenuBar.h │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── Makefile.in │ │ ├── ResourceSet.cpp │ │ ├── ResourceSet.h │ │ ├── ShowHideMenuItem.cpp │ │ ├── ShowHideMenuItem.h │ │ ├── StatusView.cpp │ │ ├── StatusView.h │ │ ├── StatusViewShelf.cpp │ │ ├── StatusViewShelf.h │ │ ├── Switcher.cpp │ │ ├── Switcher.h │ │ ├── TeamMenu.cpp │ │ ├── TeamMenu.h │ │ ├── TeamMenuItem.cpp │ │ ├── TeamMenuItem.h │ │ ├── TimeView.cpp │ │ ├── TimeView.h │ │ ├── WindowMenu.cpp │ │ ├── WindowMenu.h │ │ ├── WindowMenuItem.cpp │ │ ├── WindowMenuItem.h │ │ ├── icon-freelogo.rsrc │ │ ├── icons.h │ │ ├── icons.rdef │ │ └── icons_logo.h │ ├── shared │ │ ├── AutoLock.h │ │ ├── FavoritesConfig.h │ │ ├── NavMenu.h │ │ ├── ObjectList.h │ │ ├── TextViewSupport.h │ │ ├── md4checksum.h │ │ ├── pr_server.h │ │ └── tracker_private.h │ └── tracker │ │ ├── .ppc_dependencies │ │ ├── .x86_dependencies │ │ ├── AUTHORS │ │ ├── AboutBox.cpp │ │ ├── AttributeStream.cpp │ │ ├── AttributeStream.h │ │ ├── Attributes.h │ │ ├── AutoMounter.cpp │ │ ├── AutoMounter.h │ │ ├── AutoMounterSettings.cpp │ │ ├── AutoMounterSettings.h │ │ ├── Background.h │ │ ├── BackgroundImage.cpp │ │ ├── BackgroundImage.h │ │ ├── Bitmaps.cpp │ │ ├── Bitmaps.h │ │ ├── Commands.h │ │ ├── ContainerWindow.cpp │ │ ├── ContainerWindow.h │ │ ├── CountView.cpp │ │ ├── CountView.h │ │ ├── DeskWindow.cpp │ │ ├── DeskWindow.h │ │ ├── DesktopPoseView.cpp │ │ ├── DesktopPoseView.h │ │ ├── DeviceMap.h │ │ ├── DeviceMapGlue.h │ │ ├── DialogPane.cpp │ │ ├── DialogPane.h │ │ ├── DirMenu.cpp │ │ ├── DirMenu.h │ │ ├── EntryIterator.cpp │ │ ├── EntryIterator.h │ │ ├── FBCPadding.cpp │ │ ├── FSClipboard.cpp │ │ ├── FSClipboard.h │ │ ├── FSUtils.cpp │ │ ├── FSUtils.h │ │ ├── FavoritesConfig.cpp │ │ ├── FavoritesMenu.cpp │ │ ├── FavoritesMenu.h │ │ ├── FilePanel.cpp │ │ ├── FilePanelPriv.cpp │ │ ├── FilePanelPriv.h │ │ ├── FilePermissionsView.cpp │ │ ├── FilePermissionsView.h │ │ ├── FindPanel.cpp │ │ ├── FindPanel.h │ │ ├── FunctionObject.h │ │ ├── IconCache.cpp │ │ ├── IconCache.h │ │ ├── IconMenuItem.cpp │ │ ├── IconMenuItem.h │ │ ├── InfoWindow.cpp │ │ ├── InfoWindow.h │ │ ├── LICENSE │ │ ├── LockingList.h │ │ ├── Makefile │ │ ├── Makefile.in │ │ ├── MimeTypeList.cpp │ │ ├── MimeTypeList.h │ │ ├── MimeTypes.h │ │ ├── MiniMenuField.cpp │ │ ├── MiniMenuField.h │ │ ├── Model.cpp │ │ ├── Model.h │ │ ├── MountMenu.cpp │ │ ├── MountMenu.h │ │ ├── NavMenu.cpp │ │ ├── Navigator.cpp │ │ ├── Navigator.h │ │ ├── NodePreloader.cpp │ │ ├── NodePreloader.h │ │ ├── NodeWalker.cpp │ │ ├── NodeWalker.h │ │ ├── OpenHashTable.h │ │ ├── OpenWithWindow.cpp │ │ ├── OpenWithWindow.h │ │ ├── OverrideAlert.cpp │ │ ├── OverrideAlert.h │ │ ├── PendingNodeMonitorCache.cpp │ │ ├── PendingNodeMonitorCache.h │ │ ├── Pose.cpp │ │ ├── Pose.h │ │ ├── PoseList.cpp │ │ ├── PoseList.h │ │ ├── PoseView.cpp │ │ ├── PoseView.h │ │ ├── PoseViewScripting.cpp │ │ ├── PublicCommands.h │ │ ├── QueryContainerWindow.cpp │ │ ├── QueryContainerWindow.h │ │ ├── QueryPoseView.cpp │ │ ├── QueryPoseView.h │ │ ├── RecentItems.cpp │ │ ├── RecentItems.h │ │ ├── RegExp.cpp │ │ ├── RegExp.h │ │ ├── SelectionWindow.cpp │ │ ├── SelectionWindow.h │ │ ├── Settings.cpp │ │ ├── Settings.h │ │ ├── SettingsHandler.cpp │ │ ├── SettingsHandler.h │ │ ├── SettingsViews.cpp │ │ ├── SettingsViews.h │ │ ├── SlowContextPopup.cpp │ │ ├── SlowContextPopup.h │ │ ├── SlowMenu.cpp │ │ ├── SlowMenu.h │ │ ├── StatusWindow.cpp │ │ ├── StatusWindow.h │ │ ├── TaskLoop.cpp │ │ ├── TaskLoop.h │ │ ├── TemplatesMenu.cpp │ │ ├── TemplatesMenu.h │ │ ├── Tests.cpp │ │ ├── Tests.h │ │ ├── TextWidget.cpp │ │ ├── TextWidget.h │ │ ├── Thread.cpp │ │ ├── Thread.h │ │ ├── TitleView.cpp │ │ ├── TitleView.h │ │ ├── Tracker.cpp │ │ ├── Tracker.h │ │ ├── Tracker.rsrc │ │ ├── Tracker.wks │ │ ├── TrackerIcons.h │ │ ├── TrackerIcons.rdef │ │ ├── TrackerInitialState.cpp │ │ ├── TrackerScripting.cpp │ │ ├── TrackerSettings.cpp │ │ ├── TrackerSettings.h │ │ ├── TrackerSettingsWindow.cpp │ │ ├── TrackerSettingsWindow.h │ │ ├── TrackerString.cpp │ │ ├── TrackerString.h │ │ ├── TrashWatcher.cpp │ │ ├── TrashWatcher.h │ │ ├── Utilities.cpp │ │ ├── Utilities.h │ │ ├── ViewState.cpp │ │ ├── ViewState.h │ │ ├── VolumeWindow.cpp │ │ ├── VolumeWindow.h │ │ ├── WidgetAttributeText.cpp │ │ ├── WidgetAttributeText.h │ │ ├── libtracker.noexport │ │ └── main.cpp ├── bedate │ ├── Makefile.in │ ├── app.cpp │ ├── disapp.cpp │ ├── disapp.h │ ├── discordian.cpp │ ├── discordian.h │ ├── disview.cpp │ ├── disview.h │ ├── diswindow.cpp │ ├── diswindow.h │ ├── julian.cpp │ └── julian.h ├── calc │ ├── CalcEngine.cpp │ ├── CalcEngine.h │ ├── CalcView.cpp │ ├── CalcView.h │ ├── CalcWindow.cpp │ ├── CalcWindow.h │ ├── Calculator.cpp │ ├── Calculator.h │ ├── Calculator_x86.rsrc │ ├── FrameView.cpp │ ├── FrameView.h │ └── Makefile.in ├── cterm │ ├── Makefile │ ├── Makefile.in │ ├── config.log │ ├── main.cpp │ ├── tview.cpp │ └── tview.h ├── desktop │ ├── Makefile │ ├── Makefile.in │ ├── icon.cpp │ ├── icon.h │ ├── iconview.cpp │ ├── iconview.h │ ├── jpeg.cpp │ ├── login.cpp │ └── main.cpp ├── guido │ ├── Makefile.in │ ├── app.cpp │ ├── disapp.cpp │ ├── disapp.h │ ├── diswindow.cpp │ └── diswindow.h ├── osutils │ ├── Makefile.in │ ├── portinfo.cpp │ └── seminfo.cpp ├── pulse │ ├── BottomPrefsView.cpp │ ├── BottomPrefsView.h │ ├── CPUButton.cpp │ ├── CPUButton.h │ ├── Common.h │ ├── ConfigView.cpp │ ├── ConfigView.h │ ├── DeskbarPulseView.cpp │ ├── DeskbarPulseView.h │ ├── LICENSE │ ├── Makefile.in │ ├── MiniPulseView.cpp │ ├── MiniPulseView.h │ ├── NormalPulseView.cpp │ ├── NormalPulseView.h │ ├── Pictures │ ├── Prefs.cpp │ ├── Prefs.h │ ├── PrefsWindow.cpp │ ├── PrefsWindow.h │ ├── ProgressBar.cpp │ ├── ProgressBar.h │ ├── Pulse.rsrc │ ├── PulseApp.cpp │ ├── PulseApp.h │ ├── PulseView.cpp │ ├── PulseView.h │ ├── PulseWindow.cpp │ └── PulseWindow.h └── testharness │ ├── Makefile.in │ ├── clean_shm.sh │ ├── main.cpp │ ├── testlist.cpp │ ├── testoskit.cpp │ ├── testports.cpp │ ├── testsem.cpp │ ├── testsempingpong.cpp │ └── teststopwatch.cpp ├── kits ├── Makefile.in ├── app │ ├── AppDefs.cpp │ ├── AppMisc.cpp │ ├── AppServerLink.cpp │ ├── Application.cpp │ ├── AreaLink.cpp │ ├── Clipboard.cpp │ ├── Cursor.cpp │ ├── Handler.cpp │ ├── InitTerminateLibBe.c │ ├── Invoker.cpp │ ├── LinkMsgReader.cpp │ ├── LinkMsgSender.cpp │ ├── Looper.cpp │ ├── LooperList.cpp │ ├── Message.cpp │ ├── MessageBody.cpp │ ├── MessageField.cpp │ ├── MessageFilter.cpp │ ├── MessageQueue.cpp │ ├── MessageRunner.cpp │ ├── MessageUtils.cpp │ ├── Messenger.cpp │ ├── PortLink.cpp │ ├── PortMessage.cpp │ ├── PortQueue.cpp │ ├── PropertyInfo.cpp │ ├── RegistrarDefs.cpp │ ├── RegistrarThread.cpp │ ├── RegistrarThreadManager.cpp │ ├── Roster.cpp │ ├── RosterPrivate.cpp │ ├── ServerMemIO.cpp │ ├── Session.cpp │ └── TokenSpace.cpp ├── interface │ ├── Alert.cpp │ ├── BMCPrivate.cpp │ ├── BTextView │ │ ├── InlineInput.cpp │ │ ├── InlineInput.h │ │ ├── LineBuffer.cpp │ │ ├── LineBuffer.h │ │ ├── StyleBuffer.cpp │ │ ├── StyleBuffer.h │ │ ├── TextGapBuffer.cpp │ │ ├── TextGapBuffer.h │ │ ├── TextView.cpp │ │ ├── UndoBuffer.cpp │ │ ├── UndoBuffer.h │ │ └── WidthBuffer.cpp │ ├── Bitmap.cpp │ ├── Box.cpp │ ├── Button.cpp │ ├── CheckBox.cpp │ ├── ClientFontList.cpp │ ├── ColorControl.cpp │ ├── ColorUtils.cc │ ├── Control.cpp │ ├── Deskbar.cpp │ ├── Dragger.cpp │ ├── Font.cpp │ ├── GraphicsDefs.cpp │ ├── Input.cpp │ ├── InterfaceDefs.cpp │ ├── ListItem.cpp │ ├── ListView.cpp │ ├── Menu.cpp │ ├── MenuBar.cpp │ ├── MenuField.cpp │ ├── MenuItem.cpp │ ├── OptionControl.cpp │ ├── OutlineListView.cpp │ ├── Picture.cpp │ ├── PictureButton.cpp │ ├── Point.cpp │ ├── Polygon.cpp │ ├── PopUpMenu.cpp │ ├── PrivateScreen.cpp │ ├── RadioButton.cpp │ ├── Rect.cpp │ ├── Region.cpp │ ├── RegionSupport.cpp │ ├── Screen.cpp │ ├── ScrollBar.cpp │ ├── ScrollView.cpp │ ├── Shape.cpp │ ├── Shelf.cpp │ ├── Slider.cpp │ ├── StatusBar.cpp │ ├── StringItem.cpp │ ├── StringView.cpp │ ├── TPicture.cpp │ ├── TabView.cpp │ ├── TextControl.cpp │ ├── TextInput.cpp │ ├── View.cpp │ ├── Window.cpp │ └── ZombieReplicantView.cpp ├── kernel │ ├── area.c │ ├── atomic.c │ ├── dirent.c │ ├── direntfd.c │ ├── fs.c │ ├── image.c │ ├── misc.c │ ├── parsedate.cpp │ ├── port.c │ ├── real_time_clock.c │ ├── sem.c │ ├── sem.orig.c │ ├── sem.posix.c │ ├── sem_internals.c │ └── thread.c ├── libcosmoe.dox ├── storage │ ├── AppFileInfo.cpp │ ├── Directory.cpp │ ├── Entry.cpp │ ├── EntryList.cpp │ ├── File.cpp │ ├── FilePanel.cpp │ ├── FindDirectory.cpp │ ├── Mime.cpp │ ├── MimeType.cpp │ ├── Node.cpp │ ├── NodeInfo.cpp │ ├── NodeMonitor.cpp │ ├── OffsetFile.cpp │ ├── Path.cpp │ ├── Query.cpp │ ├── QueryPredicate.cpp │ ├── ResourceFile.cpp │ ├── ResourceItem.cpp │ ├── ResourceStrings.cpp │ ├── Resources.cpp │ ├── ResourcesContainer.cpp │ ├── Statable.cpp │ ├── SymLink.cpp │ ├── Volume.cpp │ ├── VolumeRoster.cpp │ ├── kernel_interface.POSIX.cpp │ ├── mime │ │ ├── AssociatedTypes.cpp │ │ ├── CreateAppMetaMimeThread.cpp │ │ ├── Database.cpp │ │ ├── InstalledTypes.cpp │ │ ├── MimeUpdateThread.cpp │ │ ├── SnifferRules.cpp │ │ ├── Supertype.cpp │ │ ├── SupportingApps.cpp │ │ ├── UpdateMimeInfoThread.cpp │ │ ├── database_access.cpp │ │ └── database_support.cpp │ ├── sniffer │ │ ├── CharStream.cpp │ │ ├── DisjList.cpp │ │ ├── Err.cpp │ │ ├── Parser.cpp │ │ ├── Pattern.cpp │ │ ├── PatternList.cpp │ │ ├── RPattern.cpp │ │ ├── RPatternList.cpp │ │ ├── Range.cpp │ │ └── Rule.cpp │ └── storage_support.cpp ├── support │ ├── Archivable.cpp │ ├── Beep.cpp │ ├── BlockCache.cpp │ ├── BufferIO.cpp │ ├── ByteOrder.cpp │ ├── DataBuffer.cpp │ ├── DataIO.cpp │ ├── Flattenable.cpp │ ├── List.cpp │ ├── Locker.cpp │ ├── StopWatch.cpp │ └── String.cpp └── translation │ ├── BitmapStream.cpp │ ├── FuncTranslator.cpp │ ├── TranslationUtils.cpp │ ├── TranslatorRoster.cpp │ └── translator.cpp └── servers ├── app ├── Angle.cpp ├── Angle.h ├── AppServer.cpp ├── AppServer.h ├── BGet++.cpp ├── BGet++.h ├── BitmapDriver.cpp ├── BitmapDriver.h ├── BitmapManager.cpp ├── Clipper.cpp ├── Clipper.h ├── ColorSet.cpp ├── CursorData.cpp ├── CursorData.h ├── CursorHandler.cpp ├── CursorHandler.h ├── CursorManager.cpp ├── CursorManager.h ├── Decorator.cpp ├── DefaultDecorator.cpp ├── DefaultDecorator.h ├── Desktop.cpp ├── Desktop.h ├── DisplayDriver.cpp ├── DisplaySupport.cpp ├── FMWList.cpp ├── FMWList.h ├── FontFamily.cpp ├── FontServer.cpp ├── Globals.h ├── GraphicsBuffer.cpp ├── IPoint.cpp ├── Layer.cpp ├── Layer.h ├── LayerData.cpp ├── Makefile.in ├── PNGDump.cpp ├── PNGDump.h ├── PatternHandler.cpp ├── PicturePlayer.cpp ├── PicturePlayer.h ├── PixelRenderer.cpp ├── RGBColor.cpp ├── RectUtils.cpp ├── RootLayer.cpp ├── RootLayer.h ├── ServerApp.cpp ├── ServerApp.h ├── ServerBitmap.cpp ├── ServerCursor.cpp ├── ServerFont.cpp ├── ServerPicture.cpp ├── ServerPicture.h ├── ServerScreen.cpp ├── ServerScreen.h ├── ServerWindow.cpp ├── ServerWindow.h ├── SysCursor.cpp ├── SystemPalette.cpp ├── TokenHandler.cpp ├── Utils.cpp ├── Utils.h ├── WinBorder.cpp ├── WinBorder.h ├── Workspace.cpp ├── Workspace.h ├── dfbdriver.cpp ├── dfbdriver.h ├── fonts │ └── ttfonts │ │ ├── Vera.ttf │ │ ├── VeraBI.ttf │ │ ├── VeraBd.ttf │ │ ├── VeraIt.ttf │ │ ├── VeraMoBI.ttf │ │ ├── VeraMoBd.ttf │ │ ├── VeraMoIt.ttf │ │ ├── VeraMono.ttf │ │ ├── VeraSe.ttf │ │ ├── VeraSeBd.ttf │ │ └── code_alt.ttf ├── io.c ├── isa_io.h ├── sdldriver.cpp ├── sdldriver.h ├── vesa.c ├── vesa_defs.h ├── vesadrv.cpp ├── vesadrv.h ├── x11driver.cpp └── x11driver.h └── registrar ├── AppInfoList.cpp ├── AppInfoList.h ├── ClipboardHandler.cpp ├── ClipboardHandler.h ├── ClipboardTree.cpp ├── ClipboardTree.h ├── Debug.h ├── Event.cpp ├── Event.h ├── EventMaskWatcher.cpp ├── EventMaskWatcher.h ├── EventQueue.cpp ├── EventQueue.h ├── Jamfile ├── MIMEManager.cpp ├── MIMEManager.h ├── Makefile.in ├── MessageEvent.cpp ├── MessageEvent.h ├── MessageHandler.cpp ├── MessageHandler.h ├── MessageRunnerManager.cpp ├── MessageRunnerManager.h ├── PriorityMessageQueue.cpp ├── PriorityMessageQueue.h ├── RecentApps.cpp ├── RecentApps.h ├── RecentEntries.cpp ├── RecentEntries.h ├── Registrar.cpp ├── Registrar.h ├── RosterAppInfo.cpp ├── RosterAppInfo.h ├── RosterSettingsCharStream.cpp ├── RosterSettingsCharStream.h ├── TRoster.cpp ├── TRoster.h ├── Watcher.cpp ├── Watcher.h ├── WatchingService.cpp ├── WatchingService.h └── registrar.rdef /.gitignore: -------------------------------------------------------------------------------- 1 | objs/ 2 | *.o 3 | *.so 4 | config.h 5 | config.log 6 | config.status 7 | cosmoe.specs 8 | Makefile 9 | -------------------------------------------------------------------------------- /Makefile.common: -------------------------------------------------------------------------------- 1 | # Recursively build the Cosmoe source tree 2 | # Copyright 2002-2004, Bill Hayden 3 | # Part of the Cosmoe project 4 | # http://www.cosmoe.com 5 | 6 | all: 7 | @for subproj in $(SUBPROJECTS); do\ 8 | PWD=$(PWD)/$$subproj;\ 9 | if ! $(MAKE) -C $(PWD)/$$subproj; then exit 1; fi;\ 10 | done 11 | 12 | doc: 13 | @for subproj in $(SUBPROJECTS); do\ 14 | PWD=$(PWD)/$$subproj;\ 15 | if ! $(MAKE) -C $(PWD)/$$subproj doc; then exit 1; fi;\ 16 | done 17 | 18 | install-doc: 19 | @for subproj in $(SUBPROJECTS); do\ 20 | PWD=$(PWD)/$$subproj;\ 21 | if ! $(MAKE) -C $(PWD)/$$subproj install-doc; then exit 1; fi;\ 22 | done 23 | 24 | install: 25 | @for subproj in $(SUBPROJECTS); do\ 26 | PWD=$(PWD)/$$subproj;\ 27 | if ! $(MAKE) -C $(PWD)/$$subproj install; then exit 1; fi;\ 28 | done 29 | 30 | clean: 31 | @for subproj in $(SUBPROJECTS); do\ 32 | PWD=$(PWD)/$$subproj;\ 33 | if ! $(MAKE) -C $(PWD)/$$subproj clean; then exit 1; fi;\ 34 | done 35 | 36 | distclean: 37 | @for subproj in $(SUBPROJECTS); do\ 38 | PWD=$(PWD)/$$subproj;\ 39 | if ! $(MAKE) -C $(PWD)/$$subproj distclean; then exit 1; fi;\ 40 | done 41 | -rm -f Makefile 42 | -rm -f config.cache 43 | -rm -f config.log 44 | -rm -f config.status 45 | -rm -f config.h 46 | -rm -f *.out 47 | -rm -f *~ 48 | -rm -f core.* 49 | -rm -rf autom4te* 50 | -rm -f cosmoe.specs 51 | 52 | deps: 53 | @for subproj in $(SUBPROJECTS); do\ 54 | PWD=$(PWD)/$$subproj;\ 55 | $(MAKE) -ik -C $(PWD)/$$subproj deps 2>/dev/null;\ 56 | done 57 | -------------------------------------------------------------------------------- /Makefile.in: -------------------------------------------------------------------------------- 1 | # Recursively build the Cosmoe source tree 2 | # Copyright 2002-2004, Bill Hayden 3 | # Part of the Cosmoe project 4 | # http://www.cosmoe.com 5 | 6 | SUBPROJECTS = headers \ 7 | src/kits \ 8 | src/servers/app \ 9 | src/servers/registrar \ 10 | src/apps \ 11 | src/add-ons 12 | 13 | include Makefile.common 14 | -------------------------------------------------------------------------------- /cosmoe.sh: -------------------------------------------------------------------------------- 1 | # check for the common mistake of not being root 2 | # this will change one day, but for now root is required 3 | #if [ `whoami` != "root" ] 4 | #then 5 | # echo "ERROR: You must execute this script as root." 6 | # echo " Read the README file for more information." 7 | # exit 1 8 | #fi 9 | 10 | # remove stale shared memory segments 11 | clean_shm.sh 12 | 13 | # start appserver, registrar and a demo app 14 | appserver > server.out & 15 | sleep 2 16 | 17 | registrar > registrar.out & 18 | sleep 1 19 | 20 | guido > guido.out 21 | sleep 1 22 | 23 | # if we arrived here, the application has terminated 24 | killall guido 25 | killall registrar 26 | killall appserver 27 | sleep 1 28 | 29 | # if something won't die normally, try harder to kill it 30 | killall -9 guido 31 | killall -9 registrar 32 | killall -9 appserver 33 | 34 | # remove stale shared memory segments 35 | clean_shm.sh 36 | -------------------------------------------------------------------------------- /cosmoe.specs.in: -------------------------------------------------------------------------------- 1 | -I@ABS_TOPDIR@/headers -I@ABS_TOPDIR@/headers/os -I@ABS_TOPDIR@/headers/os/interface -I@ABS_TOPDIR@/headers/os/support -I@ABS_TOPDIR@/headers/os/kernel -I@ABS_TOPDIR@/headers/os/storage -I@ABS_TOPDIR@/headers/os/app -I@ABS_TOPDIR@/headers/os/util -I@ABS_TOPDIR@/headers/os/translation -I@ABS_TOPDIR@/headers/os/add-ons/file_system -I@ABS_TOPDIR@/headers/private/app -I@ABS_TOPDIR@/headers/private/servers/app -I@ABS_TOPDIR@/headers/private/shared -I@ABS_TOPDIR@/headers/private/interface -I@ABS_TOPDIR@/headers/private/storage -I@ABS_TOPDIR@/headers/os/add-ons/graphics 2 | -------------------------------------------------------------------------------- /distconfigure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "****************************************************" 4 | echo "** Configuring Cosmoe for distributed compilation **" 5 | echo "****************************************************" 6 | echo "" 7 | CC=distcc CXX=distcc ./configure $* 8 | -------------------------------------------------------------------------------- /headers/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | prefix=@prefix@ 3 | 4 | all: 5 | 6 | clean: 7 | 8 | distclean: clean 9 | -rm Makefile 10 | 11 | deps: 12 | 13 | doc: 14 | 15 | install: @includedir@ 16 | cp -R os @includedir@ 17 | cp -R private @includedir@ 18 | 19 | @includedir@: 20 | mkdir -p @includedir@ 21 | 22 | -------------------------------------------------------------------------------- /headers/os/AppKit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Master include file for the App Kit. 3 | * 4 | */ 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | -------------------------------------------------------------------------------- /headers/os/Be.h: -------------------------------------------------------------------------------- 1 | /* 2 | * All-in-one include file for the entire system. 3 | * 4 | */ 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | -------------------------------------------------------------------------------- /headers/os/DeviceKit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Master include file for the Device Kit. 3 | * 4 | */ 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | /* 12 | #include 13 | #include 14 | #include 15 | */ 16 | -------------------------------------------------------------------------------- /headers/os/GameKit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Master include file for the Game Kit. 3 | * 4 | */ 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | -------------------------------------------------------------------------------- /headers/os/InterfaceKit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Master include file for the Interface Kit. 3 | * 4 | * is not included on purpose. 5 | */ 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | -------------------------------------------------------------------------------- /headers/os/KernelKit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Master include file for the Kernel Kit. 3 | * 4 | */ 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | -------------------------------------------------------------------------------- /headers/os/MailKit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Master include file for the Mail Kit. 3 | * 4 | */ 5 | #include 6 | -------------------------------------------------------------------------------- /headers/os/MediaKit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Master include file for the Media Kit. 3 | * 4 | */ 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | -------------------------------------------------------------------------------- /headers/os/MidiKit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Master include file for the Midi Kit. 3 | * 4 | */ 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | -------------------------------------------------------------------------------- /headers/os/NetKit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Master include file for the Net Kit. 3 | * 4 | */ 5 | #include 6 | #include 7 | #include 8 | #include 9 | -------------------------------------------------------------------------------- /headers/os/NetworkKit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Master include file for the Network Kit. 3 | * 4 | */ 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | -------------------------------------------------------------------------------- /headers/os/StorageKit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Master include file for the Storage Kit. 3 | * 4 | */ 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | -------------------------------------------------------------------------------- /headers/os/SupportKit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Master include file for the Support Kit. 3 | * 4 | */ 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | -------------------------------------------------------------------------------- /headers/os/TranslationKit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Master include file for the Translation Kit. 3 | * 4 | * not included, as it's only required when building an add-on 5 | */ 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | -------------------------------------------------------------------------------- /headers/os/add-ons/file_system/fsproto.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 1999-2001, Be Incorporated. All Rights Reserved. 3 | This file may be used under the terms of the Be Sample Code License. 4 | */ 5 | 6 | #ifndef _FSPROTO_H 7 | #define _FSPROTO_H 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | typedef dev_t nspace_id; 21 | typedef ino_t vnode_id; 22 | 23 | /* 24 | * PUBLIC PART OF THE FILE SYSTEM PROTOCOL 25 | */ 26 | 27 | #define WSTAT_MODE 0x0001 28 | #define WSTAT_UID 0x0002 29 | #define WSTAT_GID 0x0004 30 | #define WSTAT_SIZE 0x0008 31 | #define WSTAT_ATIME 0x0010 32 | #define WSTAT_MTIME 0x0020 33 | #define WSTAT_CRTIME 0x0040 34 | 35 | #define WFSSTAT_NAME 0x0001 36 | 37 | #define B_ENTRY_CREATED 1 38 | #define B_ENTRY_REMOVED 2 39 | #define B_ENTRY_MOVED 3 40 | #define B_STAT_CHANGED 4 41 | #define B_ATTR_CHANGED 5 42 | #define B_DEVICE_MOUNTED 6 43 | #define B_DEVICE_UNMOUNTED 7 44 | 45 | #define B_STOP_WATCHING 0x0000 46 | #define B_WATCH_NAME 0x0001 47 | #define B_WATCH_STAT 0x0002 48 | #define B_WATCH_ATTR 0x0004 49 | #define B_WATCH_DIRECTORY 0x0008 50 | 51 | #define SELECT_READ 1 52 | #define SELECT_WRITE 2 53 | #define SELECT_EXCEPTION 3 54 | 55 | #define B_CUR_FS_API_VERSION 2 56 | 57 | #define IOCTL_FILE_UNCACHED_IO 10000 58 | #define IOCTL_CREATE_TIME 10002 59 | #define IOCTL_MODIFIED_TIME 10003 60 | 61 | struct attr_info; 62 | struct index_info; 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /headers/os/app/MessageQueue.h: -------------------------------------------------------------------------------- 1 | // 2 | // $Id: MessageQueue.h,v 1.2 2002/10/26 18:59:16 beveloper Exp $ 3 | // 4 | // This is the BMessageQueue interface for OpenBeOS. It has been created 5 | // to be source and binary compatible with the BeOS version of 6 | // BMessageQueue. 7 | // 8 | 9 | 10 | #ifndef _OPENBEOS_MESSAGEQUEUE_H 11 | #define _OPENBEOS_MESSAGEQUEUE_H 12 | 13 | 14 | #include 15 | #include /* For convenience */ 16 | 17 | 18 | #ifdef USE_OPENBEOS_NAMESPACE 19 | namespace OpenBeOS { 20 | #endif 21 | 22 | class BMessageQueue { 23 | public: 24 | BMessageQueue(); 25 | virtual ~BMessageQueue(); 26 | 27 | void AddMessage(BMessage *message); 28 | void RemoveMessage(BMessage *message); 29 | 30 | int32 CountMessages(void) const; 31 | bool IsEmpty(void) const; 32 | 33 | BMessage *FindMessage(int32 index) const; 34 | BMessage *FindMessage(uint32 what, int32 index=0) const; 35 | 36 | bool Lock(void); 37 | void Unlock(void); 38 | bool IsLocked(void); 39 | 40 | BMessage *NextMessage(void); 41 | 42 | private: 43 | 44 | // Reserved space in the vtable for future changes to BMessageQueue 45 | virtual void _ReservedMessageQueue1(void); 46 | virtual void _ReservedMessageQueue2(void); 47 | virtual void _ReservedMessageQueue3(void); 48 | 49 | BMessageQueue(const BMessageQueue &); 50 | BMessageQueue &operator=(const BMessageQueue &); 51 | 52 | BMessage *fTheQueue; 53 | BMessage *fQueueTail; 54 | int32 fMessageCount; 55 | BLocker fLocker; 56 | 57 | // Reserved space for future changes to BMessageQueue 58 | uint32 fReservedSpace[3]; 59 | }; 60 | 61 | #ifdef USE_OPENBEOS_NAMESPACE 62 | } 63 | #endif 64 | 65 | #endif // _OPENBEOS_MESSAGEQUEUE_H 66 | -------------------------------------------------------------------------------- /headers/os/interface/StringItem.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // File: StringItem.h 4 | // 5 | // Description: 6 | // 7 | // Copyright 2001, Ulrich Wimboeck 8 | // 9 | //////////////////////////////////////////////////////////////////////////////// 10 | 11 | #ifndef _STRING_ITEM_H 12 | #define _STRING_ITEM_H 13 | 14 | #include 15 | 16 | 17 | #ifdef USE_OPENBEOS_NAMESPACE 18 | namespace OpenBeOS { 19 | #endif 20 | 21 | 22 | //----- BStringItem class ---------------------------------------- 23 | 24 | class BStringItem : public BListItem 25 | { 26 | public: 27 | BStringItem(const char *text, uint32 outlineLevel = 0, bool expanded = true); 28 | BStringItem(BMessage *data); 29 | virtual ~BStringItem(); 30 | 31 | static BArchivable *Instantiate(BMessage *data); 32 | virtual status_t Archive(BMessage *data, bool deep = true) const; 33 | 34 | virtual void DrawItem(BView *owner, BRect frame, bool complete = false); 35 | virtual void SetText(const char *text); 36 | const char *Text() const; 37 | 38 | virtual void Update(BView *owner, const BFont *font); 39 | 40 | virtual status_t Perform(perform_code code, void *arg); 41 | 42 | private: 43 | virtual void _ReservedStringItem1(); 44 | virtual void _ReservedStringItem2(); 45 | 46 | BStringItem(const BStringItem &); 47 | BStringItem& operator=(const BStringItem &); 48 | 49 | char *fText; 50 | float fBaselineOffset; 51 | uint32 _reserved[2]; 52 | }; 53 | 54 | #ifdef USE_OPENBEOS_NAMESPACE 55 | } 56 | #endif 57 | 58 | #endif /* _STRING_ITEM_H */ 59 | -------------------------------------------------------------------------------- /headers/os/kernel/fs_attr.h: -------------------------------------------------------------------------------- 1 | /* File System attributes 2 | ** 3 | ** Distributed under the terms of the OpenBeOS License. 4 | */ 5 | #ifndef _FS_ATTR_H 6 | #define _FS_ATTR_H 7 | 8 | 9 | #include 10 | #include 11 | 12 | 13 | typedef struct attr_info { 14 | uint32 type; 15 | off_t size; 16 | } attr_info; 17 | 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | extern ssize_t fs_read_attr(int fd, const char *attribute, uint32 type, off_t pos, void *buffer, size_t readBytes); 24 | extern ssize_t fs_write_attr(int fd, const char *attribute, uint32 type, off_t pos, const void *buffer, size_t readBytes); 25 | extern int fs_remove_attr(int fd, const char *attribute); 26 | extern int fs_stat_attr(int fd, const char *attribute, struct attr_info *attrInfo); 27 | 28 | // ToDo: the following three functions are not part of the R5 API, and 29 | // are only preliminary - they may change or be removed at any point 30 | //extern int fs_open_attr(const char *path, const char *attribute, uint32 type, int openMode); 31 | extern int fs_open_attr(int fd, const char *attribute, uint32 type, int openMode); 32 | extern int fs_close_attr(int fd); 33 | 34 | extern DIR *fs_open_attr_dir(const char *path); 35 | extern DIR *fs_fopen_attr_dir(int fd); 36 | extern int fs_close_attr_dir(DIR *dir); 37 | extern struct dirent *fs_read_attr_dir(DIR *dir); 38 | extern void fs_rewind_attr_dir(DIR *dir); 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | #endif /* _FS_ATTR_H */ 45 | -------------------------------------------------------------------------------- /headers/os/kernel/fs_index.h: -------------------------------------------------------------------------------- 1 | /* File System indices 2 | ** 3 | ** Distributed under the terms of the OpenBeOS License. 4 | */ 5 | #ifndef _FS_INDEX_H 6 | #define _FS_INDEX_H 7 | 8 | 9 | #include 10 | #include 11 | 12 | 13 | typedef struct index_info { 14 | uint32 type; 15 | off_t size; 16 | time_t modification_time; 17 | time_t creation_time; 18 | uid_t uid; 19 | gid_t gid; 20 | } index_info; 21 | 22 | 23 | #ifdef __cplusplus 24 | extern "C" { 25 | #endif 26 | 27 | extern int fs_create_index(dev_t device, const char *name, uint32 type, uint32 flags); 28 | extern int fs_remove_index(dev_t device, const char *name); 29 | extern int fs_stat_index(dev_t device, const char *name, struct index_info *indexInfo); 30 | 31 | extern DIR *fs_open_index_dir(dev_t device); 32 | extern int fs_close_index_dir(DIR *indexDirectory); 33 | extern struct dirent *fs_read_index_dir(DIR *indexDirectory); 34 | extern void fs_rewind_index_dir(DIR *indexDirectory); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif /* _FS_INDEX_H */ 41 | -------------------------------------------------------------------------------- /headers/os/kernel/fs_info.h: -------------------------------------------------------------------------------- 1 | /* General File System informations/capabilities 2 | ** 3 | ** Distributed under the terms of the OpenBeOS License. 4 | */ 5 | #ifndef _FS_INFO_H 6 | #define _FS_INFO_H 7 | 8 | #include 9 | 10 | 11 | /* fs_info.flags */ 12 | #define B_FS_IS_READONLY 0x00000001 13 | #define B_FS_IS_REMOVABLE 0x00000002 14 | #define B_FS_IS_PERSISTENT 0x00000004 15 | #define B_FS_IS_SHARED 0x00000008 16 | #define B_FS_HAS_MIME 0x00010000 17 | #define B_FS_HAS_ATTR 0x00020000 18 | #define B_FS_HAS_QUERY 0x00040000 19 | // those additions are preliminary and may be removed 20 | #define B_FS_HAS_SELF_HEALING_LINKS 0x00080000 21 | #define B_FS_HAS_ALIASES 0x00100000 22 | #define B_FS_SUPPORTS_NODE_MONITORING 0x00200000 23 | 24 | typedef struct fs_info { 25 | dev_t dev; /* volume dev_t */ 26 | ino_t root; /* root ino_t */ 27 | uint32 flags; /* flags (see above) */ 28 | off_t block_size; /* fundamental block size */ 29 | off_t io_size; /* optimal i/o size */ 30 | off_t total_blocks; /* total number of blocks */ 31 | off_t free_blocks; /* number of free blocks */ 32 | off_t total_nodes; /* total number of nodes */ 33 | off_t free_nodes; /* number of free nodes */ 34 | char device_name[128]; /* device holding fs */ 35 | char volume_name[B_FILE_NAME_LENGTH]; /* volume name */ 36 | char fsh_name[B_OS_NAME_LENGTH]; /* name of fs handler */ 37 | } fs_info; 38 | 39 | 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | extern dev_t dev_for_path(const char *path); 45 | extern dev_t next_dev(int32 *pos); 46 | extern int fs_stat_dev(dev_t dev, fs_info *info); 47 | 48 | extern ssize_t read_pos(int fd, off_t pos, void *buffer, size_t count); 49 | extern ssize_t write_pos(int fd, off_t pos, const void *buffer,size_t count); 50 | 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif /* _FS_INFO_H */ 57 | -------------------------------------------------------------------------------- /headers/os/kernel/fs_query.h: -------------------------------------------------------------------------------- 1 | /* File System attribute queries 2 | ** 3 | ** Distributed under the terms of the OpenBeOS License. 4 | */ 5 | #ifndef _FS_QUERY_H 6 | #define _FS_QUERY_H 7 | 8 | 9 | #include 10 | #include 11 | 12 | 13 | /* Flags for fs_open_[live_]query() */ 14 | 15 | #define B_LIVE_QUERY 0x00000001 16 | // Note, if you specify B_LIVE_QUERY, you have to use fs_open_live_query(); 17 | // it will be ignored in fs_open_query(). 18 | #define B_QUERY_NON_INDEXED 0x00000002 19 | // Only enable this feature for non time-critical things, it might 20 | // take a long time to proceed. 21 | // Also, not every file system might support this feature. 22 | 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | extern DIR *fs_open_query(dev_t device, const char *query, uint32 flags); 29 | extern DIR *fs_open_live_query(dev_t device, const char *query, 30 | uint32 flags, port_id port, int32 token); 31 | extern int fs_close_query(DIR *d); 32 | extern struct dirent *fs_read_query(DIR *d); 33 | 34 | extern status_t get_path_for_dirent(struct dirent *dent, char *buf, 35 | size_t len); 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | 41 | #endif /* _FS_QUERY_H */ 42 | -------------------------------------------------------------------------------- /headers/os/kernel/macros.h: -------------------------------------------------------------------------------- 1 | #ifndef _MACROS_H_ 2 | #define _MACROS_H_ 3 | 4 | #define ABS(a) (((a)>=0) ? (a) : (-(a))) 5 | 6 | #define min(a,b) (((a)<(b)) ? (a) : (b) ) 7 | #define max(a,b) (((a)>(b)) ? (a) : (b) ) 8 | 9 | #define __assertw( expr ) do {if ( !(expr) ) \ 10 | dbprintf( "Assertion failure (" #expr ")\n" \ 11 | "file: " __FILE__ " function: %s() line: %d\n%p\n%p\n%p\n%p\n", \ 12 | __FUNCTION__, __LINE__, __builtin_return_address(0), __builtin_return_address(1), \ 13 | __builtin_return_address(2), __builtin_return_address(3) ); } while(0) 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /headers/os/storage/EntryList.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file EntryList.h 7 | BEntryList interface declaration. 8 | */ 9 | 10 | #ifndef _ENTRY_LIST_H 11 | #define _ENTRY_LIST_H 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #ifdef USE_OPENBEOS_NAMESPACE 18 | namespace OpenBeOS { 19 | #endif 20 | 21 | // Forward declarations 22 | class BEntry; 23 | struct entry_ref; 24 | 25 | //! Interface for iterating through a list of filesystem entries 26 | /*! Defines a general interface for iterating through a list of entries (i.e. 27 | files in a folder 28 | 29 | @author Tyler Dauwalder 30 | @author Be Inc. 31 | @version 0.0.0 32 | */ 33 | class BEntryList { 34 | public: 35 | BEntryList(); 36 | virtual ~BEntryList(); 37 | 38 | virtual status_t GetNextEntry(BEntry *entry, bool traverse = false) = 0; 39 | virtual status_t GetNextEntryName( std::string* inName ) { return -1; }; 40 | 41 | virtual status_t Rewind() = 0; 42 | virtual int32 CountEntries() = 0; 43 | 44 | private: 45 | virtual void _ReservedEntryList1(); 46 | virtual void _ReservedEntryList2(); 47 | virtual void _ReservedEntryList3(); 48 | virtual void _ReservedEntryList4(); 49 | virtual void _ReservedEntryList5(); 50 | virtual void _ReservedEntryList6(); 51 | virtual void _ReservedEntryList7(); 52 | virtual void _ReservedEntryList8(); 53 | 54 | }; 55 | 56 | #ifdef USE_OPENBEOS_NAMESPACE 57 | }; // namespace OpenBeOS 58 | #endif 59 | 60 | #endif // _ENTRY_LIST_H 61 | 62 | 63 | -------------------------------------------------------------------------------- /headers/os/storage/Mime.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file Mime.h 7 | Mime type C functions interface declarations. 8 | */ 9 | #ifndef _MIME_H 10 | #define _MIME_H 11 | 12 | #ifndef _BE_BUILD_H 13 | #include 14 | #endif 15 | #include 16 | #include 17 | #include 18 | 19 | // C functions 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | int update_mime_info(const char *path, int recursive, int synchronous, 26 | int force); 27 | 28 | status_t create_app_meta_mime(const char *path, int recursive, int synchronous, 29 | int force); 30 | 31 | status_t get_device_icon(const char *dev, void *icon, int32 size); 32 | 33 | static const uint32 B_MIME_STRING_TYPE = 'MIMS'; 34 | 35 | enum icon_size { 36 | B_LARGE_ICON = 32, 37 | B_MINI_ICON = 16 38 | }; 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | 44 | // OpenBeOS only! 45 | #ifdef __cplusplus 46 | 47 | class BBitmap; 48 | 49 | status_t get_device_icon(const char *dev, BBitmap *icon, icon_size which); 50 | 51 | #endif 52 | 53 | // include the C++ API 54 | #ifdef __cplusplus 55 | #include 56 | #endif 57 | 58 | #endif // _MIME_H 59 | 60 | -------------------------------------------------------------------------------- /headers/os/storage/StorageDefs.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file StorageDefs.h 7 | Miscellaneous Storage Kit definitions and includes. 8 | */ 9 | 10 | #ifndef _DEF_STORAGE_H 11 | #define _DEF_STORAGE_H 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #ifdef USE_OPENBEOS_NAMESPACE 18 | namespace OpenBeOS { 19 | #endif // USE_OPENBEOS_NAMESPACE 20 | 21 | // Limits 22 | #define B_DEV_NAME_LENGTH 128 23 | #define B_FILE_NAME_LENGTH NAME_MAX 24 | #define B_PATH_NAME_LENGTH MAXPATHLEN 25 | #define B_ATTR_NAME_LENGTH (B_FILE_NAME_LENGTH-1) 26 | #define B_MIME_TYPE_LENGTH (B_ATTR_NAME_LENGTH - 15) 27 | #define B_MAX_SYMLINKS SYMLINK_MAX 28 | 29 | 30 | // Open Modes 31 | #define B_READ_ONLY O_RDONLY // read only 32 | #define B_WRITE_ONLY O_WRONLY // write only 33 | #define B_READ_WRITE O_RDWR // read and write 34 | 35 | #define B_FAIL_IF_EXISTS O_EXCL // exclusive create 36 | #define B_CREATE_FILE O_CREAT // create the file 37 | #define B_ERASE_FILE O_TRUNC // erase the file's data 38 | #define B_OPEN_AT_END O_APPEND // point to the end of the data 39 | 40 | 41 | // Node Flavors 42 | enum node_flavor { 43 | B_FILE_NODE = 0x01, 44 | B_SYMLINK_NODE = 0x02, 45 | B_DIRECTORY_NODE = 0x04, 46 | B_ANY_NODE = 0x07 47 | }; 48 | 49 | #ifndef O_RWMASK 50 | #define O_RWMASK O_ACCMODE 51 | #endif 52 | 53 | #ifndef O_NOTRAVERSE 54 | #define O_NOTRAVERSE O_NOFOLLOW 55 | #endif 56 | 57 | #ifndef S_IUMSK 58 | #define S_IUMSK ALLPERMS 59 | #endif 60 | 61 | #ifdef USE_OPENBEOS_NAMESPACE 62 | }; // namespace OpenBeOS 63 | #endif // USE_OPENBEOS_NAMESPACE 64 | 65 | 66 | #endif // _DEF_STORAGE_H 67 | 68 | 69 | -------------------------------------------------------------------------------- /headers/os/storage/VolumeRoster.h: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | // 5 | // File Name: VolumeRoster.h 6 | // 7 | // Description: BVolumeRoster class 8 | // ---------------------------------------------------------------------- 9 | /*! 10 | \file VolumeRoster.h 11 | BVolumeRoster interface declarations. 12 | */ 13 | #ifndef _VOLUME_ROSTER_H 14 | #define _VOLUME_ROSTER_H 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | #ifdef USE_OPENBEOS_NAMESPACE 23 | namespace OpenBeOS { 24 | #endif 25 | 26 | #ifndef __APPLE__ 27 | #include 28 | #endif 29 | 30 | class BVolume; 31 | class BMessenger; 32 | 33 | class BVolumeRoster { 34 | public: 35 | BVolumeRoster(); 36 | virtual ~BVolumeRoster(); 37 | 38 | status_t GetNextVolume(BVolume *volume); 39 | void Rewind(); 40 | 41 | status_t GetBootVolume(BVolume *volume); 42 | 43 | status_t StartWatching(BMessenger messenger = be_app_messenger); 44 | void StopWatching(); 45 | BMessenger Messenger() const; 46 | 47 | private: 48 | virtual void _SeveredVRoster1(); 49 | virtual void _SeveredVRoster2(); 50 | 51 | void _DeallocateMountList(); 52 | 53 | int32 fCookie; 54 | BMessenger *fTarget; 55 | BList mMountList; 56 | 57 | uint32 _reserved[3]; 58 | }; 59 | 60 | #ifdef USE_OPENBEOS_NAMESPACE 61 | } 62 | #endif 63 | 64 | #endif // _VOLUME_ROSTER_H 65 | -------------------------------------------------------------------------------- /headers/os/support/Autolock.h: -------------------------------------------------------------------------------- 1 | // 2 | // $Id: Autolock.h,v 1.2 2003/05/14 17:21:46 haydentech Exp $ 3 | // 4 | // This is the BAutolock interface for OpenBeOS. It has been created to 5 | // be source and binary compatible with the BeOS version of BAutolock. 6 | // To that end, all members are inline just as with the BeOS version. 7 | // 8 | 9 | 10 | #ifndef _OPENBEOS_AUTOLOCK_H 11 | #define _OPENBEOS_AUTOLOCK_H 12 | 13 | 14 | #include 15 | #include 16 | 17 | 18 | #ifdef USE_OPENBEOS_NAMESPACE 19 | namespace OpenBeOS { 20 | #endif 21 | 22 | class BAutolock { 23 | public: 24 | inline BAutolock(BLooper *looper); 25 | inline BAutolock(BLocker *locker); 26 | inline BAutolock(BLocker &locker); 27 | 28 | inline ~BAutolock(); 29 | 30 | inline bool IsLocked(void); 31 | 32 | private: 33 | BLocker *fTheLocker; 34 | BLooper *fTheLooper; 35 | bool fIsLocked; 36 | }; 37 | 38 | 39 | inline BAutolock::BAutolock(BLooper *looper) : 40 | fTheLocker(NULL), fTheLooper(looper), fIsLocked(looper->Lock()) 41 | { 42 | } 43 | 44 | 45 | inline BAutolock::BAutolock(BLocker *locker) : 46 | fTheLocker(locker), fTheLooper(NULL), fIsLocked(locker->Lock()) 47 | { 48 | } 49 | 50 | 51 | inline BAutolock::BAutolock(BLocker &locker) : 52 | fTheLocker(&locker), fTheLooper(NULL), fIsLocked(locker.Lock()) 53 | { 54 | } 55 | 56 | 57 | inline BAutolock::~BAutolock() 58 | { 59 | if (fIsLocked) { 60 | if (fTheLooper != NULL) { 61 | fTheLooper->Unlock(); 62 | } else { 63 | fTheLocker->Unlock(); 64 | } 65 | } 66 | } 67 | 68 | 69 | inline bool BAutolock::IsLocked() 70 | { 71 | return fIsLocked; 72 | } 73 | 74 | 75 | #ifdef USE_OPENBEOS_NAMESPACE 76 | } 77 | #endif 78 | 79 | #endif // _OPENBEOS_LOCKER_H 80 | -------------------------------------------------------------------------------- /headers/os/support/Beep.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | / 3 | / File: Beep.h 4 | / 5 | / Description: System beep function. 6 | / 7 | / Copyright 1993-98, Be Incorporated 8 | / 9 | ******************************************************************************/ 10 | 11 | #ifndef _BEEP_H 12 | #define _BEEP_H 13 | 14 | #include 15 | #include 16 | 17 | 18 | _IMPEXP_BE status_t beep(); 19 | _IMPEXP_BE status_t system_beep(const char * event_name); 20 | 21 | #if defined(__cplusplus) 22 | #define _BEEP_FLAGS = 0 23 | #else 24 | #define _BEEP_FLAGS 25 | #endif 26 | _IMPEXP_BE status_t add_system_beep_event(const char * event_name, uint32 flags _BEEP_FLAGS); 27 | 28 | 29 | #endif /* _BEEP_H */ 30 | -------------------------------------------------------------------------------- /headers/os/support/BufferIO.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | / 3 | / File: BufferIO.h 4 | / 5 | / Description: A buffered adapter for BPositionIO 6 | / 7 | / Copyright 1998, Be Incorporated 8 | / 9 | ******************************************************************************/ 10 | 11 | #if !defined(_BUFFER_IO_H) 12 | #define _BUFFER_IO_H 13 | 14 | #include 15 | 16 | class BBufferIO : public BPositionIO 17 | { 18 | public: 19 | enum { 20 | DEFAULT_BUF_SIZE = 65536L 21 | }; 22 | 23 | BBufferIO( 24 | BPositionIO * stream, 25 | size_t buf_size = DEFAULT_BUF_SIZE, 26 | bool owns_stream = true); 27 | virtual ~BBufferIO(); 28 | 29 | virtual ssize_t ReadAt( 30 | off_t pos, 31 | void *buffer, 32 | size_t size); 33 | virtual ssize_t WriteAt( 34 | off_t pos, 35 | const void *buffer, 36 | size_t size); 37 | virtual off_t Seek( 38 | off_t position, 39 | uint32 seek_mode); 40 | virtual off_t Position() const; 41 | virtual status_t SetSize( 42 | off_t size); 43 | virtual status_t Flush(); 44 | BPositionIO * Stream() const; 45 | size_t BufferSize() const; 46 | bool OwnsStream() const; 47 | void SetOwnsStream( 48 | bool owns_stream); 49 | 50 | void PrintToStream() const; 51 | 52 | private: 53 | 54 | off_t m_buffer_start; 55 | BPositionIO * m_stream; 56 | char * m_buffer; 57 | size_t m_buffer_phys; 58 | size_t m_buffer_used; 59 | uint32 _reserved_ints[6]; 60 | bool m_buffer_dirty; 61 | bool m_owns_stream; 62 | bool _reserved_bools[6]; 63 | 64 | virtual status_t _Reserved_BufferIO_0(void *); 65 | virtual status_t _Reserved_BufferIO_1(void *); 66 | virtual status_t _Reserved_BufferIO_2(void *); 67 | virtual status_t _Reserved_BufferIO_3(void *); 68 | virtual status_t _Reserved_BufferIO_4(void *); 69 | 70 | }; 71 | 72 | 73 | #endif /* _BUFFER_IO_H */ 74 | -------------------------------------------------------------------------------- /headers/os/support/ClassInfo.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | / 3 | / File: ClassInfo.h 4 | / 5 | / Description: C++ class identification and casting macros 6 | / 7 | / Copyright 1993-98, Be Incorporated 8 | / 9 | ******************************************************************************/ 10 | 11 | #ifndef _CLASS_INFO_H 12 | #define _CLASS_INFO_H 13 | 14 | #include 15 | 16 | // deprecated, use standard RTTI calls instead 17 | 18 | #ifdef USE_OPENBEOS_NAMESPACE 19 | namespace OpenBeOS { 20 | #endif 21 | 22 | /*-------------------------------------------------------------*/ 23 | /*--------- Class Info Macros ---------------------------------*/ 24 | 25 | #define class_name(ptr) ((typeid(*(ptr))).name()) 26 | #define cast_as(ptr, class) (dynamic_cast(ptr)) 27 | #define is_kind_of(ptr, class) (cast_as(ptr, class) != 0) 28 | #define is_instance_of(ptr, class) (typeid(*(ptr)) == typeid(class)) 29 | 30 | /*-------------------------------------------------------------*/ 31 | /*-------------------------------------------------------------*/ 32 | 33 | #ifdef USE_OPENBEOS_NAMESPACE 34 | } // namespace OpenBeOS 35 | using namespace OpenBeOS; 36 | #endif 37 | 38 | #endif /* _CLASS_INFO_H */ 39 | -------------------------------------------------------------------------------- /headers/os/support/Debug.h: -------------------------------------------------------------------------------- 1 | #ifndef _DEBUG_H 2 | #define _DEBUG_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | /*-------------------------------------------------------------*/ 13 | /*----- Debug macros ------------------------------------------*/ 14 | 15 | #define SET_DEBUG_ENABLED(FLAG) (void)0 16 | #define IS_DEBUG_ENABLED() (void)0 17 | 18 | #define SERIAL_PRINT(ARGS) (void)0 19 | #define PRINT(ARGS) (void)0 20 | #define PRINT_OBJECT(OBJ) (void)0 21 | #define TRACE() (void)0 22 | #define SERIAL_TRACE() (void)0 23 | 24 | #define DEBUGGER(MSG) (void)0 25 | 26 | #if !defined(ASSERT) 27 | #define ASSERT(E) (void)0 28 | #endif 29 | #define ASSERT_WITH_MESSAGE(expr, msg) \ 30 | (void)0 31 | #define TRESPASS() (void)0 32 | #define DEBUG_ONLY(x) 33 | 34 | 35 | #if !__MWERKS__ 36 | // STATIC_ASSERT is a compile-time check that can be used to 37 | // verify static expressions such as: STATIC_ASSERT(sizeof(int64) == 8); 38 | #define STATIC_ASSERT(x) \ 39 | do { \ 40 | struct __staticAssertStruct__ { \ 41 | char __static_assert_failed__[2*(x) - 1]; \ 42 | }; \ 43 | } while (false) 44 | #else 45 | #define STATIC_ASSERT(x) 46 | // the STATIC_ASSERT above doesn't work too well with mwcc because 47 | // of scoping bugs; for now make it do nothing 48 | #endif 49 | 50 | /*-------------------------------------------------------------*/ 51 | /*-------------------------------------------------------------*/ 52 | 53 | #endif /* _DEBUG_H */ 54 | -------------------------------------------------------------------------------- /headers/os/support/Flattenable.h: -------------------------------------------------------------------------------- 1 | // Modified BeOS header. Just here to be able to compile and test BPath. 2 | // To be replaced by the OpenBeOS version to be provided by the IK Team. 3 | 4 | #ifndef __sk_flattenable_h__ 5 | #define __sk_flattenable_h__ 6 | 7 | #include 8 | 9 | /*-------------------------------------------------------------*/ 10 | /*----- BFlattenable class ------------------------------------*/ 11 | 12 | class BFlattenable { 13 | public: 14 | 15 | virtual bool IsFixedSize() const = 0; 16 | virtual type_code TypeCode() const = 0; 17 | virtual ssize_t FlattenedSize() const = 0; 18 | virtual status_t Flatten(void *buffer, ssize_t size) const = 0; 19 | virtual bool AllowsTypeCode(type_code code) const; 20 | virtual status_t Unflatten(type_code c, const void *buf, ssize_t size) = 0; 21 | 22 | virtual ~BFlattenable(); // was a reserved virtual in R4.0 23 | 24 | /*----- Private or reserved ---------------*/ 25 | 26 | private: 27 | void _ReservedFlattenable1(); 28 | virtual void _ReservedFlattenable2(); 29 | virtual void _ReservedFlattenable3(); 30 | }; 31 | 32 | /*-------------------------------------------------------------*/ 33 | /*-------------------------------------------------------------*/ 34 | 35 | #endif // __sk_flattenable_h__ 36 | 37 | -------------------------------------------------------------------------------- /headers/os/support/Locker.h: -------------------------------------------------------------------------------- 1 | // 2 | // $Id: Locker.h,v 1.1 2002/07/09 12:24:33 ejakowatz Exp $ 3 | // 4 | // This is the BLocker interface for OpenBeOS. It has been created to 5 | // be source and binary compatible with the BeOS version of BLocker. 6 | // 7 | 8 | 9 | #ifndef _OPENBEOS_LOCKER_H 10 | #define _OPENBEOS_LOCKER_H 11 | 12 | 13 | #include 14 | #include 15 | 16 | 17 | #ifdef USE_OPENBEOS_NAMESPACE 18 | namespace OpenBeOS { 19 | #endif 20 | 21 | class BLocker { 22 | public: 23 | BLocker(); 24 | BLocker(const char *name); 25 | BLocker(bool benaphore_style); 26 | BLocker(const char *name, bool benaphore_style); 27 | 28 | // The following constructor is not documented in the BeBook 29 | // and is only listed here to ensure binary compatibility. 30 | // DO NOT USE THIS CONSTRUCTOR! 31 | BLocker(const char *name, bool benaphore_style, bool); 32 | 33 | virtual ~BLocker(); 34 | 35 | bool Lock(void); 36 | status_t LockWithTimeout(bigtime_t timeout); 37 | void Unlock(void); 38 | 39 | thread_id LockingThread(void) const; 40 | bool IsLocked(void) const; 41 | int32 CountLocks(void) const; 42 | int32 CountLockRequests(void) const; 43 | sem_id Sem(void) const; 44 | 45 | private: 46 | void InitLocker(const char *name, bool benaphore_style); 47 | bool AcquireLock(bigtime_t timeout, status_t *error); 48 | 49 | int32 fBenaphoreCount; 50 | sem_id fSemaphoreID; 51 | thread_id fLockOwner; 52 | int32 fRecursiveCount; 53 | 54 | // Reserved space for future changes to BLocker 55 | int32 fReservedSpace[4]; 56 | }; 57 | 58 | #ifdef USE_OPENBEOS_NAMESPACE 59 | } 60 | #endif 61 | 62 | #endif // _OPENBEOS_LOCKER_H 63 | -------------------------------------------------------------------------------- /headers/os/support/StopWatch.h: -------------------------------------------------------------------------------- 1 | #ifndef _BLUE_STOP_WATCH_H 2 | #define _BLUE_STOP_WATCH_H 3 | 4 | #include 5 | #include 6 | 7 | #ifdef USE_OPENBEOS_NAMESPACE 8 | namespace OpenBeOS { 9 | #endif 10 | 11 | class BStopWatch { 12 | public: 13 | BStopWatch(const char *name, bool silent = false); 14 | virtual ~BStopWatch(); 15 | 16 | void Suspend(); 17 | void Resume(); 18 | bigtime_t Lap(); 19 | bigtime_t ElapsedTime() const; 20 | void Reset(); 21 | const char *Name() const; 22 | 23 | private: 24 | virtual void _ReservedStopWatch1(); 25 | virtual void _ReservedStopWatch2(); 26 | 27 | bigtime_t fStart; 28 | bigtime_t fSuspendTime; 29 | bigtime_t fLaps[10]; 30 | int32 fLap; 31 | const char *fName; 32 | uint32 _reserved[2]; // these are for fName to be initiased 33 | bool fSilent; 34 | }; 35 | 36 | #ifdef USE_OPENBEOS_NAMESPACE 37 | } // namespace OpenBeOS 38 | using namespace OpenBeOS; 39 | #endif 40 | 41 | #endif /* _STOP_WATCH_H */ 42 | -------------------------------------------------------------------------------- /headers/os/support/parsedate.h: -------------------------------------------------------------------------------- 1 | #ifndef _PARSEDATE_H 2 | #define _PARSEDATE_H 3 | /* 4 | ** Distributed under the terms of the OpenBeOS License. 5 | */ 6 | 7 | 8 | #include 9 | 10 | 11 | /* flags that will be set in the flags field by parsedate_etc() */ 12 | #define PARSEDATE_RELATIVE_TIME 0x0001 13 | // ToDo: the following flags are not part of the R5 implementation and preliminary only 14 | #define PARSEDATE_DAY_RELATIVE_TIME PARSEDATE_RELATIVE_TIME 15 | #define PARSEDATE_MINUTE_RELATIVE_TIME 0x0002 16 | #define PARSEDATE_INVALID_DATE 0x0100 17 | 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | extern time_t parsedate(const char *dateString, time_t now); 24 | extern time_t parsedate_etc(const char *dateString, time_t now, int *_storedFlags); 25 | 26 | extern void set_dateformats(const char *table[]); 27 | extern const char **get_dateformats(void); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif 32 | 33 | #endif /* _PARSEDATE_H */ 34 | -------------------------------------------------------------------------------- /headers/os/translation/TranslationErrors.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************** 2 | / 3 | / File: TranslationErrors.h 4 | / 5 | / Description: Error codes for the Translation Kit 6 | / 7 | / Copyright 1998, Be Incorporated, All Rights Reserved. 8 | / Copyright 1995-1997, Jon Watte 9 | / 10 | ********************************************************************************/ 11 | 12 | #if !defined(_TRANSLATION_ERRORS_H) 13 | #define _TRANSLATION_ERRORS_H 14 | 15 | #include 16 | 17 | 18 | enum B_TRANSLATION_ERROR { 19 | B_TRANSLATION_BASE_ERROR = B_TRANSLATION_ERROR_BASE, 20 | B_NO_TRANSLATOR = B_TRANSLATION_BASE_ERROR, /* no translator exists for data */ 21 | B_ILLEGAL_DATA, /* data is not what it said it was */ 22 | /* aliases */ 23 | B_NOT_INITIALIZED = B_NO_INIT 24 | }; 25 | 26 | 27 | #endif /* _TRANSLATION_ERRORS_H */ 28 | -------------------------------------------------------------------------------- /headers/os/translation/TranslationKit.h: -------------------------------------------------------------------------------- 1 | /*************************************************************** 2 | / 3 | / File: TranslationKit.h 4 | / 5 | / Copyright 1998, Be Incorporated. 6 | / 7 | ***************************************************************/ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | /* we do not include TranslatorAddOn.h because it's only used when building an add-on */ 18 | 19 | -------------------------------------------------------------------------------- /headers/private/app/MessagePrivate.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // MessagePrivate.h 3 | // 4 | //------------------------------------------------------------------------------ 5 | 6 | #ifndef MESSAGEPRIVATE_H 7 | #define MESSAGEPRIVATE_H 8 | 9 | // Standard Includes ----------------------------------------------------------- 10 | 11 | // System Includes ------------------------------------------------------------- 12 | #include 13 | #include 14 | #include 15 | 16 | // Project Includes ------------------------------------------------------------ 17 | 18 | // Local Includes -------------------------------------------------------------- 19 | 20 | // Local Defines --------------------------------------------------------------- 21 | 22 | // Globals --------------------------------------------------------------------- 23 | 24 | extern "C" void _msg_cache_cleanup_(); 25 | extern "C" int _init_message_(); 26 | extern "C" int _delete_message_(); 27 | 28 | class BMessage::Private 29 | { 30 | public: 31 | Private(BMessage* msg) : fMessage(msg) {;} 32 | Private(BMessage& msg) : fMessage(&msg) {;} 33 | 34 | inline void SetTarget(int32 token, bool preferred) 35 | { 36 | fMessage->fTarget = token; 37 | fMessage->fPreferred = preferred; 38 | } 39 | inline void SetReply(BMessenger messenger) 40 | { 41 | BMessenger::Private mp(messenger); 42 | fMessage->fReplyTo.port = mp.Port(); 43 | fMessage->fReplyTo.target = mp.Token(); 44 | fMessage->fReplyTo.team = mp.Team(); 45 | fMessage->fReplyTo.preferred = mp.IsPreferredTarget(); 46 | } 47 | inline int32 GetTarget() 48 | { 49 | return fMessage->fTarget; 50 | } 51 | inline bool UsePreferredTarget() 52 | { 53 | return fMessage->fPreferred; 54 | } 55 | 56 | private: 57 | BMessage* fMessage; 58 | }; 59 | 60 | #endif // MESSAGEPRIVATE_H 61 | 62 | /* 63 | * $Log $ 64 | * 65 | * $Id $ 66 | * 67 | */ 68 | 69 | -------------------------------------------------------------------------------- /headers/private/app/MessengerPrivate.h: -------------------------------------------------------------------------------- 1 | #ifndef MESSENGERPRIVAGE_H 2 | #define MESSENGERPRIVATE_H 3 | 4 | #include 5 | 6 | class BMessenger::Private 7 | { 8 | public: 9 | Private(BMessenger* msnger) : fMessenger(msnger) {;} 10 | Private(BMessenger& msnger) : fMessenger(&msnger) {;} 11 | 12 | port_id Port() 13 | { return fMessenger->fPort; } 14 | int32 Token() 15 | { return fMessenger->fHandlerToken; } 16 | team_id Team() 17 | { return fMessenger->fTeam; } 18 | bool IsPreferredTarget() 19 | { return fMessenger->fPreferredTarget; } 20 | 21 | private: 22 | BMessenger* fMessenger; 23 | }; 24 | 25 | #endif // MESSENGERPRIVATE_H 26 | -------------------------------------------------------------------------------- /headers/private/app/RegistrarThread.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file RegistrarThread.h 7 | RegistrarThread interface declaration 8 | */ 9 | 10 | #ifndef REGISTRAR_THREAD_H 11 | #define REGISTRAR_THREAD_H 12 | 13 | #include 14 | #include 15 | 16 | class RegistrarThread { 17 | public: 18 | RegistrarThread(const char *name, int32 priority, BMessenger managerMessenger); 19 | virtual ~RegistrarThread(); 20 | 21 | virtual status_t InitCheck(); 22 | status_t Run(); 23 | 24 | thread_id Id() const; 25 | const char* Name() const; 26 | 27 | void AskToExit(); 28 | bool IsFinished() const; 29 | 30 | protected: 31 | //! The function executed in the object's thread when Run() is called 32 | virtual status_t ThreadFunction() = 0; 33 | 34 | BMessenger fManagerMessenger; 35 | bool fShouldExit; // Initially false, may be set to true by AskToExit() 36 | bool fIsFinished; // Initially false, set to true by the thread itself upon completion 37 | private: 38 | static int32 EntryFunction(void *data); 39 | 40 | status_t fStatus; 41 | thread_id fId; 42 | char fName[B_OS_NAME_LENGTH]; 43 | }; 44 | 45 | #endif // REGISTRAR_THREAD_H 46 | -------------------------------------------------------------------------------- /headers/private/app/RegistrarThreadManager.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file RegistrarThreadManager.h 7 | RegistrarThreadManager interface declaration 8 | */ 9 | 10 | #ifndef REGISTRAR_THREAD_MANAGER_H 11 | #define REGISTRAR_THREAD_MANAGER_H 12 | 13 | #include 14 | #include 15 | 16 | #include 17 | 18 | class RegistrarThread; 19 | 20 | class RegistrarThreadManager : public BHandler { 21 | public: 22 | RegistrarThreadManager(); 23 | ~RegistrarThreadManager(); 24 | 25 | // BHandler virtuals 26 | virtual void MessageReceived(BMessage* message); 27 | 28 | // Thread management functions 29 | status_t LaunchThread(RegistrarThread *thread); 30 | status_t CleanupThreads(); 31 | status_t ShutdownThreads(); 32 | status_t KillThreads(); 33 | 34 | uint ThreadCount() const; 35 | 36 | static const uint kThreadLimit = 12; 37 | private: 38 | 39 | std::list::iterator& RemoveThread(std::list::iterator &i); 40 | 41 | std::list fThreads; 42 | uint fThreadCount; 43 | }; 44 | 45 | #endif // THREAD_MANAGER_H 46 | -------------------------------------------------------------------------------- /headers/private/interface/ClientFontList.h: -------------------------------------------------------------------------------- 1 | #ifndef CLIENT_FONT_LIST_H 2 | #define CLIENT_FONT_LIST_H 3 | 4 | #include // for BFont-related definitions 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | class ClientFontList 11 | { 12 | public: 13 | ClientFontList(void); 14 | ~ClientFontList(void); 15 | bool Update(bool check_only); 16 | int32 CountFamilies(void); 17 | status_t GetFamily(int32 index, font_family *name, uint32 *flags=NULL); 18 | int32 CountStyles(font_family f); 19 | status_t GetStyle(font_family family, int32 index, font_style *name,uint32 *flags=NULL, uint16 *face=NULL); 20 | private: 21 | BList *familylist; 22 | sem_id fontlock; 23 | }; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /headers/private/interface/RegionSupport.h: -------------------------------------------------------------------------------- 1 | // This file is distributed under the OpenBeOS license 2 | 3 | #ifndef __REGION_SUPPORT_H 4 | #define __REGION_SUPPORT_H 5 | 6 | #include 7 | 8 | class BRegion::Support 9 | { 10 | public: 11 | static void ZeroRegion(BRegion *a_region); 12 | static void ClearRegion(BRegion *a_region); 13 | static void CopyRegion(BRegion *src_region, BRegion *dst_region); 14 | static void AndRegion(BRegion *first, BRegion *second, BRegion *dest); 15 | static void OrRegion(BRegion *first, BRegion *second, BRegion *dest); 16 | static void SubRegion(BRegion *first, BRegion *second, BRegion *dest); 17 | 18 | private: 19 | static void CleanupRegion(BRegion *region_in); 20 | static void CleanupRegionVertical(BRegion *region_in); 21 | static void CleanupRegionHorizontal(BRegion *region_in); 22 | 23 | static void SortRects(clipping_rect *rects, long count); 24 | static void SortTrans(long *lptr1, long *lptr2, long count); 25 | 26 | static void CopyRegionMore(BRegion*, BRegion*, long); 27 | 28 | static void AndRegionComplex(BRegion*, BRegion*, BRegion*); 29 | static void AndRegion1ToN(BRegion*, BRegion*, BRegion*); 30 | 31 | static void AppendRegion(BRegion*, BRegion*, BRegion*); 32 | 33 | static void OrRegionComplex(BRegion*, BRegion*, BRegion*); 34 | static void OrRegion1ToN(BRegion*, BRegion*, BRegion*); 35 | static void OrRegionNoX(BRegion*, BRegion*, BRegion*); 36 | static void ROr(long, long, BRegion*, BRegion*, BRegion*, long*, long *); 37 | 38 | static void SubRegionComplex(BRegion*, BRegion*, BRegion*); 39 | static void RSub(long , long, BRegion*, BRegion*, BRegion*, long*, long*); 40 | }; 41 | 42 | #endif // __REGION_SUPPORT_H 43 | -------------------------------------------------------------------------------- /headers/private/interface/input_globals.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // Copyright (c) 2004, Haiku 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a 5 | // copy of this software and associated documentation files (the "Software"), 6 | // to deal in the Software without restriction, including without limitation 7 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | // and/or sell copies of the Software, and to permit persons to whom the 9 | // Software is furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | // DEALINGS IN THE SOFTWARE. 21 | // 22 | // File Name: input_globals.h 23 | // Author: 24 | // Description: 25 | //------------------------------------------------------------------------------ 26 | 27 | #ifndef __INPUT_GLOBALS_H 28 | #define __INPUT_GLOBALS_H 29 | 30 | #include 31 | 32 | status_t _control_input_server_(BMessage *command, BMessage *reply); 33 | status_t _restore_key_map_(); 34 | 35 | #endif // __INPUT_GLOBALS_H 36 | 37 | -------------------------------------------------------------------------------- /headers/private/interface/moreUTF8.h: -------------------------------------------------------------------------------- 1 | #ifndef __MOREUTF8 2 | #define __MOREUTF8 3 | 4 | 5 | static inline bool 6 | IsInsideGlyph(uchar ch) 7 | { 8 | return (ch & 0xC0) == 0x80; 9 | } 10 | 11 | 12 | static inline uint32 13 | UTF8NextCharLen(const char *text) 14 | { 15 | const char *ptr = text; 16 | 17 | if (ptr == NULL || *ptr == 0) 18 | return 0; 19 | 20 | do { 21 | ptr++; 22 | } while (IsInsideGlyph(*ptr)); 23 | 24 | return ptr - text; 25 | } 26 | 27 | 28 | static inline uint32 29 | UTF8PreviousCharLen(const char *text, const char *limit) 30 | { 31 | const char *ptr = text; 32 | 33 | if (ptr == NULL || limit == NULL) 34 | return 0; 35 | 36 | do { 37 | if (ptr == limit) 38 | break; 39 | ptr--; 40 | } while (IsInsideGlyph(*ptr)); 41 | 42 | return text - ptr; 43 | } 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /headers/private/servers/app/RectUtils.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // Copyright (c) 2001-2002, Haiku, Inc. 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a 5 | // copy of this software and associated documentation files (the "Software"), 6 | // to deal in the Software without restriction, including without limitation 7 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | // and/or sell copies of the Software, and to permit persons to whom the 9 | // Software is furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | // DEALINGS IN THE SOFTWARE. 21 | // 22 | // File Name: RectUtils.h 23 | // Author: DarkWyrm 24 | // Description: Utilities for work around R5 Interface Kit bugs 25 | // 26 | //------------------------------------------------------------------------------ 27 | #ifndef RECTUTILS_H_ 28 | #define RECTUTILS_H_ 29 | 30 | #include 31 | #include 32 | 33 | bool TestLineIntersection(const BRect&r, float x1, float y1, float x2, float y2,bool vertical=true); 34 | bool TestRectIntersection(const BRect &r,const BRect &r2); 35 | bool TestRegionIntersection(BRegion *r,const BRect &r2); 36 | void IntersectRegionWith(BRegion *r,const BRect &r2); 37 | void ValidateRect(BRect *r); 38 | #endif 39 | -------------------------------------------------------------------------------- /headers/private/servers/app/SystemPalette.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // Copyright (c) 2001-2002, Haiku, Inc. 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a 5 | // copy of this software and associated documentation files (the "Software"), 6 | // to deal in the Software without restriction, including without limitation 7 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | // and/or sell copies of the Software, and to permit persons to whom the 9 | // Software is furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | // DEALINGS IN THE SOFTWARE. 21 | // 22 | // File Name: SystemPalette.h 23 | // Author: DarkWyrm 24 | // Description: One global function to generate the palette which is 25 | // the default BeOS System palette and the variable to go with it 26 | // 27 | //------------------------------------------------------------------------------ 28 | #ifndef _SYSTEM_PALETTE_H_ 29 | #define _SYSTEM_PALETTE_H_ 30 | 31 | #include 32 | 33 | void GenerateSystemPalette(rgb_color *palette); 34 | extern const rgb_color system_palette[]; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /headers/private/storage/MimeTypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 | ** Distributed under the terms of the OpenBeOS License. 4 | */ 5 | #ifndef _MIME_TYPES_H 6 | #define _MIME_TYPES_H 7 | 8 | 9 | #include 10 | 11 | 12 | // Additional MIME types that are not defined in Mime.h but are 13 | // standard values. We should move them into a public space some 14 | // day. 15 | 16 | #define B_DIRECTORY_MIME_TYPE "application/x-vnd.Be-directory" 17 | #define B_VOLUME_MIME_TYPE "application/x-vnd.Be-volume" 18 | #define B_SYMLINK_MIME_TYPE "application/x-vnd.Be-symlink" 19 | #define B_ROOT_MIME_TYPE "application/x-vnd.Be-root" 20 | 21 | #endif /* _MIME_TYPES_H */ 22 | -------------------------------------------------------------------------------- /headers/private/storage/OffsetFile.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file OffsetFile.h 7 | OffsetFile interface declaration. 8 | */ 9 | 10 | #ifndef _OFFSET_FILE_H 11 | #define _OFFSET_FILE_H 12 | 13 | #include 14 | #include 15 | 16 | namespace BPrivate { 17 | namespace Storage { 18 | 19 | /*! 20 | \class OffsetFile 21 | \brief Provides access to a file skipping a certain amount of bytes at 22 | the beginning. 23 | 24 | This class implements the BPositionIO interface to provide access to the 25 | data of a file past a certain offset. This is very handy e.g. for dealing 26 | with resources, as they always reside at the end of a file, but may start 27 | at arbitrary offsets. 28 | 29 | \author Ingo Weinhold 30 | 31 | \version 0.0.0 32 | */ 33 | class OffsetFile : public BPositionIO { 34 | public: 35 | OffsetFile(); 36 | OffsetFile(BFile *file, off_t offset); 37 | virtual ~OffsetFile(); 38 | 39 | status_t SetTo(BFile *file, off_t offset); 40 | void Unset(); 41 | status_t InitCheck() const; 42 | 43 | BFile *File() const; 44 | 45 | ssize_t ReadAt(off_t pos, void *buffer, size_t size); 46 | ssize_t WriteAt(off_t pos, const void *buffer, 47 | size_t size); 48 | off_t Seek(off_t position, uint32 seekMode); 49 | off_t Position() const; 50 | 51 | status_t SetSize(off_t size); 52 | status_t GetSize(off_t *size); 53 | 54 | off_t Offset() const; 55 | 56 | private: 57 | BFile* fFile; 58 | off_t fOffset; 59 | off_t fCurrentPosition; 60 | }; 61 | 62 | }; // namespace Storage 63 | }; // namespace BPrivate 64 | 65 | #endif // _OFFSET_FILE_H 66 | 67 | 68 | -------------------------------------------------------------------------------- /headers/private/storage/Pef.h: -------------------------------------------------------------------------------- 1 | // Pef.h 2 | 3 | #ifndef _PEF_H 4 | #define _PEF_H 5 | 6 | #include 7 | 8 | typedef char PefOSType[4]; 9 | 10 | // container header 11 | struct PEFContainerHeader { 12 | PefOSType tag1; 13 | PefOSType tag2; 14 | PefOSType architecture; 15 | uint32 formatVersion; 16 | uint32 dateTimeStamp; 17 | uint32 oldDefVersion; 18 | uint32 oldImpVersion; 19 | uint32 currentVersion; 20 | uint16 sectionCount; 21 | uint16 instSectionCount; 22 | uint32 reservedA; 23 | }; 24 | 25 | const char kPEFFileMagic1[4] = { 'J', 'o', 'y', '!' }; 26 | const char kPEFFileMagic2[4] = { 'p', 'e', 'f', 'f' }; 27 | const char kPEFArchitecturePPC[4] = { 'p', 'w', 'p', 'c' }; 28 | const char kPEFContainerHeaderSize = 40; 29 | 30 | // section header 31 | struct PEFSectionHeader { 32 | int32 nameOffset; 33 | uint32 defaultAddress; 34 | uint32 totalSize; 35 | uint32 unpackedSize; 36 | uint32 packedSize; 37 | uint32 containerOffset; 38 | uint8 sectionKind; 39 | uint8 shareKind; 40 | uint8 alignment; 41 | uint8 reservedA; 42 | }; 43 | 44 | const uint32 kPEFSectionHeaderSize = 28; 45 | 46 | #endif // _PEF_H 47 | 48 | 49 | -------------------------------------------------------------------------------- /headers/private/storage/mime/AssociatedTypes.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file AssociatedTypes.h 7 | AssociatedTypes class declarations 8 | */ 9 | 10 | #ifndef _MIME_ASSOCIATED_TYPES_H 11 | #define _MIME_ASSOCIATED_TYPES_H 12 | 13 | #include 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | class BMessage; 20 | class BString; 21 | 22 | namespace BPrivate { 23 | namespace Storage { 24 | namespace Mime { 25 | 26 | class AssociatedTypes { 27 | public: 28 | AssociatedTypes(); 29 | ~AssociatedTypes(); 30 | 31 | status_t GetAssociatedTypes(const char *extension, BMessage *types); 32 | status_t GuessMimeType(const char *filename, BString *result); 33 | status_t GuessMimeType(const entry_ref *ref, BString *result); 34 | 35 | status_t SetFileExtensions(const char *type, const BMessage *extensions); 36 | status_t DeleteFileExtensions(const char *type); 37 | 38 | void PrintToStream() const; 39 | private: 40 | status_t AddAssociatedType(const char *extension, const char *type); 41 | status_t RemoveAssociatedType(const char *extension, const char *type); 42 | 43 | status_t BuildAssociatedTypesTable(); 44 | 45 | status_t ProcessType(const char *type); 46 | std::string PrepExtension(const char *extension) const; 47 | 48 | std::map > fFileExtensions; // mime type => set of associated file extensions 49 | std::map > fAssociatedTypes; // file extension => set of associated mime types 50 | 51 | bool fHaveDoneFullBuild; 52 | }; 53 | 54 | } // namespace Mime 55 | } // namespace Storage 56 | } // namespace BPrivate 57 | 58 | #endif // _MIME_ASSOCIATED_TYPES_H 59 | -------------------------------------------------------------------------------- /headers/private/storage/mime/CVS/Entries: -------------------------------------------------------------------------------- 1 | /AssociatedTypes.h/1.1/Tue Sep 24 05:20:30 2002// 2 | /CreateAppMetaMimeThread.h/1.1/Sun Sep 29 07:08:21 2002// 3 | /Database.h/1.6/Sun Sep 29 07:12:42 2002// 4 | /InstalledTypes.h/1.2/Tue Aug 27 08:26:11 2002// 5 | /MimeUpdateThread.h/1.4/Mon Aug 4 00:40:29 2003// 6 | /SnifferRules.h/1.2/Mon Aug 4 00:40:29 2003// 7 | /Supertype.h/1.2/Tue Aug 27 08:26:11 2002// 8 | /SupportingApps.h/1.2/Mon Sep 9 08:12:02 2002// 9 | /UpdateMimeInfoThread.h/1.1/Sun Sep 29 07:09:50 2002// 10 | /database_access.h/1.5/Sun Sep 29 07:12:42 2002// 11 | /database_support.h/1.5/Tue Oct 1 07:29:32 2002// 12 | D 13 | -------------------------------------------------------------------------------- /headers/private/storage/mime/CVS/Repository: -------------------------------------------------------------------------------- 1 | current/headers/private/storage/mime 2 | -------------------------------------------------------------------------------- /headers/private/storage/mime/CVS/Root: -------------------------------------------------------------------------------- 1 | :ext:haydentech@cvs.sourceforge.net:/cvsroot/open-beos 2 | -------------------------------------------------------------------------------- /headers/private/storage/mime/CreateAppMetaMimeThread.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file CreateAppMetaMimeThread.h 7 | CreateAppMetaMimeThread interface declaration 8 | */ 9 | 10 | #ifndef _CREATE_APP_META_MIME_THREAD_H 11 | #define _CREATE_APP_META_MIME_THREAD_H 12 | 13 | #include 14 | 15 | namespace BPrivate { 16 | namespace Storage { 17 | namespace Mime { 18 | 19 | class CreateAppMetaMimeThread : public MimeUpdateThread { 20 | public: 21 | CreateAppMetaMimeThread(const char *name, int32 priority, BMessenger managerMessenger, 22 | const entry_ref *root, bool recursive, bool force, BMessage *replyee); 23 | status_t DoMimeUpdate(const entry_ref *entry, bool *entryIsDir); 24 | }; 25 | 26 | } // namespace Mime 27 | } // namespace Storage 28 | } // namespace BPrivate 29 | 30 | #endif // _CREATE_APP_META_MIME_THREAD_H 31 | -------------------------------------------------------------------------------- /headers/private/storage/mime/InstalledTypes.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file InstalledTypes.h 7 | InstalledTypes class declarations 8 | */ 9 | 10 | #ifndef _MIME_INSTALLED_TYPES_H 11 | #define _MIME_INSTALLED_TYPES_H 12 | 13 | #include 14 | #include 15 | 16 | #include 17 | #include 18 | 19 | class BMessage; 20 | 21 | namespace BPrivate { 22 | namespace Storage { 23 | namespace Mime { 24 | 25 | class InstalledTypes { 26 | public: 27 | InstalledTypes(); 28 | ~InstalledTypes(); 29 | 30 | status_t GetInstalledTypes(BMessage *types); 31 | status_t GetInstalledTypes(const char *supertype, BMessage *types); 32 | status_t GetInstalledSupertypes(BMessage *types); 33 | 34 | status_t AddType(const char *type); 35 | status_t RemoveType(const char *type); 36 | private: 37 | status_t AddSupertype(const char *super, std::map::iterator &i); 38 | status_t AddSubtype(const char *super, const char *sub); 39 | status_t AddSubtype(Supertype &super, const char *sub); 40 | 41 | status_t RemoveSupertype(const char *super); 42 | status_t RemoveSubtype(const char *super, const char *sub); 43 | 44 | void Unset(); 45 | void ClearCachedMessages(); 46 | 47 | status_t CreateMessageWithTypes(BMessage **result) const; 48 | status_t CreateMessageWithSupertypes(BMessage **result) const; 49 | void FillMessageWithSupertypes(BMessage *msg); 50 | 51 | status_t BuildInstalledTypesList(); 52 | 53 | std::map fSupertypes; 54 | BMessage *fCachedMessage; 55 | BMessage *fCachedSupertypesMessage; 56 | bool fHaveDoneFullBuild; 57 | }; 58 | 59 | } // namespace Mime 60 | } // namespace Storage 61 | } // namespace BPrivate 62 | 63 | #endif // _MIME_INSTALLED_TYPES_H 64 | -------------------------------------------------------------------------------- /headers/private/storage/mime/MimeUpdateThread.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file MimeUpdateThread.h 7 | MimeUpdateThread interface declaration 8 | */ 9 | 10 | #ifndef _MIME_UPDATE_THREAD_H 11 | #define _MIME_UPDATE_THREAD_H 12 | 13 | #include 14 | #include 15 | #include 16 | 17 | #include 18 | #include 19 | 20 | struct entry_ref; 21 | class BMessage; 22 | 23 | namespace BPrivate { 24 | namespace Storage { 25 | namespace Mime { 26 | 27 | class MimeUpdateThread : public RegistrarThread { 28 | public: 29 | MimeUpdateThread(const char *name, int32 priority, BMessenger managerMessenger, 30 | const entry_ref *root, bool recursive, bool force, BMessage *replyee); 31 | virtual ~MimeUpdateThread(); 32 | 33 | virtual status_t InitCheck(); 34 | 35 | protected: 36 | virtual status_t ThreadFunction(); 37 | virtual status_t DoMimeUpdate(const entry_ref *entry, bool *entryIsDir) = 0; 38 | 39 | const entry_ref fRoot; 40 | const bool fRecursive; 41 | const bool fForce; 42 | BMessage *fReplyee; 43 | 44 | bool DeviceSupportsAttributes(dev_t device); 45 | 46 | private: 47 | std::list< std::pair > fAttributeSupportList; 48 | 49 | status_t UpdateEntry(const entry_ref *ref); 50 | 51 | status_t fStatus; 52 | }; 53 | 54 | } // namespace Mime 55 | } // namespace Storage 56 | } // namespace BPrivate 57 | 58 | #endif // _MIME_UPDATE_THREAD_H 59 | -------------------------------------------------------------------------------- /headers/private/storage/mime/SnifferRules.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file SnifferRules.h 7 | SnifferRules class declarations 8 | */ 9 | 10 | #ifndef _MIME_SNIFFER_RULES_H 11 | #define _MIME_SNIFFER_RULES_H 12 | 13 | #include 14 | 15 | #include 16 | #include 17 | 18 | struct entry_ref; 19 | class BString; 20 | 21 | namespace BPrivate { 22 | namespace Storage { 23 | 24 | namespace Sniffer { 25 | class Rule; 26 | } 27 | 28 | namespace Mime { 29 | 30 | class SnifferRules { 31 | public: 32 | SnifferRules(); 33 | ~SnifferRules(); 34 | 35 | status_t GuessMimeType(const entry_ref *ref, BString *type); 36 | status_t GuessMimeType(const void *buffer, int32 length, BString *type); 37 | 38 | status_t SetSnifferRule(const char *type, const char *rule); 39 | status_t DeleteSnifferRule(const char *type); 40 | 41 | void PrintToStream() const; 42 | 43 | struct sniffer_rule { 44 | std::string type; // The mime type that own the rule 45 | std::string rule_string; // The unparsed string version of the rule 46 | BPrivate::Storage::Sniffer::Rule *rule; // The parsed rule 47 | 48 | sniffer_rule(BPrivate::Storage::Sniffer::Rule *rule = NULL); 49 | ~sniffer_rule(); 50 | }; 51 | private: 52 | status_t BuildRuleList(); 53 | status_t GuessMimeType(BPositionIO *data, BString *type); 54 | ssize_t MaxBytesNeeded(); 55 | status_t ProcessType(const char *type, ssize_t *bytesNeeded); 56 | 57 | std::list fRuleList; 58 | ssize_t fMaxBytesNeeded; 59 | bool fHaveDoneFullBuild; 60 | }; 61 | 62 | } // namespace Mime 63 | } // namespace Storage 64 | } // namespace BPrivate 65 | 66 | #endif // _MIME_SNIFFER_H 67 | -------------------------------------------------------------------------------- /headers/private/storage/mime/Supertype.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file Supertype.h 7 | Supertype class declarations 8 | */ 9 | 10 | #ifndef _MIME_SUPERTYPE_H 11 | #define _MIME_SUPERTYPE_H 12 | 13 | #include 14 | 15 | #include 16 | #include 17 | 18 | class BMessage; 19 | 20 | namespace BPrivate { 21 | namespace Storage { 22 | namespace Mime { 23 | 24 | class Supertype { 25 | public: 26 | Supertype(const char *super = NULL); 27 | ~Supertype(); 28 | 29 | status_t GetInstalledSubtypes(BMessage *types); 30 | 31 | status_t AddSubtype(const char *sub); 32 | status_t RemoveSubtype(const char *sub); 33 | 34 | void SetName(const char *super); 35 | const char* GetName(); 36 | 37 | status_t FillMessageWithTypes(BMessage &msg) const; 38 | private: 39 | status_t CreateMessageWithTypes(BMessage **result) const; 40 | 41 | std::set fSubtypes; 42 | BMessage *fCachedMessage; 43 | std::string fName; 44 | }; 45 | 46 | } // namespace Mime 47 | } // namespace Storage 48 | } // namespace BPrivate 49 | 50 | #endif // _MIME_SUPERTYPE_H 51 | -------------------------------------------------------------------------------- /headers/private/storage/mime/SupportingApps.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file SupportingApps.h 7 | SupportingApps class declarations 8 | */ 9 | 10 | #ifndef _MIME_SUPPORTING_APPS_H 11 | #define _MIME_SUPPORTING_APPS_H 12 | 13 | #include 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | class BMessage; 20 | 21 | namespace BPrivate { 22 | namespace Storage { 23 | namespace Mime { 24 | 25 | class SupportingApps { 26 | public: 27 | SupportingApps(); 28 | ~SupportingApps(); 29 | 30 | status_t GetSupportingApps(const char *type, BMessage *apps); 31 | 32 | status_t SetSupportedTypes(const char *app, const BMessage *types, bool fullSync); 33 | status_t DeleteSupportedTypes(const char *app, bool fullSync); 34 | private: 35 | status_t AddSupportingApp(const char *type, const char *app); 36 | status_t RemoveSupportingApp(const char *type, const char *app); 37 | 38 | status_t BuildSupportingAppsTable(); 39 | 40 | std::map > fSupportedTypes; // app sig => set of supported types 41 | std::map > fSupportingApps; // mime type => set of supporting apps 42 | std::map > fStrandedTypes; // app sig => set of no longer supported types for whom the 43 | // given app is still listed as a supporting app 44 | bool fHaveDoneFullBuild; 45 | }; 46 | 47 | } // namespace Mime 48 | } // namespace Storage 49 | } // namespace BPrivate 50 | 51 | #endif // _MIME_SUPPORTING_APPS_H 52 | -------------------------------------------------------------------------------- /headers/private/storage/mime/UpdateMimeInfoThread.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file UpdateMimeInfoThread.h 7 | UpdateMimeInfoThread interface declaration 8 | */ 9 | 10 | #ifndef _MIME_UPDATE_MIME_INFO_THREAD_H 11 | #define _MIME_UPDATE_MIME_INFO_THREAD_H 12 | 13 | #include 14 | 15 | namespace BPrivate { 16 | namespace Storage { 17 | namespace Mime { 18 | 19 | class UpdateMimeInfoThread : public MimeUpdateThread { 20 | public: 21 | UpdateMimeInfoThread(const char *name, int32 priority, BMessenger managerMessenger, 22 | const entry_ref *root, bool recursive, bool force, BMessage *replyee); 23 | status_t DoMimeUpdate(const entry_ref *entry, bool *entryIsDir); 24 | }; 25 | 26 | } // namespace Mime 27 | } // namespace Storage 28 | } // namespace BPrivate 29 | 30 | #endif // _MIME_UPDATE_MIME_INFO_THREAD_H 31 | -------------------------------------------------------------------------------- /headers/private/storage/mime/database_access.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file database_access.h 7 | Mime database atomic read functions and miscellany declarations 8 | */ 9 | 10 | #ifndef _MIME_DATABASE_ACCESS_H 11 | #define _MIME_DATABASE_ACCESS_H 12 | 13 | #include 14 | 15 | class BNode; 16 | class BBitmap; 17 | class BMessage; 18 | 19 | namespace BPrivate { 20 | namespace Storage { 21 | namespace Mime { 22 | 23 | // Get() functions 24 | status_t get_app_hint(const char *type, entry_ref *ref); 25 | status_t get_attr_info(const char *type, BMessage *info); 26 | status_t get_short_description(const char *type, char *description); 27 | status_t get_long_description(const char *type, char *description); 28 | status_t get_file_extensions(const char *type, BMessage *extensions); 29 | status_t get_icon(const char *type, BBitmap *icon, icon_size size); 30 | status_t get_icon_for_type(const char *type, const char *fileType, BBitmap *icon, 31 | icon_size which); 32 | status_t get_preferred_app(const char *type, char *signature, app_verb verb); 33 | status_t get_sniffer_rule(const char *type, BString *result); 34 | status_t get_supported_types(const char *type, BMessage *types); 35 | 36 | bool is_installed(const char *type); 37 | 38 | // Called by BMimeType to get properly formatted icon data ready 39 | // to be shipped off to SetIcon*() and written to the database 40 | status_t get_icon_data(const BBitmap *icon, icon_size size, void **data, int32 *dataSize); 41 | 42 | } // namespace Mime 43 | } // namespace Storage 44 | } // namespace BPrivate 45 | 46 | #endif // _MIME_DATABASE_H 47 | -------------------------------------------------------------------------------- /headers/private/storage/sniffer/CVS/Entries: -------------------------------------------------------------------------------- 1 | /CharStream.h/1.1/Fri Nov 8 00:36:05 2002// 2 | /DisjList.h/1.4/Tue Sep 24 05:27:46 2002// 3 | /Err.h/1.4/Mon Aug 12 08:42:01 2002// 4 | /Parser.h/1.12/Fri Nov 8 00:38:35 2002// 5 | /Pattern.h/1.7/Tue Sep 24 05:27:46 2002// 6 | /PatternList.h/1.6/Tue Sep 24 05:27:46 2002// 7 | /RPattern.h/1.6/Tue Sep 24 05:27:46 2002// 8 | /RPatternList.h/1.6/Tue Sep 24 05:27:46 2002// 9 | /Range.h/1.5/Mon Aug 12 08:42:01 2002// 10 | /Rule.h/1.8/Tue Sep 24 05:27:46 2002// 11 | D 12 | -------------------------------------------------------------------------------- /headers/private/storage/sniffer/CVS/Repository: -------------------------------------------------------------------------------- 1 | current/headers/private/storage/sniffer 2 | -------------------------------------------------------------------------------- /headers/private/storage/sniffer/CVS/Root: -------------------------------------------------------------------------------- 1 | :ext:haydentech@cvs.sourceforge.net:/cvsroot/open-beos 2 | -------------------------------------------------------------------------------- /headers/private/storage/sniffer/CharStream.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file sniffer/CharStream.h 7 | Character stream class 8 | */ 9 | #ifndef _SNIFFER_CHAR_STREAM_H 10 | #define _SNIFFER_CHAR_STREAM_H 11 | 12 | #include 13 | 14 | #include 15 | 16 | namespace BPrivate { 17 | namespace Storage { 18 | namespace Sniffer { 19 | 20 | //! Manages a stream of characters 21 | /*! CharStream is used by the scanner portion of the parser, which is implemented 22 | in TokenStream::SetTo(). 23 | 24 | It's also used by BPrivate::TRoster while parsing through the the 25 | roster's RosterSettings file. 26 | */ 27 | class CharStream { 28 | public: 29 | CharStream(const std::string &string); 30 | CharStream(); 31 | virtual ~CharStream(); 32 | 33 | status_t SetTo(const std::string &string); 34 | void Unset(); 35 | status_t InitCheck() const; 36 | bool IsEmpty() const; 37 | size_t Pos() const; 38 | const std::string& String() const; 39 | 40 | char Get(); 41 | void Unget(); 42 | 43 | private: 44 | std::string fString; 45 | size_t fPos; 46 | status_t fCStatus; 47 | 48 | CharStream(const CharStream &ref); 49 | CharStream& operator=(const CharStream &ref); 50 | }; 51 | 52 | }; // namespace Sniffer 53 | }; // namespace Storage 54 | }; // namespace BPrivate 55 | 56 | #endif // _SNIFFER_CHAR_STREAM_H 57 | -------------------------------------------------------------------------------- /headers/private/storage/sniffer/DisjList.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file sniffer/DisjList.h 7 | Mime Sniffer Disjunction List declarations 8 | */ 9 | #ifndef _SNIFFER_DISJ_LIST_H 10 | #define _SNIFFER_DISJ_LIST_H 11 | 12 | #include 13 | 14 | class BPositionIO; 15 | 16 | namespace BPrivate { 17 | namespace Storage { 18 | namespace Sniffer { 19 | 20 | //! Abstract class defining methods acting on a list of ORed patterns 21 | class DisjList { 22 | public: 23 | DisjList(); 24 | virtual ~DisjList(); 25 | 26 | virtual bool Sniff(BPositionIO *data) const = 0; 27 | virtual ssize_t BytesNeeded() const = 0; 28 | 29 | void SetCaseInsensitive(bool how); 30 | bool IsCaseInsensitive(); 31 | protected: 32 | bool fCaseInsensitive; 33 | }; 34 | 35 | }; // namespace Sniffer 36 | }; // namespace Storage 37 | }; // namespace BPrivate 38 | 39 | #endif // _SNIFFER_DISJ_LIST_H 40 | 41 | 42 | -------------------------------------------------------------------------------- /headers/private/storage/sniffer/Err.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file sniffer/Err.h 7 | Mime Sniffer Error class declarations 8 | */ 9 | #ifndef _SNIFFER_ERR_H 10 | #define _SNIFFER_ERR_H 11 | 12 | #include 13 | #include 14 | 15 | namespace BPrivate { 16 | namespace Storage { 17 | namespace Sniffer { 18 | 19 | //! Exception class used by the MIME Sniffer 20 | /*! Each exception contains an error message, and an byte offset into 21 | the original rule that generated the error, for the sake of 22 | providing spiffy error messages of the following sort: 23 | 24 | 25 | "1.0 ('abc' & 0xFFAAFFAA)" 26 | ^ Sniffer pattern error: pattern and mask lengths do not match 27 | 28 | */ 29 | class Err { 30 | public: 31 | Err(const char *msg, const ssize_t pos); 32 | Err(const std::string &msg, const ssize_t pos); 33 | Err(const Err &ref); 34 | virtual ~Err(); 35 | Err& operator=(const Err &ref); 36 | 37 | status_t SetTo(const char *msg, const ssize_t pos); 38 | status_t SetTo(const std::string &msg, const ssize_t pos); 39 | void Unset(); 40 | 41 | void SetMsg(const char *msg); 42 | void SetPos(ssize_t pos); 43 | 44 | const char* Msg() const; 45 | ssize_t Pos() const; 46 | 47 | private: 48 | char *fMsg; 49 | ssize_t fPos; 50 | }; 51 | 52 | }; // namespace Sniffer 53 | }; // namespace Storage 54 | }; // namespace BPrivate 55 | 56 | #endif // _SNIFFER_ERR_H 57 | 58 | 59 | -------------------------------------------------------------------------------- /headers/private/storage/sniffer/Pattern.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file sniffer/Pattern.h 7 | Mime Sniffer Pattern declarations 8 | */ 9 | #ifndef _SNIFFER_PATTERN_H 10 | #define _SNIFFER_PATTERN_H 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | class BPositionIO; 17 | 18 | namespace BPrivate { 19 | namespace Storage { 20 | namespace Sniffer { 21 | 22 | class Err; 23 | 24 | //! A byte string and optional mask to be compared against a data stream. 25 | /*! The byte string and mask (if supplied) must be of the same length. */ 26 | class Pattern { 27 | public: 28 | Pattern(const std::string &string, const std::string &mask); 29 | Pattern(const std::string &string); 30 | ~Pattern(); 31 | 32 | status_t InitCheck() const; 33 | Err* GetErr() const; 34 | 35 | bool Sniff(Range range, BPositionIO *data, bool caseInsensitive) const; 36 | ssize_t BytesNeeded() const; 37 | 38 | status_t SetTo(const std::string &string, const std::string &mask); 39 | private: 40 | bool Sniff(off_t start, off_t size, BPositionIO *data, bool caseInsensitive) const; 41 | 42 | void SetStatus(status_t status, const char *msg = NULL); 43 | void SetErrorMessage(const char *msg); 44 | 45 | std::string fString; 46 | std::string fMask; 47 | 48 | status_t fCStatus; 49 | Err *fErrorMessage; 50 | }; 51 | 52 | }; // namespace Sniffer 53 | }; // namespace Storage 54 | }; // namespace BPrivate 55 | 56 | #endif // _SNIFFER_PATTERN_H 57 | 58 | 59 | -------------------------------------------------------------------------------- /headers/private/storage/sniffer/PatternList.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file sniffer/PatternList.h 7 | MIME sniffer pattern list declarations 8 | */ 9 | #ifndef _SNIFFER_PATTERN_LIST_H 10 | #define _SNIFFER_PATTERN_LIST_H 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | class BPositionIO; 17 | 18 | namespace BPrivate { 19 | namespace Storage { 20 | namespace Sniffer { 21 | 22 | class Err; 23 | class Pattern; 24 | 25 | /*! \brief A list of patterns, one of which must match for the list to match, all 26 | of which are to be searched over the same range. 27 | */ 28 | class PatternList : public DisjList { 29 | public: 30 | PatternList(Range range); 31 | virtual ~PatternList(); 32 | 33 | status_t InitCheck() const; 34 | Err* GetErr() const; 35 | 36 | virtual bool Sniff(BPositionIO *data) const; 37 | virtual ssize_t BytesNeeded() const; 38 | 39 | void Add(Pattern *pattern); 40 | private: 41 | std::vector fList; 42 | Range fRange; 43 | }; 44 | 45 | }; // namespace Sniffer 46 | }; // namespace Storage 47 | }; // namespace BPrivate 48 | 49 | #endif // _SNIFFER_PATTERN_LIST_H 50 | 51 | 52 | -------------------------------------------------------------------------------- /headers/private/storage/sniffer/RPattern.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file sniffer/RPattern.h 7 | Mime Sniffer RPattern declarations 8 | */ 9 | #ifndef _SNIFFER_R_PATTERN_H 10 | #define _SNIFFER_R_PATTERN_H 11 | 12 | #include 13 | 14 | class BPositionIO; 15 | 16 | namespace BPrivate { 17 | namespace Storage { 18 | namespace Sniffer { 19 | 20 | class Err; 21 | class Pattern; 22 | 23 | //! A Pattern and a Range, bundled into one. 24 | class RPattern { 25 | public: 26 | RPattern(Range range, Pattern *pattern); 27 | ~RPattern(); 28 | 29 | status_t InitCheck() const; 30 | Err* GetErr() const; 31 | 32 | bool Sniff(BPositionIO *data, bool caseInsensitive) const; 33 | ssize_t BytesNeeded() const; 34 | private: 35 | Range fRange; 36 | Pattern *fPattern; 37 | }; 38 | 39 | }; // namespace Sniffer 40 | }; // namespace Storage 41 | }; // namespace BPrivate 42 | 43 | #endif // _SNIFFER_R_PATTERN_H 44 | 45 | 46 | -------------------------------------------------------------------------------- /headers/private/storage/sniffer/RPatternList.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file sniffer/RPatternList.h 7 | MIME sniffer rpattern list declarations 8 | */ 9 | #ifndef _SNIFFER_R_PATTERN_LIST_H 10 | #define _SNIFFER_R_PATTERN_LIST_H 11 | 12 | #include 13 | #include 14 | 15 | class BPositionIO; 16 | 17 | namespace BPrivate { 18 | namespace Storage { 19 | namespace Sniffer { 20 | 21 | class Err; 22 | class RPattern; 23 | 24 | //! A list of patterns, each of which is to be searched over its own specified range. 25 | class RPatternList : public DisjList { 26 | public: 27 | RPatternList(); 28 | virtual ~RPatternList(); 29 | 30 | status_t InitCheck() const; 31 | Err* GetErr() const; 32 | 33 | virtual bool Sniff(BPositionIO *data) const; 34 | virtual ssize_t BytesNeeded() const; 35 | void Add(RPattern *rpattern); 36 | private: 37 | std::vector fList; 38 | }; 39 | 40 | }; // namespace Sniffer 41 | }; // namespace Storage 42 | }; // namespace BPrivate 43 | 44 | #endif // _SNIFFER_R_PATTERN_LIST_H 45 | 46 | 47 | -------------------------------------------------------------------------------- /headers/private/storage/sniffer/Range.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file sniffer/Range.h 7 | MIME sniffer range declarations 8 | */ 9 | #ifndef _SNIFFER_RANGE_H 10 | #define _SNIFFER_RANGE_H 11 | 12 | #include 13 | 14 | namespace BPrivate { 15 | namespace Storage { 16 | namespace Sniffer { 17 | 18 | class Err; 19 | 20 | //! A range of byte offsets from which to check a pattern against a data stream. 21 | class Range { 22 | public: 23 | Range(int32 start, int32 end); 24 | 25 | status_t InitCheck() const; 26 | Err* GetErr() const; 27 | 28 | int32 Start() const; 29 | int32 End() const; 30 | 31 | void SetTo(int32 start, int32 end); 32 | private: 33 | int32 fStart; 34 | int32 fEnd; 35 | status_t fCStatus; 36 | }; 37 | 38 | }; // namespace Sniffer 39 | }; // namespace Storage 40 | }; // namespace BPrivate 41 | 42 | #endif // _SNIFFER_RANGE_H 43 | 44 | 45 | -------------------------------------------------------------------------------- /headers/private/storage/sniffer/Rule.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file sniffer/Rule.h 7 | Mime sniffer rule declarations 8 | */ 9 | #ifndef _SNIFFER_RULE_H 10 | #define _SNIFFER_RULE_H 11 | 12 | #include 13 | 14 | #include 15 | #include 16 | 17 | class BPositionIO; 18 | 19 | namespace BPrivate { 20 | namespace Storage { 21 | namespace Sniffer { 22 | 23 | class DisjList; 24 | 25 | /*! \brief A priority and a list of expressions to be used for sniffing out the 26 | type of an untyped file. 27 | */ 28 | class Rule { 29 | public: 30 | Rule(); 31 | ~Rule(); 32 | 33 | status_t InitCheck() const; 34 | double Priority() const; 35 | bool Sniff(BPositionIO *data) const; 36 | ssize_t BytesNeeded() const; 37 | private: 38 | friend class Parser; 39 | 40 | void Unset(); 41 | void SetTo(double priority, std::vector* list); 42 | 43 | double fPriority; 44 | std::vector *fConjList; // A list of DisjLists to be ANDed 45 | }; 46 | 47 | }; // namespace Sniffer 48 | }; // namespace Storage 49 | }; // namespace BPrivate 50 | 51 | #endif // _SNIFFER_RULE_H 52 | 53 | 54 | -------------------------------------------------------------------------------- /makefile.rules: -------------------------------------------------------------------------------- 1 | 2 | # 3 | # Makefile standard rules and default targets 4 | # 5 | # This makefile is supposed to be included by the main 6 | # makefile after the following variables have been set: 7 | # 8 | # OBJDIR - The directory where all temporary files will be placed. 9 | # CFLAGS - Options given to the compiler when compiling C files 10 | # CPPFLAGS - Options given to the compiler when compiling C++ files 11 | # OBJS - List of object files. 12 | # 13 | # The $(OBJDIR) varaiable will be prepended to all elements in 14 | # the $(OBJS) list and then a new variable named DEPS will be 15 | # initiated with all the elements from $(OBJS) with all ".o" prefixes 16 | # replaced with ".d". 17 | 18 | 19 | OBJS := $(addprefix $(OBJDIR)/,$(OBJS)) 20 | DEPS := $(addsuffix .d, $(foreach name, $(OBJS), $(basename $(name)))) 21 | 22 | $(OBJDIR)/%.o : %.c 23 | $(CC) $(CFLAGS) $< -o $@ 24 | $(OBJDIR)/%.o : %.cpp 25 | $(CC) $(CPPFLAGS) $< -o $@ 26 | $(OBJDIR)/%.o : %.cc 27 | $(CC) $(CPPFLAGS) $< -o $@ 28 | $(OBJDIR)/%.o : %.s 29 | $(CC) $(AFLAGS) -x assembler-with-cpp $< -o $@ 30 | $(OBJDIR)/%.o : %.S 31 | $(CC) $(CFLAGS) -x assembler-with-cpp $< -o $@ 32 | 33 | 34 | $(OBJDIR)/%.d : %.c 35 | $(CC) $(CFLAGS) -M $< | sed 's%^\(.*\):%$(OBJDIR)\/\1:%' > $@ 36 | $(OBJDIR)/%.d : %.cpp 37 | $(CC) $(CPPFLAGS) -M $< | sed 's%^\(.*\):%$(OBJDIR)\/\1:%' > $@ 38 | $(OBJDIR)/%.d : %.s 39 | touch $@ 40 | $(OBJDIR)/%.d : %.S 41 | touch $@ 42 | 43 | -------------------------------------------------------------------------------- /src/add-ons/Makefile.in: -------------------------------------------------------------------------------- 1 | SUBPROJECTS = translators 2 | 3 | include @top_srcdir@/Makefile.common 4 | 5 | -------------------------------------------------------------------------------- /src/add-ons/translators/Makefile.in: -------------------------------------------------------------------------------- 1 | SUBPROJECTS = bmptranslator \ 2 | pngtranslator 3 | 4 | # jpg2000translator \ 5 | # jpgtranslator \ 6 | # libtifftranslator \ 7 | # ppmtranslator \ 8 | # sgitranslator \ 9 | # stxttranslator \ 10 | # tgatranslator \ 11 | # tifftranslator 12 | 13 | include @top_srcdir@/Makefile.common 14 | 15 | -------------------------------------------------------------------------------- /src/add-ons/translators/bmptranslator/BMPWindow.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | // BMPWindow 3 | // BMPWindow.h 4 | // 5 | // This BWindow based object is used to hold the BMPView object when the 6 | // user runs the BMPTranslator as an application. 7 | // 8 | // 9 | // Copyright (c) 2002 OpenBeOS Project 10 | // 11 | // Permission is hereby granted, free of charge, to any person obtaining a 12 | // copy of this software and associated documentation files (the "Software"), 13 | // to deal in the Software without restriction, including without limitation 14 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 15 | // and/or sell copies of the Software, and to permit persons to whom the 16 | // Software is furnished to do so, subject to the following conditions: 17 | // 18 | // The above copyright notice and this permission notice shall be included 19 | // in all copies or substantial portions of the Software. 20 | // 21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 24 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 26 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 27 | // DEALINGS IN THE SOFTWARE. 28 | /*****************************************************************************/ 29 | 30 | #ifndef BMPWINDOW_H 31 | #define BMPWINDOW_H 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | class BMPWindow : public BWindow { 38 | public: 39 | BMPWindow(BRect area); 40 | // Sets up a BWindow with bounds area 41 | 42 | ~BMPWindow(); 43 | // Posts a quit message so that the application closes properly 44 | }; 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /src/add-ons/translators/bmptranslator/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | prefix=@prefix@ 3 | exec_prefix=@exec_prefix@ 4 | bindir=@bindir@ 5 | 6 | CFLAGS = -pipe -O2 -g `freetype-config --cflags` -c -Wall -Wno-multichar `cat @top_srcdir@/cosmoe.specs` 7 | CPPFLAGS= $(CFLAGS) -Woverloaded-virtual -Wnon-virtual-dtor 8 | 9 | CC = @CC@ 10 | EXE = bmptranslator 11 | COSMOELIBDIR = @top_srcdir@/src/kits/objs 12 | 13 | OBJS = BMPMain.o BMPTranslator.o BMPView.o BMPWindow.o 14 | 15 | OBJDIR := objs 16 | 17 | include @top_srcdir@/makefile.rules 18 | 19 | all : $(OBJDIR) $(OBJDIR)/$(EXE) 20 | 21 | $(OBJDIR): 22 | mkdir $(OBJDIR) 23 | 24 | $(OBJDIR)/$(EXE): $(OBJS) Makefile 25 | $(CC) -g -rdynamic $(OBJS) -o $(OBJDIR)/$(EXE) -L$(COSMOELIBDIR) -lcosmoe -lz -lstdc++ 26 | 27 | install: $(OBJDIR)/$(EXE) $(bindir) 28 | cp -f $(OBJDIR)/$(EXE) $(bindir) 29 | 30 | $(bindir): 31 | mkdir -p $(bindir) 32 | 33 | deps: $(OBJDIR) $(DEPS) 34 | 35 | clean: 36 | rm -f $(OBJS) $(OBJDIR)/*.d $(OBJDIR)/$(EXE) *~ 37 | 38 | distclean: clean 39 | rm -f Makefile 40 | 41 | -include $(OBJDIR)/*.d 42 | 43 | .PHONY: clean distclean deps doc install uninstall all 44 | -------------------------------------------------------------------------------- /src/add-ons/translators/jpeg2000translator/README: -------------------------------------------------------------------------------- 1 | JPEG2000 Translator v1.0 2 | ©2003 by Marcin 'Shard' Konicki 3 | shard@beosjournal.org 4 | http://shard.beosjournal.org 5 | 6 | TranslationKit add-on for JPEG 2000 files. 7 | 8 | It's based on JasPer library (http://www.ece.uvic.ca/~mdadams/jasper/). I used ImageMagick jp2 codec as a kind of tutorial for how to implement library (http://www.imagemagick.org/). 9 | 10 | 11 | A little explanation ("what is what"): 12 | 13 | To install translator drag & drop "JPEG2000Translator" file onto "Drag JPEG2000Translator here" folder. 14 | 15 | When You run DataTranslations application and go to JPEG2000 translator settings, You'll see 3 tabs: 16 | - Write 17 | - Read 18 | - About 19 | 20 | Write tab shows settings used for writing jpeg 2000 files: 21 | 22 | Output quality let's You chose how much output image will be similar to original image. Less quality means worse output image. There is a scale from 1 to 100 but from i've seen so far 25-35 is superb quality, more percent only will make output file bigger without any noticable image quality changes. 23 | 24 | Write Black&White images as RGB24 tells translator to write B_GRAY1 images as rgb jpeg. If it's turned off, translator will write them as greyscale. 25 | 26 | Output only codestream (.jpc) tells translator to write jpeg 2000 codestream to file instead of jp2 structure (jp2, except codestream, also includes color space type for example). 27 | 28 | 29 | Read tab shows settings used for reading jpeg files: 30 | 31 | Read Greyscale images as RGB32 makes translator to read greyscale images as they have been color. Most applications on BeOS can't "understand" greyscale images from translation properly (i've tried ShowImage, ViewImage, Gobe Productive 2, NetPositive, and ArtPaint - only NetPositive can understand them). 32 | 33 | 34 | About tab shows info about this translator. 35 | 36 | 37 | Shard -------------------------------------------------------------------------------- /src/add-ons/translators/jpeg2000translator/libjasper/README: -------------------------------------------------------------------------------- 1 | JasPer Readme 2 | ************* 3 | 4 | This is the source code distribution for JasPer. JasPer is a collection 5 | of software (i.e., a library and application programs) for the coding 6 | and manipulation of images. This software can handle image data in a 7 | variety of formats. One such format supported by JasPer is the JPEG-2000 8 | code stream format defined in ISO/IEC 15444-1:2000. 9 | 10 | The complete licensing terms for the JasPer software can be found in 11 | the file named "LICENSE" in the top level directory of this software 12 | distribution. Any use of this software contrary to the terms of the 13 | license is strictly prohibited. The changes made to the software 14 | since the last release are described in the file "NEWS". Detailed 15 | documentation on the JasPer software can be found in the JasPer Software 16 | Reference Manual. This manual is located in the "doc" directory, and 17 | includes useful information such as: 1) how to build, install, and use 18 | the software, 2) how to report bugs, and 3) where to find additional 19 | information about the software. 20 | 21 | Enjoy! :) 22 | 23 | --The JasPer Contributors 24 | -------------------------------------------------------------------------------- /src/add-ons/translators/jpegtranslator/libjpeg/jchuff.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jchuff.h 3 | * 4 | * Copyright (C) 1991-1997, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains declarations for Huffman entropy encoding routines 9 | * that are shared between the sequential encoder (jchuff.c) and the 10 | * progressive encoder (jcphuff.c). No other modules need to see these. 11 | */ 12 | 13 | /* The legal range of a DCT coefficient is 14 | * -1024 .. +1023 for 8-bit data; 15 | * -16384 .. +16383 for 12-bit data. 16 | * Hence the magnitude should always fit in 10 or 14 bits respectively. 17 | */ 18 | 19 | #if BITS_IN_JSAMPLE == 8 20 | #define MAX_COEF_BITS 10 21 | #else 22 | #define MAX_COEF_BITS 14 23 | #endif 24 | 25 | /* The legal range of a spatial difference is 26 | * -32767 .. +32768. 27 | * Hence the magnitude should always fit in 16 bits. 28 | */ 29 | 30 | #define MAX_DIFF_BITS 16 31 | 32 | 33 | /* Derived data constructed for each Huffman table */ 34 | 35 | typedef struct { 36 | unsigned int ehufco[256]; /* code for each symbol */ 37 | char ehufsi[256]; /* length of code for each symbol */ 38 | /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */ 39 | } c_derived_tbl; 40 | 41 | /* Short forms of external names for systems with brain-damaged linkers. */ 42 | 43 | #ifdef NEED_SHORT_EXTERNAL_NAMES 44 | #define jpeg_make_c_derived_tbl jMkCDerived 45 | #define jpeg_gen_optimal_table jGenOptTbl 46 | #endif /* NEED_SHORT_EXTERNAL_NAMES */ 47 | 48 | /* Expand a Huffman table definition into the derived format */ 49 | EXTERN(void) jpeg_make_c_derived_tbl 50 | JPP((j_compress_ptr cinfo, boolean isDC, int tblno, 51 | c_derived_tbl ** pdtbl)); 52 | 53 | /* Generate an optimal table definition given the specified counts */ 54 | EXTERN(void) jpeg_gen_optimal_table 55 | JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[])); 56 | -------------------------------------------------------------------------------- /src/add-ons/translators/jpegtranslator/libjpeg/jcodec.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jcodec.c 3 | * 4 | * Copyright (C) 1998, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains utility functions for the JPEG codec(s). 9 | */ 10 | 11 | #define JPEG_INTERNALS 12 | #include "jinclude.h" 13 | #include "jpeglib.h" 14 | #include "jlossy.h" 15 | #include "jlossls.h" 16 | 17 | 18 | /* 19 | * Initialize the compression codec. 20 | * This is called only once, during master selection. 21 | */ 22 | 23 | GLOBAL(void) 24 | jinit_c_codec (j_compress_ptr cinfo) 25 | { 26 | if (cinfo->process == JPROC_LOSSLESS) { 27 | #ifdef C_LOSSLESS_SUPPORTED 28 | jinit_lossless_c_codec(cinfo); 29 | #else 30 | ERREXIT(cinfo, JERR_NOT_COMPILED); 31 | #endif 32 | } else 33 | jinit_lossy_c_codec(cinfo); 34 | } 35 | 36 | 37 | /* 38 | * Initialize the decompression codec. 39 | * This is called only once, during master selection. 40 | */ 41 | 42 | GLOBAL(void) 43 | jinit_d_codec (j_decompress_ptr cinfo) 44 | { 45 | if (cinfo->process == JPROC_LOSSLESS) { 46 | #ifdef D_LOSSLESS_SUPPORTED 47 | jinit_lossless_d_codec(cinfo); 48 | #else 49 | ERREXIT(cinfo, JERR_NOT_COMPILED); 50 | #endif 51 | } else 52 | jinit_lossy_d_codec(cinfo); 53 | } 54 | -------------------------------------------------------------------------------- /src/add-ons/translators/jpegtranslator/libjpeg/jconfig.h: -------------------------------------------------------------------------------- 1 | /* jconfig.h. Generated automatically by configure. */ 2 | /* jconfig.cfg --- source file edited by configure script */ 3 | /* see jconfig.doc for explanations */ 4 | 5 | #define HAVE_PROTOTYPES 6 | #define HAVE_UNSIGNED_CHAR 7 | #define HAVE_UNSIGNED_SHORT 8 | #undef void 9 | #undef const 10 | #undef CHAR_IS_UNSIGNED 11 | #define HAVE_STDDEF_H 12 | #define HAVE_STDLIB_H 13 | #undef NEED_BSD_STRINGS 14 | #undef NEED_SYS_TYPES_H 15 | #undef NEED_FAR_POINTERS 16 | #undef NEED_SHORT_EXTERNAL_NAMES 17 | #define C_LOSSLESS_SUPPORTED 18 | /* Define this if you get warnings about undefined structures. */ 19 | #undef INCOMPLETE_TYPES_BROKEN 20 | 21 | //#define USE_BEOS_ALERT // use Alert window for error messages in BeOS 22 | 23 | #ifdef JPEG_INTERNALS 24 | 25 | #undef RIGHT_SHIFT_IS_UNSIGNED 26 | #define INLINE __inline__ 27 | /* These are for configuring the JPEG memory manager. */ 28 | #undef DEFAULT_MAX_MEM 29 | #undef NO_MKTEMP 30 | 31 | #endif /* JPEG_INTERNALS */ 32 | 33 | #ifdef JPEG_CJPEG_DJPEG 34 | 35 | #define BMP_SUPPORTED /* BMP image file format */ 36 | #define GIF_SUPPORTED /* GIF image file format */ 37 | #define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ 38 | #undef RLE_SUPPORTED /* Utah RLE image file format */ 39 | #define TARGA_SUPPORTED /* Targa image file format */ 40 | 41 | #undef TWO_FILE_COMMANDLINE 42 | #undef NEED_SIGNAL_CATCHER 43 | #undef DONT_USE_B_MODE 44 | 45 | /* Define this if you want percent-done progress reports from cjpeg/djpeg. */ 46 | #undef PROGRESS_REPORT 47 | 48 | #endif /* JPEG_CJPEG_DJPEG */ 49 | -------------------------------------------------------------------------------- /src/add-ons/translators/jpegtranslator/libjpeg/jcscale.c: -------------------------------------------------------------------------------- 1 | /* 2 | * jcscale.c 3 | * 4 | * Copyright (C) 1998, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains sample downscaling by 2^Pt for lossless JPEG. 9 | */ 10 | 11 | #define JPEG_INTERNALS 12 | #include "jinclude.h" 13 | #include "jpeglib.h" 14 | #include "jlossls.h" /* Private declarations for lossless codec */ 15 | 16 | 17 | #ifdef C_LOSSLESS_SUPPORTED 18 | 19 | METHODDEF(void) 20 | simple_downscale(j_compress_ptr cinfo, 21 | JSAMPROW input_buf, JSAMPROW output_buf, JDIMENSION width) 22 | { 23 | //j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec; 24 | uint xindex; 25 | 26 | for (xindex = 0; xindex < width; xindex++) 27 | output_buf[xindex] = (JSAMPLE) RIGHT_SHIFT(GETJSAMPLE(input_buf[xindex]), 28 | cinfo->Al); 29 | } 30 | 31 | 32 | METHODDEF(void) 33 | noscale(j_compress_ptr cinfo, 34 | JSAMPROW input_buf, JSAMPROW output_buf, JDIMENSION width) 35 | { 36 | MEMCOPY(output_buf, input_buf, width * SIZEOF(JSAMPLE)); 37 | return; 38 | } 39 | 40 | 41 | METHODDEF(void) 42 | scaler_start_pass (j_compress_ptr cinfo) 43 | { 44 | j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec; 45 | 46 | /* Set scaler function based on Pt */ 47 | if (cinfo->Al) 48 | losslsc->scaler_scale = simple_downscale; 49 | else 50 | losslsc->scaler_scale = noscale; 51 | } 52 | 53 | 54 | GLOBAL(void) 55 | jinit_c_scaler (j_compress_ptr cinfo) 56 | { 57 | j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec; 58 | 59 | losslsc->scaler_start_pass = scaler_start_pass; 60 | } 61 | 62 | #endif /* C_LOSSLESS_SUPPORTED */ 63 | -------------------------------------------------------------------------------- /src/add-ons/translators/jpegtranslator/libjpeg/jversion.h: -------------------------------------------------------------------------------- 1 | /* 2 | * jversion.h 3 | * 4 | * Copyright (C) 1991-1998, Thomas G. Lane. 5 | * This file is part of the Independent JPEG Group's software. 6 | * For conditions of distribution and use, see the accompanying README file. 7 | * 8 | * This file contains software version identification. 9 | */ 10 | 11 | 12 | #define JVERSION "6b 27-Mar-1998" 13 | 14 | #define JCOPYRIGHT "Copyright (C) 1998, Thomas G. Lane" 15 | -------------------------------------------------------------------------------- /src/add-ons/translators/libtifftranslator/tif_error.c: -------------------------------------------------------------------------------- 1 | /* $Header: /cvsroot/open-beos/current/src/add-ons/translators/libtifftranslator/tif_error.c,v 1.1 2003/07/19 16:40:33 mwilber Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 1988-1997 Sam Leffler 5 | * Copyright (c) 1991-1997 Silicon Graphics, Inc. 6 | * 7 | * Permission to use, copy, modify, distribute, and sell this software and 8 | * its documentation for any purpose is hereby granted without fee, provided 9 | * that (i) the above copyright notices and this permission notice appear in 10 | * all copies of the software and related documentation, and (ii) the names of 11 | * Sam Leffler and Silicon Graphics may not be used in any advertising or 12 | * publicity relating to the software without the specific, prior written 13 | * permission of Sam Leffler and Silicon Graphics. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 16 | * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 17 | * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 18 | * 19 | * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR 20 | * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, 21 | * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 22 | * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 23 | * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 24 | * OF THIS SOFTWARE. 25 | */ 26 | 27 | /* 28 | * TIFF Library. 29 | */ 30 | #include "tiffiop.h" 31 | 32 | TIFFErrorHandler 33 | TIFFSetErrorHandler(TIFFErrorHandler handler) 34 | { 35 | TIFFErrorHandler prev = _TIFFerrorHandler; 36 | _TIFFerrorHandler = handler; 37 | return (prev); 38 | } 39 | 40 | void 41 | TIFFError(const char* module, const char* fmt, ...) 42 | { 43 | if (_TIFFerrorHandler) { 44 | va_list ap; 45 | va_start(ap, fmt); 46 | (*_TIFFerrorHandler)(module, fmt, ap); 47 | va_end(ap); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/add-ons/translators/libtifftranslator/tif_version.c: -------------------------------------------------------------------------------- 1 | /* $Header: /cvsroot/open-beos/current/src/add-ons/translators/libtifftranslator/tif_version.c,v 1.1 2003/07/19 16:40:33 mwilber Exp $ */ 2 | /* 3 | * Copyright (c) 1992-1997 Sam Leffler 4 | * Copyright (c) 1992-1997 Silicon Graphics, Inc. 5 | * 6 | * Permission to use, copy, modify, distribute, and sell this software and 7 | * its documentation for any purpose is hereby granted without fee, provided 8 | * that (i) the above copyright notices and this permission notice appear in 9 | * all copies of the software and related documentation, and (ii) the names of 10 | * Sam Leffler and Silicon Graphics may not be used in any advertising or 11 | * publicity relating to the software without the specific, prior written 12 | * permission of Sam Leffler and Silicon Graphics. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 15 | * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 16 | * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 17 | * 18 | * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR 19 | * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, 20 | * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 21 | * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 22 | * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 23 | * OF THIS SOFTWARE. 24 | */ 25 | #include "tiffiop.h" 26 | 27 | static const char TIFFVersion[] = TIFFLIB_VERSION_STR; 28 | 29 | const char* 30 | TIFFGetVersion(void) 31 | { 32 | return (TIFFVersion); 33 | } 34 | -------------------------------------------------------------------------------- /src/add-ons/translators/libtifftranslator/tif_warning.c: -------------------------------------------------------------------------------- 1 | /* $Header: /cvsroot/open-beos/current/src/add-ons/translators/libtifftranslator/tif_warning.c,v 1.1 2003/07/19 16:40:33 mwilber Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 1988-1997 Sam Leffler 5 | * Copyright (c) 1991-1997 Silicon Graphics, Inc. 6 | * 7 | * Permission to use, copy, modify, distribute, and sell this software and 8 | * its documentation for any purpose is hereby granted without fee, provided 9 | * that (i) the above copyright notices and this permission notice appear in 10 | * all copies of the software and related documentation, and (ii) the names of 11 | * Sam Leffler and Silicon Graphics may not be used in any advertising or 12 | * publicity relating to the software without the specific, prior written 13 | * permission of Sam Leffler and Silicon Graphics. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 16 | * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 17 | * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 18 | * 19 | * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR 20 | * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, 21 | * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 22 | * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 23 | * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 24 | * OF THIS SOFTWARE. 25 | */ 26 | 27 | /* 28 | * TIFF Library. 29 | */ 30 | #include "tiffiop.h" 31 | 32 | TIFFErrorHandler 33 | TIFFSetWarningHandler(TIFFErrorHandler handler) 34 | { 35 | TIFFErrorHandler prev = _TIFFwarningHandler; 36 | _TIFFwarningHandler = handler; 37 | return (prev); 38 | } 39 | 40 | void 41 | TIFFWarning(const char* module, const char* fmt, ...) 42 | { 43 | if (_TIFFwarningHandler) { 44 | va_list ap; 45 | va_start(ap, fmt); 46 | (*_TIFFwarningHandler)(module, fmt, ap); 47 | va_end(ap); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/add-ons/translators/libtifftranslator/tiffvers.h: -------------------------------------------------------------------------------- 1 | #define TIFFLIB_VERSION_STR "LIBTIFF, Version 3.6.1\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc." 2 | /* 3 | * This define can be used in code that requires 4 | * compilation-related definitions specific to a 5 | * version or versions of the library. Runtime 6 | * version checking should be done based on the 7 | * string returned by TIFFGetVersion. 8 | */ 9 | #define TIFFLIB_VERSION 20031226 10 | -------------------------------------------------------------------------------- /src/add-ons/translators/pngtranslator/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | prefix=@prefix@ 3 | exec_prefix=@exec_prefix@ 4 | bindir=@bindir@ 5 | 6 | CFLAGS = -pipe -O2 -g `freetype-config --cflags` -c -Wall -Wno-multichar `cat @top_srcdir@/cosmoe.specs` 7 | CPPFLAGS= $(CFLAGS) -Woverloaded-virtual -Wnon-virtual-dtor 8 | 9 | CC = @CC@ 10 | EXE = pngtranslator 11 | COSMOELIBDIR = @top_srcdir@/src/kits/objs 12 | 13 | OBJS = PNGMain.o PNGTranslator.o PNGTranslatorSettings.o PNGView.o PNGWindow.o 14 | 15 | OBJDIR := objs 16 | 17 | include @top_srcdir@/makefile.rules 18 | 19 | all : $(OBJDIR) $(OBJDIR)/$(EXE) 20 | 21 | $(OBJDIR): 22 | mkdir $(OBJDIR) 23 | 24 | $(OBJDIR)/$(EXE): $(OBJS) Makefile 25 | $(CC) -g -rdynamic $(OBJS) -o $(OBJDIR)/$(EXE) -L$(COSMOELIBDIR) -lcosmoe -lpng -lz -lstdc++ 26 | 27 | install: $(OBJDIR)/$(EXE) $(bindir) 28 | cp -f $(OBJDIR)/$(EXE) $(bindir) 29 | 30 | $(bindir): 31 | mkdir -p $(bindir) 32 | 33 | deps: $(OBJDIR) $(DEPS) 34 | 35 | clean: 36 | rm -f $(OBJS) $(OBJDIR)/*.d $(OBJDIR)/$(EXE) *~ 37 | 38 | distclean: clean 39 | rm -f Makefile 40 | 41 | -include $(OBJDIR)/*.d 42 | 43 | .PHONY: clean distclean deps doc install uninstall all 44 | -------------------------------------------------------------------------------- /src/add-ons/translators/ppmtranslator/LICENSE: -------------------------------------------------------------------------------- 1 | ---------------------- 2 | Be Sample Code License 3 | ---------------------- 4 | 5 | Copyright 1991-1999, Be Incorporated. 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions 10 | are met: 11 | 12 | 1. Redistributions of source code must retain the above copyright 13 | notice, this list of conditions, and the following disclaimer. 14 | 15 | 2. Redistributions in binary form must reproduce the above copyright 16 | notice, this list of conditions, and the following disclaimer in the 17 | documentation and/or other materials provided with the distribution. 18 | 19 | 3. The name of the author may not be used to endorse or promote products 20 | derived from this software without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR 23 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24 | OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 25 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 26 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 27 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 29 | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 30 | TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | -------------------------------------------------------------------------------- /src/add-ons/translators/ppmtranslator/PPMMain.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 1999, Be Incorporated. All Rights Reserved. 3 | This file may be used under the terms of the Be Sample Code License. 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include 14 | 15 | 16 | BPoint get_window_origin(); 17 | void set_window_origin(BPoint pt); 18 | 19 | class PPMWindow : 20 | public BWindow 21 | { 22 | public: 23 | PPMWindow( 24 | BRect area) : 25 | BWindow(area, "PPMTranslator", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE) 26 | { 27 | } 28 | ~PPMWindow() 29 | { 30 | BPoint pt(0,0); 31 | ConvertToScreen(&pt); 32 | set_window_origin(pt); 33 | be_app->PostMessage(B_QUIT_REQUESTED); 34 | } 35 | }; 36 | 37 | int 38 | main() 39 | { 40 | BApplication app("application/x-vnd.hplus-ppm-translator"); 41 | BView * v = NULL; 42 | BRect r(0,0,225,175); 43 | if (MakeConfig(NULL, &v, &r)) { 44 | BAlert * err = new BAlert("Error", "Something is wrong with the PPMTranslator!", "OK"); 45 | err->Go(); 46 | return 1; 47 | } 48 | PPMWindow *w = new PPMWindow(r); 49 | v->ResizeTo(r.Width(), r.Height()); 50 | w->AddChild(v); 51 | BPoint o = get_window_origin(); 52 | { 53 | BScreen scrn; 54 | BRect f = scrn.Frame(); 55 | f.InsetBy(10,23); 56 | /* if not in a good place, start where the cursor is */ 57 | if (!f.Contains(o)) { 58 | uint32 i; 59 | v->GetMouse(&o, &i, false); 60 | o.x -= r.Width()/2; 61 | o.y -= r.Height()/2; 62 | /* clamp location to screen */ 63 | if (o.x < f.left) o.x = f.left; 64 | if (o.y < f.top) o.y = f.top; 65 | if (o.x > f.right) o.x = f.right; 66 | if (o.y > f.bottom) o.y = f.bottom; 67 | } 68 | } 69 | w->MoveTo(o); 70 | w->Show(); 71 | app.Run(); 72 | return 0; 73 | } 74 | 75 | -------------------------------------------------------------------------------- /src/add-ons/translators/ppmtranslator/colorspace.h: -------------------------------------------------------------------------------- 1 | /* colorspace.h */ 2 | /* 3 | Copyright 1999, Be Incorporated. All Rights Reserved. 4 | This file may be used under the terms of the Be Sample Code License. 5 | */ 6 | 7 | #if !defined(COLORSPACE_H) 8 | #define COLORSPACE_H 9 | 10 | 11 | /* This is the main conversion function; it converts data in in_data */ 12 | /* with rowbytes amount of pixel data into some other color space in */ 13 | /* out_data, with enough memory assumed to be in out_data for the */ 14 | /* converted data. */ 15 | status_t convert_space(color_space in_space, color_space out_space, 16 | unsigned char * in_data, int rowbytes, unsigned char * out_data); 17 | 18 | /* This function expands rowbytes amount of data from in_data into */ 19 | /* RGBA32 data in out_buf, which must be big enough. */ 20 | int expand_data(color_space from_space, unsigned char * in_data, 21 | int rowbytes, unsigned char * out_buf); 22 | 23 | /* This function converts num_bytes bytes of RGBA32 data into some new */ 24 | /* color space in out_buf, where out_buf must be big enough. */ 25 | int collapse_data(unsigned char * in_buf, int num_bytes, 26 | color_space out_space, unsigned char * out_buf); 27 | 28 | /* Given a specific number of pixels in width in the color space space */ 29 | /* this function calculates what the row_bytes should be. */ 30 | int calc_rowbytes(color_space space, int width); 31 | 32 | #endif /* COLORSPACE_H */ 33 | -------------------------------------------------------------------------------- /src/add-ons/translators/tifftranslator/TiffField.cpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | // TiffField 3 | // Written by Michael Wilber, OBOS Translation Kit Team 4 | // 5 | // TiffField.cpp 6 | // 7 | // This object is for storing TIFF fields 8 | // 9 | // 10 | // Copyright (c) 2003 OpenBeOS Project 11 | // 12 | // Permission is hereby granted, free of charge, to any person obtaining a 13 | // copy of this software and associated documentation files (the "Software"), 14 | // to deal in the Software without restriction, including without limitation 15 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 16 | // and/or sell copies of the Software, and to permit persons to whom the 17 | // Software is furnished to do so, subject to the following conditions: 18 | // 19 | // The above copyright notice and this permission notice shall be included 20 | // in all copies or substantial portions of the Software. 21 | // 22 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 23 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 25 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 28 | // DEALINGS IN THE SOFTWARE. 29 | /*****************************************************************************/ 30 | 31 | #include 32 | #include "TiffField.h" 33 | 34 | TiffField::TiffField(IFDEntry &entry) 35 | { 36 | finitStatus = B_ERROR; 37 | // responsibility of derived class to set this properly 38 | 39 | ftag = entry.tag; 40 | ffieldType = entry.fieldType; 41 | fcount = entry.count; 42 | } 43 | -------------------------------------------------------------------------------- /src/add-ons/translators/tifftranslator/TiffUnknownField.cpp: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | // TiffUnknownField 3 | // Written by Michael Wilber, OBOS Translation Kit Team 4 | // 5 | // TiffUnknownField.cpp 6 | // 7 | // This object is for storing TIFF fields that the translator doesn't know 8 | // or doesn't care about 9 | // 10 | // 11 | // Copyright (c) 2003 OpenBeOS Project 12 | // 13 | // Permission is hereby granted, free of charge, to any person obtaining a 14 | // copy of this software and associated documentation files (the "Software"), 15 | // to deal in the Software without restriction, including without limitation 16 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 17 | // and/or sell copies of the Software, and to permit persons to whom the 18 | // Software is furnished to do so, subject to the following conditions: 19 | // 20 | // The above copyright notice and this permission notice shall be included 21 | // in all copies or substantial portions of the Software. 22 | // 23 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 24 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 26 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 29 | // DEALINGS IN THE SOFTWARE. 30 | /*****************************************************************************/ 31 | 32 | #include "TiffUnknownField.h" 33 | 34 | TiffUnknownField::TiffUnknownField(IFDEntry &entry) 35 | : TiffField(entry) 36 | { 37 | finitStatus = B_OK; 38 | } 39 | 40 | TiffUnknownField::~TiffUnknownField() 41 | { 42 | } 43 | -------------------------------------------------------------------------------- /src/add-ons/translators/tifftranslator/TiffUnknownField.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | // TiffUnknownField 3 | // Written by Michael Wilber, OBOS Translation Kit Team 4 | // 5 | // TiffUnknownField.h 6 | // 7 | // This object is for storing TIFF fields that the translator doesn't know 8 | // or doesn't care about 9 | // 10 | // 11 | // Copyright (c) 2003 OpenBeOS Project 12 | // 13 | // Permission is hereby granted, free of charge, to any person obtaining a 14 | // copy of this software and associated documentation files (the "Software"), 15 | // to deal in the Software without restriction, including without limitation 16 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 17 | // and/or sell copies of the Software, and to permit persons to whom the 18 | // Software is furnished to do so, subject to the following conditions: 19 | // 20 | // The above copyright notice and this permission notice shall be included 21 | // in all copies or substantial portions of the Software. 22 | // 23 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 24 | // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 26 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 28 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 29 | // DEALINGS IN THE SOFTWARE. 30 | /*****************************************************************************/ 31 | 32 | #ifndef TIFF_UNKNOWN_FIELD_H 33 | #define TIFF_UNKNOWN_FIELD_H 34 | 35 | #include "TiffField.h" 36 | 37 | class TiffUnknownField : public TiffField { 38 | public: 39 | TiffUnknownField(IFDEntry &entry); 40 | virtual ~TiffUnknownField(); 41 | }; 42 | 43 | #endif // TIFF_UNKNOWN_FIELD_H 44 | -------------------------------------------------------------------------------- /src/apps/Makefile.in: -------------------------------------------------------------------------------- 1 | # Recursively build the Cosmoe source tree 2 | # Copyright 2002-2004, Bill Hayden 3 | # Part of the Cosmoe project 4 | # http://www.cosmoe.com 5 | 6 | # broken apps: 7 | # cterm desktop 8 | 9 | SUBPROJECTS = bedate \ 10 | calc \ 11 | pulse \ 12 | testharness \ 13 | guido \ 14 | osutils 15 | 16 | include @top_srcdir@/Makefile.common 17 | -------------------------------------------------------------------------------- /src/apps/OpenTracker/Makefile: -------------------------------------------------------------------------------- 1 | # makefile for Tracker/Deskbar 2 | 3 | SUBDIRS = \ 4 | tracker \ 5 | deskbar 6 | 7 | default .DEFAULT : 8 | -@for f in $(SUBDIRS) ; do \ 9 | $(MAKE) -C $$f -f Makefile $@; \ 10 | done 11 | -------------------------------------------------------------------------------- /src/apps/OpenTracker/deskbar/AUTHORS: -------------------------------------------------------------------------------- 1 | Authors (mostly in chronological order): 2 | 3 | Hiroshi Lockheimer, 4 | Peter Potrebic, 5 | Robert Chinn, 6 | Pavel Cisler, 7 | Dianne Hackborn -------------------------------------------------------------------------------- /src/apps/OpenTracker/deskbar/Deskbar.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/apps/OpenTracker/deskbar/Deskbar.rsrc -------------------------------------------------------------------------------- /src/apps/OpenTracker/deskbar/Deskbar.wks: -------------------------------------------------------------------------------- 1 | # @Eddie Workset@ 2 | AddWorkset "Deskbar.wks" "/boot/home/src/OpenTracker/deskbar/Deskbar.wks" 3 | AddFileGroup "deskbar" "/boot/home/src/OpenTracker/deskbar" 4 | AddFile "BarApp.cpp" "/boot/home/src/OpenTracker/deskbar/BarApp.cpp" 5 | AddFile "BarMenuBar.cpp" "/boot/home/src/OpenTracker/deskbar/BarMenuBar.cpp" 6 | AddFile "BarMenuTitle.cpp" "/boot/home/src/OpenTracker/deskbar/BarMenuTitle.cpp" 7 | AddFile "BarView.cpp" "/boot/home/src/OpenTracker/deskbar/BarView.cpp" 8 | AddFile "BarWindow.cpp" "/boot/home/src/OpenTracker/deskbar/BarWindow.cpp" 9 | AddFile "BeMenu.cpp" "/boot/home/src/OpenTracker/deskbar/BeMenu.cpp" 10 | AddFile "DeskBarUtils.cpp" "/boot/home/src/OpenTracker/deskbar/DeskBarUtils.cpp" 11 | AddFile "ExpandoMenuBar.cpp" "/boot/home/src/OpenTracker/deskbar/ExpandoMenuBar.cpp" 12 | AddFile "ResourceSet.cpp" "/boot/home/src/OpenTracker/deskbar/ResourceSet.cpp" 13 | AddFile "ShowHideMenuItem.cpp" "/boot/home/src/OpenTracker/deskbar/ShowHideMenuItem.cpp" 14 | AddFile "StatusView.cpp" "/boot/home/src/OpenTracker/deskbar/StatusView.cpp" 15 | AddFile "StatusViewShelf.cpp" "/boot/home/src/OpenTracker/deskbar/StatusViewShelf.cpp" 16 | AddFile "Switcher.cpp" "/boot/home/src/OpenTracker/deskbar/Switcher.cpp" 17 | AddFile "TeamMenu.cpp" "/boot/home/src/OpenTracker/deskbar/TeamMenu.cpp" 18 | AddFile "TeamMenuItem.cpp" "/boot/home/src/OpenTracker/deskbar/TeamMenuItem.cpp" 19 | AddFile "TimeView.cpp" "/boot/home/src/OpenTracker/deskbar/TimeView.cpp" 20 | AddFile "WindowMenu.cpp" "/boot/home/src/OpenTracker/deskbar/WindowMenu.cpp" 21 | AddFile "WindowMenuItem.cpp" "/boot/home/src/OpenTracker/deskbar/WindowMenuItem.cpp" 22 | EndFileGroup "deskbar" 23 | AddFileGroup "resources" 24 | AddFile "Deskbar.rsrc" "/boot/home/src/OpenTracker/deskbar/Deskbar.rsrc" 25 | AddFile "icons.rsrc" "/boot/home/src/OpenTracker/deskbar/icons.rsrc" 26 | AddFile "icon-freelogo.rsrc" "/boot/home/src/OpenTracker/deskbar/icon-freelogo.rsrc" 27 | EndFileGroup "resources" 28 | -------------------------------------------------------------------------------- /src/apps/OpenTracker/deskbar/LICENSE: -------------------------------------------------------------------------------- 1 | Open Tracker License 2 | 3 | Terms and Conditions 4 | 5 | Copyright (c) 1991-2000, Be Incorporated. All rights reserved. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | this software and associated documentation files (the "Software"), to deal in 9 | the Software without restriction, including without limitation the rights to 10 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 11 | of the Software, and to permit persons to whom the Software is furnished to do 12 | so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice applies to all licensees 15 | and shall be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 20 | BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 21 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | Except as contained in this notice, the name of Be Incorporated shall not be 25 | used in advertising or otherwise to promote the sale, use or other dealings in 26 | this Software without prior written authorization from Be Incorporated. 27 | 28 | Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks 29 | of Be Incorporated in the United States and other countries. Other brand product 30 | names are registered trademarks or trademarks of their respective holders. 31 | All rights reserved. 32 | -------------------------------------------------------------------------------- /src/apps/OpenTracker/deskbar/icon-freelogo.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/apps/OpenTracker/deskbar/icon-freelogo.rsrc -------------------------------------------------------------------------------- /src/apps/OpenTracker/deskbar/icons.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** /src/open/deskbar/icons.h 3 | ** 4 | ** Automatically generated by BResourceParser on 5 | ** Friday, January 26, 2001 at 11:38:39. 6 | ** 7 | */ 8 | 9 | enum { 10 | R_LargeNewGroupIcon = 16, 11 | R_SmallNewGroupIcon = 17, 12 | R_TeamIcon = 18, 13 | R_GenericAppIcon = 19, 14 | R_WindowShownIcon = 20, 15 | R_WindowHiddenIcon = 21, 16 | R_ResizeIcon = 22, 17 | R_WindowShownSwitchIcon = 23, 18 | R_WindowHiddenSwitchIcon = 24 19 | }; 20 | -------------------------------------------------------------------------------- /src/apps/OpenTracker/deskbar/icons_logo.h: -------------------------------------------------------------------------------- 1 | enum { 2 | R_BeLogoIcon = 14 3 | }; 4 | -------------------------------------------------------------------------------- /src/apps/OpenTracker/shared/pr_server.h: -------------------------------------------------------------------------------- 1 | #ifndef _PR_SERVER_H_ 2 | #define _PR_SERVER_H_ 3 | 4 | // spool Attributes 5 | #define PSRV_SPOOL_ATTR_MIMETYPE "_spool/MimeType" 6 | #define PSRV_SPOOL_ATTR_PAGECOUNT "_spool/Page Count" 7 | #define PSRV_SPOOL_ATTR_DESCRIPTION "_spool/Description" 8 | #define PSRV_SPOOL_ATTR_PRINTER "_spool/Printer" 9 | #define PSRV_SPOOL_ATTR_STATUS "_spool/Status" 10 | #define PSRV_SPOOL_ATTR_ERRCODE "_spool/_errorcode" 11 | 12 | // printer attributes 13 | #define PSRV_PRINTER_ATTR_DRV_NAME "Driver Name" 14 | #define PSRV_PRINTER_ATTR_PRT_NAME "Printer Name" 15 | #define PSRV_PRINTER_ATTR_COMMENTS "Comments" 16 | #define PSRV_PRINTER_ATTR_STATE "state" 17 | #define PSRV_PRINTER_ATTR_TRANSPORT "transport" 18 | #define PSRV_PRINTER_ATTR_TRANSPORT_ADDR "transport_address" 19 | #define PSRV_PRINTER_ATTR_CNX "connection" 20 | #define PSRV_PRINTER_ATTR_PNP "_PNP" 21 | #define PSRV_PRINTER_ATTR_MDL "_MDL" 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /src/apps/OpenTracker/tracker/AUTHORS: -------------------------------------------------------------------------------- 1 | Authors (mostly in chronological order): 2 | 3 | Steve Horowitz, 4 | Pavel Cisler, 5 | Peter Potrebic, 6 | Jeff Bush, 7 | Robert Chinn, 8 | Doug Fulton, 9 | Kenny Carruthers, 10 | Dianne Hackborn -------------------------------------------------------------------------------- /src/apps/OpenTracker/tracker/LICENSE: -------------------------------------------------------------------------------- 1 | Open Tracker License 2 | 3 | Terms and Conditions 4 | 5 | Copyright (c) 1991-2000, Be Incorporated. All rights reserved. 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | this software and associated documentation files (the "Software"), to deal in 9 | the Software without restriction, including without limitation the rights to 10 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 11 | of the Software, and to permit persons to whom the Software is furnished to do 12 | so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice applies to all licensees 15 | and shall be included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 20 | BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 21 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | Except as contained in this notice, the name of Be Incorporated shall not be 25 | used in advertising or otherwise to promote the sale, use or other dealings in 26 | this Software without prior written authorization from Be Incorporated. 27 | 28 | Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks 29 | of Be Incorporated in the United States and other countries. Other brand product 30 | names are registered trademarks or trademarks of their respective holders. 31 | All rights reserved. 32 | 33 | -------------------------------------------------------------------------------- /src/apps/OpenTracker/tracker/Tests.h: -------------------------------------------------------------------------------- 1 | /* 2 | Open Tracker License 3 | 4 | Terms and Conditions 5 | 6 | Copyright (c) 1991-2000, Be Incorporated. All rights reserved. 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy of 9 | this software and associated documentation files (the "Software"), to deal in 10 | the Software without restriction, including without limitation the rights to 11 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 12 | of the Software, and to permit persons to whom the Software is furnished to do 13 | so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice applies to all licensees 16 | and shall be included in all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21 | BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 22 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION 23 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | Except as contained in this notice, the name of Be Incorporated shall not be 26 | used in advertising or otherwise to promote the sale, use or other dealings in 27 | this Software without prior written authorization from Be Incorporated. 28 | 29 | Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks 30 | of Be Incorporated in the United States and other countries. Other brand product 31 | names are registered trademarks or trademarks of their respective holders. 32 | All rights reserved. 33 | */ 34 | 35 | #if DEBUG 36 | void RunIconCacheTests(); 37 | #else 38 | inline void RunIconCacheTests() {} 39 | #endif 40 | -------------------------------------------------------------------------------- /src/apps/OpenTracker/tracker/Tracker.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/apps/OpenTracker/tracker/Tracker.rsrc -------------------------------------------------------------------------------- /src/apps/bedate/Makefile.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | bindir=${prefix}/bin 3 | 4 | CFLAGS = -g -c -Wall -Wno-multichar -Woverloaded-virtual -Wnon-virtual-dtor `cat @top_srcdir@/cosmoe.specs` 5 | CXXFLAGS = $(CFLAGS) 6 | 7 | CC = @CC@ 8 | CXX = @CXX@ 9 | EXE = bedate 10 | COSMOELIBDIR=@top_srcdir@/src/kits/objs 11 | 12 | OBJDIR := objs 13 | 14 | 15 | $(OBJDIR)/%.o : %.c 16 | $(CC) $(CFLAGS) $< -o $@ 17 | 18 | $(OBJDIR)/%.o : %.cpp 19 | $(CXX) $(CXXFLAGS) $< -o $@ 20 | 21 | 22 | OBJS := app.o disapp.o discordian.o disview.o diswindow.o julian.o 23 | OBJS := $(addprefix $(OBJDIR)/,$(OBJS)) 24 | 25 | 26 | $(EXE): objs $(OBJS) Makefile 27 | $(CXX) -g $(OBJS) -lstdc++ -L$(COSMOELIBDIR) -lcosmoe -o $(EXE) 28 | 29 | objs: 30 | mkdir objs 31 | 32 | install: $(EXE) $(bindir) 33 | cp -f $(EXE) $(bindir) 34 | strip --strip-all $(bindir)/$(EXE) 35 | 36 | $(bindir): 37 | mkdir -p $(bindir) 38 | 39 | clean: 40 | -rm $(EXE) $(OBJS) *~ 41 | 42 | distclean: clean 43 | -rm -f Makefile 44 | -------------------------------------------------------------------------------- /src/apps/bedate/app.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #include "diswindow.h" 4 | #include "disapp.h" 5 | 6 | int main () 7 | 8 | { 9 | DisApplication NewApplication; 10 | 11 | NewApplication.Run(); 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /src/apps/bedate/disapp.cpp: -------------------------------------------------------------------------------- 1 | /* This is DisApp.cpp*/ 2 | 3 | #include "disapp.h" 4 | #include "diswindow.h" 5 | #include "disview.h" 6 | 7 | #include "julian.h" 8 | #include "discordian.h" 9 | 10 | 11 | DisApplication::DisApplication() 12 | : BApplication ("application/x-vnd.dps-discordapp") // Make a new application bassed on the BApplication class 13 | { 14 | DisWindow *pDwindow; // Gimmie a window to put it in 15 | BRect aRect; // Gimmie a BRect that defines the window 16 | 17 | aRect.Set(30,100,640,125); // Left, Top, Right and Bottom borders of the Window 18 | pDwindow = new DisWindow (aRect); // Gimmie a new window bassed on DisWindow 19 | 20 | pDwindow->Show(); // Show me da Window! 21 | } 22 | -------------------------------------------------------------------------------- /src/apps/bedate/disapp.h: -------------------------------------------------------------------------------- 1 | #ifndef _DISAPP_H 2 | #define _DISAPP_H 3 | 4 | #include 5 | 6 | 7 | 8 | class DisApplication : public BApplication 9 | { 10 | public : 11 | DisApplication(); 12 | virtual ~DisApplication(){}; 13 | }; 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/apps/bedate/discordian.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _STRING_H 3 | #include 4 | #endif 5 | 6 | #ifndef _DISCORDIAN_H 7 | #define _DISCORDIAN_H 8 | 9 | const int STRING_SIZE = 90; 10 | typedef char str[STRING_SIZE]; 11 | 12 | class juletodis 13 | { 14 | public : 15 | void todis (str outstr); 16 | 17 | private: 18 | void teens (int dayoseason, str outstr); 19 | }; 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /src/apps/bedate/disview.cpp: -------------------------------------------------------------------------------- 1 | 2 | #ifndef DIS_VIEW_H 3 | #include "disview.h" 4 | #endif 5 | 6 | #include 7 | 8 | DisView::DisView(BRect aRect, 9 | const char *name, 10 | const char *text) 11 | : BStringView ( aRect, 12 | name, 13 | text, 14 | B_FOLLOW_ALL_SIDES, 15 | B_WILL_DRAW) 16 | // Gimmie a view bassed on BStringView 17 | { 18 | //SetFont(be_bold_font); // set font 19 | SetFontSize(16); // set size 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /src/apps/bedate/disview.h: -------------------------------------------------------------------------------- 1 | /*This is Disview.h*/ 2 | #ifndef DIS_VIEW_H 3 | #define DIS_VIEW_H 4 | 5 | #ifndef _STRING_VIEW_H 6 | #include 7 | #endif 8 | 9 | 10 | 11 | class DisView : public BStringView 12 | { 13 | public: 14 | DisView (BRect aRect, const char *name, const char *text); 15 | virtual ~DisView(){}; 16 | }; 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/apps/bedate/diswindow.cpp: -------------------------------------------------------------------------------- 1 | /*This is diswindow.cpp*/ 2 | 3 | #include 4 | #include "diswindow.h" 5 | #include "disview.h" 6 | #include "discordian.h" 7 | 8 | #include 9 | #include 10 | 11 | 12 | DisWindow::DisWindow (BRect aRect) 13 | : BWindow ( aRect,"Discordian Calendar", B_TITLED_WINDOW, B_NOT_V_RESIZABLE) 14 | // make a window (DisWindow) based on BWindow class 15 | 16 | { // make this stuff see AddChild Below 17 | 18 | str Astring = ""; // Gimmie a new empty string 19 | DisView *pMyView; // Gimmie a new pointer to a view called pMyView - I put p in 20 | // front of a variable to designate that it is a pointer 21 | juletodis fluffy; 22 | 23 | fluffy.todis(Astring); // dump the return of Fluffy subroutine todis to Astring 24 | BRect bRect ( Bounds()); // Gimmie a rect based on the window's bounds 25 | pMyView = new DisView(bRect, "aView", Astring); // Make a view with aRect borders, called aView, 26 | // Dump Astring into it 27 | 28 | AddChild( pMyView ); // Attach the above stuff to the window 29 | 30 | 31 | return; 32 | } 33 | 34 | bool DisWindow :: QuitRequested() 35 | { 36 | be_app->PostMessage(B_QUIT_REQUESTED); // if you say Quit, Quit 37 | return (true); 38 | } 39 | -------------------------------------------------------------------------------- /src/apps/bedate/diswindow.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef DIS_WINDOW_H 3 | #define DIS_WINDOW_H 4 | 5 | #include 6 | 7 | 8 | 9 | class DisWindow : public BWindow 10 | { 11 | public : 12 | DisWindow (BRect aRect); 13 | virtual ~DisWindow (){}; 14 | virtual bool QuitRequested(); 15 | private : 16 | }; 17 | #endif 18 | -------------------------------------------------------------------------------- /src/apps/bedate/julian.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _TIME_H 3 | #include 4 | #endif 5 | 6 | class juletime 7 | { 8 | public : 9 | void getjuletime (int& juleday, int& juleyear); 10 | 11 | private : 12 | void systojule (int& juleday, int& juleyear); 13 | int exp (int number, int exponent); 14 | }; 15 | 16 | -------------------------------------------------------------------------------- /src/apps/calc/CalcEngine.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/apps/calc/CalcEngine.cpp -------------------------------------------------------------------------------- /src/apps/calc/CalcEngine.h: -------------------------------------------------------------------------------- 1 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 2 | #ifndef __CALC_ENGINE__ 3 | #define __CALC_ENGINE__ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 11 | typedef unsigned long ulong; 12 | 13 | class CalcEngine 14 | { 15 | public: 16 | CalcEngine(int max_digits = 12); 17 | virtual ~CalcEngine(); 18 | 19 | void DoCommand(ulong key); 20 | double GetValue(char *val=NULL); 21 | void Clear(void); 22 | 23 | bool TrigInverseActive() { return trig_inverse_active; }; 24 | bool TrigIsRadians() { return trig_is_radians; }; 25 | 26 | virtual bool TextWidthOK(const char *text); 27 | 28 | private: 29 | 30 | enum { max_stack_size = 20 }; 31 | enum { mode_start=0, mode_input }; 32 | 33 | char text[64]; 34 | double keyed_value; 35 | 36 | void SetValue(double d) { keyed_value=d; text[0]='\0'; }; 37 | void SetValue(const char *str) { keyed_value=0; strcpy(text,str);}; 38 | void Append(char c) { char *p=text+strlen(text); *p++=c; *p='\0'; }; 39 | 40 | double DoStackedCalculation(); 41 | void PushKeyedValue(); 42 | void PushSymbol(ulong sym); 43 | 44 | int max_digits; 45 | bool trig_inverse_active; 46 | bool trig_is_radians; 47 | bool already_have_infix; 48 | 49 | int number_stack_index; 50 | double number_stack[max_stack_size]; 51 | int symbol_stack_index; 52 | ulong symbol_stack[max_stack_size]; 53 | 54 | double TrigAngleInput(double d) { return trig_is_radians?d:M_PI/180*d; }; 55 | double TrigAngleOutput(double d) { return trig_is_radians?d:180/M_PI*d; }; 56 | }; 57 | 58 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 59 | 60 | 61 | 62 | 63 | #endif /* __CACL_ENGINE__ */ 64 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 65 | -------------------------------------------------------------------------------- /src/apps/calc/CalcView.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/apps/calc/CalcView.cpp -------------------------------------------------------------------------------- /src/apps/calc/CalcView.h: -------------------------------------------------------------------------------- 1 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 2 | #ifndef __CALC_VIEW__ 3 | #define __CALC_VIEW__ 4 | 5 | #include 6 | #include 7 | #include 8 | #include "FrameView.h" 9 | #include "CalcEngine.h" 10 | 11 | 12 | 13 | 14 | 15 | class CalcView : public BView 16 | { 17 | 18 | public: 19 | static void About(void); 20 | 21 | 22 | static float TheWidth() { return 272; } 23 | static float TheHeight() { return 284; } 24 | static BRect TheRect() { return TheRect(0,0); } 25 | static BRect TheRect(const BPoint &pt) { return TheRect(pt.x,pt.y); } 26 | static BRect TheRect(float x, float y) { return BRect(x,y,x+TheWidth(),y+TheHeight()); } 27 | static float ExtraHeight() { return 43; } 28 | 29 | 30 | CalcView(BRect frame); 31 | virtual ~CalcView(); 32 | 33 | 34 | virtual void AttachedToWindow(); 35 | virtual void AllAttached(); 36 | 37 | virtual void KeyDown(const char *bytes, int32 numBytes); 38 | virtual void MouseDown(BPoint where); 39 | virtual void WindowActivated(bool state); 40 | virtual void MakeFocus(bool focusState = true); 41 | 42 | virtual void MessageReceived(BMessage *message); 43 | 44 | void SendKeystroke(ulong key); 45 | 46 | virtual bool TextWidthOK(const char *str); 47 | 48 | BView *AddExtra(); 49 | 50 | private: 51 | void Init(void); 52 | 53 | CalcEngine calc; 54 | 55 | int current_highlight; 56 | enum { state_unknown=0, state_active, state_inactive }; 57 | void ChangeHighlight(); 58 | 59 | 60 | FrameView *lcd_frame; 61 | BStringView *lcd; 62 | BStringView *binary_sign_view; 63 | BStringView *binary_exponent_view; 64 | BStringView *binary_number_view; 65 | }; 66 | 67 | 68 | 69 | #endif 70 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 71 | -------------------------------------------------------------------------------- /src/apps/calc/CalcWindow.cpp: -------------------------------------------------------------------------------- 1 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 2 | 3 | #include "Calculator.h" 4 | #include "CalcWindow.h" 5 | #include "CalcView.h" 6 | 7 | 8 | 9 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 10 | CalcWindow::CalcWindow(BPoint pt) 11 | : BWindow(CalcView::TheRect(pt), "Calculator", 12 | B_TITLED_WINDOW, B_NOT_H_RESIZABLE) 13 | { 14 | BRect r = CalcView::TheRect(); 15 | 16 | SetSizeLimits(r.right, r.right, r.bottom, r.bottom+CalcView::ExtraHeight()); 17 | //SetZoomLimits(r.right, r.bottom+CalcView::ExtraHeight()); 18 | 19 | calc_view = new CalcView(r); 20 | AddChild(calc_view); 21 | 22 | BView *extraView = calc_view->AddExtra(); 23 | AddChild(extraView); 24 | } 25 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 26 | bool CalcWindow::QuitRequested() 27 | { 28 | be_app->PostMessage(B_QUIT_REQUESTED); 29 | return true; 30 | } 31 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 32 | -------------------------------------------------------------------------------- /src/apps/calc/CalcWindow.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __CALC_WINDOW__ 3 | #define __CALC_WINDOW__ 4 | 5 | #include 6 | #include 7 | 8 | #include "CalcView.h" 9 | 10 | 11 | 12 | 13 | 14 | class CalcWindow : public BWindow 15 | { 16 | 17 | public: 18 | CalcWindow(BPoint pt); 19 | virtual bool QuitRequested(); 20 | 21 | private: 22 | 23 | CalcView *calc_view; 24 | 25 | }; 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /src/apps/calc/Calculator.cpp: -------------------------------------------------------------------------------- 1 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 2 | #include 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "Calculator.h" 10 | #include "CalcWindow.h" 11 | 12 | 13 | 14 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 15 | int main(int argc, char **argv) 16 | { 17 | CalculatorApp app; 18 | app.Run(); 19 | 20 | return B_NO_ERROR; 21 | } 22 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 23 | CalculatorApp::CalculatorApp() 24 | : BApplication("application/x-vnd.Cosmoecalc") 25 | { 26 | wind = new CalcWindow(BPoint(20.0f, 70.0f)); 27 | wind->Show(); 28 | } 29 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 30 | void CalculatorApp::AboutRequested() 31 | { 32 | CalcView::About(); 33 | } 34 | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ 35 | -------------------------------------------------------------------------------- /src/apps/calc/Calculator.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __CALCULATOR__ 3 | #define __CALCULATOR__ 4 | 5 | #include 6 | 7 | 8 | 9 | 10 | 11 | class CalculatorApp : public BApplication 12 | { 13 | 14 | public: 15 | CalculatorApp(); 16 | virtual void AboutRequested(); 17 | 18 | private: 19 | 20 | BWindow *wind; 21 | 22 | }; 23 | 24 | 25 | 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /src/apps/calc/Calculator_x86.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/apps/calc/Calculator_x86.rsrc -------------------------------------------------------------------------------- /src/apps/calc/FrameView.h: -------------------------------------------------------------------------------- 1 | #ifndef __FRAME_VIEW__ 2 | #define __FRAME_VIEW__ 3 | 4 | #ifndef _VIEW_H 5 | #include 6 | #endif 7 | 8 | 9 | 10 | 11 | class FrameView : public BView 12 | { 13 | 14 | public: 15 | FrameView(BRect frame, const char *name, 16 | ulong resizeMask, int bevel_indent=1); 17 | 18 | virtual void Draw(BRect updateRect); 19 | virtual void FrameResized(float new_width, float new_height); 20 | virtual void AttachedToWindow(); 21 | 22 | void ColoringBasis(rgb_color view_color); 23 | 24 | 25 | typedef struct 26 | { 27 | char *label; 28 | ulong message; 29 | } ClusterInfo; 30 | 31 | FrameView(const BPoint &where, const char *name, 32 | uint32 resizeMask, 33 | int items_wide, int items_high, int bevel, 34 | int key_border, int key_height, int key_width, 35 | const ClusterInfo button_info[]); 36 | 37 | private: 38 | int bevel_indent; 39 | }; 40 | 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /src/apps/calc/Makefile.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | bindir=${prefix}/bin 3 | 4 | CFLAGS = -g -c -Wall -Wno-multichar `cat @top_srcdir@/cosmoe.specs` 5 | CXXFLAGS = $(CFLAGS) 6 | 7 | CC = @CC@ 8 | CXX = @CXX@ 9 | EXE = calc 10 | COSMOELIBDIR=@top_srcdir@/src/kits/objs 11 | 12 | OBJDIR := objs 13 | 14 | 15 | $(OBJDIR)/%.o : %.c 16 | $(CC) $(CFLAGS) $< -o $@ 17 | 18 | $(OBJDIR)/%.o : %.cpp 19 | $(CXX) $(CXXFLAGS) $< -o $@ 20 | 21 | 22 | OBJS := Calculator.o CalcEngine.o CalcView.o CalcWindow.o FrameView.o 23 | OBJS := $(addprefix $(OBJDIR)/,$(OBJS)) 24 | 25 | 26 | $(EXE): objs $(OBJS) Makefile 27 | $(CC) -g $(OBJS) -lstdc++ -L$(COSMOELIBDIR) -lcosmoe -lm -o $(EXE) 28 | 29 | objs: 30 | mkdir objs 31 | 32 | install: $(EXE) $(bindir) 33 | cp -f $(EXE) $(bindir) 34 | strip --strip-all $(bindir)/$(EXE) 35 | 36 | $(bindir): 37 | mkdir -p $(bindir) 38 | 39 | clean: 40 | -rm $(EXE) $(OBJS) *~ 41 | 42 | distclean: clean 43 | -rm -f Makefile 44 | 45 | .PHONY: clean distclean deps doc install uninstall all 46 | -------------------------------------------------------------------------------- /src/apps/cterm/Makefile: -------------------------------------------------------------------------------- 1 | prefix= 2 | bindir=${prefix}/bin 3 | 4 | CFLAGS = -g -c -Wall -Wno-multichar -Woverloaded-virtual -Wnon-virtual-dtor `cat ../../cosmoe.specs` 5 | 6 | OBJS = main.o tview.o 7 | EXE = cterm 8 | COSMOELIBDIR = ../../libcosmoe/objs 9 | 10 | CXX = g++ 11 | LD = g++ 12 | 13 | all: $(EXE) 14 | 15 | $(EXE): $(OBJS) 16 | $(LD) $(OBJS) -L$(COSMOELIBDIR) -lcosmoe -ldl -lpthread -o $@ 17 | 18 | install: $(EXE) $(bindir) 19 | cp -f $(EXE) $(bindir) 20 | 21 | $(bindir): 22 | mkdir -p $(bindir) 23 | 24 | clean: 25 | -rm -f $(EXE) $(OBJS) *~ 26 | 27 | distclean: clean 28 | -rm -f Makefile 29 | 30 | .cpp.o: 31 | $(CXX) $(CFLAGS) $< -o $@ 32 | 33 | main.o: main.cpp tview.h 34 | tview.o: tview.cpp tview.h 35 | -------------------------------------------------------------------------------- /src/apps/cterm/Makefile.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | bindir=${prefix}/bin 3 | 4 | CFLAGS = -g -c -Wall -Wno-multichar -Woverloaded-virtual -Wnon-virtual-dtor `cat @top_srcdir@/cosmoe.specs` 5 | 6 | OBJS = main.o tview.o 7 | EXE = cterm 8 | COSMOELIBDIR = @top_srcdir@/src/kits/objs 9 | 10 | CXX = @CXX@ 11 | LD = @CXX@ 12 | 13 | all: $(EXE) 14 | 15 | $(EXE): $(OBJS) Makefile 16 | $(LD) $(OBJS) -L$(COSMOELIBDIR) -lcosmoe -o $@ 17 | 18 | install: $(EXE) $(bindir) 19 | cp -f $(EXE) $(bindir) 20 | 21 | $(bindir): 22 | mkdir -p $(bindir) 23 | 24 | clean: 25 | -rm -f $(EXE) $(OBJS) *~ 26 | 27 | distclean: clean 28 | -rm -f Makefile 29 | 30 | .cpp.o: 31 | $(CXX) $(CFLAGS) $< -o $@ 32 | 33 | main.o: main.cpp tview.h 34 | tview.o: tview.cpp tview.h 35 | 36 | .PHONY: clean distclean deps doc install uninstall all -------------------------------------------------------------------------------- /src/apps/cterm/config.log: -------------------------------------------------------------------------------- 1 | 2 | ## ---------------------- ## 3 | ## Running config.status. ## 4 | ## ---------------------- ## 5 | 6 | This file was extended by config.status, which was 7 | generated by GNU Autoconf 2.57. Invocation command line was 8 | 9 | CONFIG_FILES = 10 | CONFIG_HEADERS = 11 | CONFIG_LINKS = 12 | CONFIG_COMMANDS = 13 | $ ../../config.status ./Makefile 14 | 15 | on billh.mmrd.com 16 | 17 | config.status:421: error: invalid argument: ./Makefile 18 | 19 | ## ---------------------- ## 20 | ## Running config.status. ## 21 | ## ---------------------- ## 22 | 23 | This file was extended by config.status, which was 24 | generated by GNU Autoconf 2.57. Invocation command line was 25 | 26 | CONFIG_FILES = 27 | CONFIG_HEADERS = 28 | CONFIG_LINKS = 29 | CONFIG_COMMANDS = 30 | $ ../../config.status Makefile 31 | 32 | on billh.mmrd.com 33 | 34 | config.status:668: creating Makefile 35 | 36 | ## ---------------------- ## 37 | ## Running config.status. ## 38 | ## ---------------------- ## 39 | 40 | This file was extended by config.status, which was 41 | generated by GNU Autoconf 2.57. Invocation command line was 42 | 43 | CONFIG_FILES = 44 | CONFIG_HEADERS = 45 | CONFIG_LINKS = 46 | CONFIG_COMMANDS = 47 | $ ../../config.status Makefile 48 | 49 | on billh.mmrd.com 50 | 51 | config.status:668: creating Makefile 52 | -------------------------------------------------------------------------------- /src/apps/desktop/Makefile: -------------------------------------------------------------------------------- 1 | prefix= 2 | bindir=${prefix}/bin 3 | 4 | CFLAGS = -g -c -Wall -Wno-multichar -Woverloaded-virtual -Wnon-virtual-dtor `cat ../../cosmoe.specs` 5 | CXXFLAGS = $(CFLAGS) 6 | 7 | CC = gcc 8 | CXX = g++ 9 | EXE = desktop 10 | COSMOELIBDIR=../../libcosmoe/objs 11 | 12 | OBJDIR := objs 13 | 14 | 15 | $(OBJDIR)/%.o : %.c 16 | $(CC) $(CFLAGS) $< -o $@ 17 | 18 | $(OBJDIR)/%.o : %.cpp 19 | $(CXX) $(CXXFLAGS) $< -o $@ 20 | 21 | 22 | OBJS := main.o iconview.o jpeg.o 23 | OBJS := $(addprefix $(OBJDIR)/,$(OBJS)) 24 | 25 | 26 | $(EXE): objs $(OBJS) 27 | $(CXX) -g $(OBJS) -L/usr/local/lib -lstdc++ -L$(COSMOELIBDIR) -lcosmoe -ljpeg -ldl -lpthread -o $(EXE) 28 | 29 | objs: 30 | mkdir objs 31 | 32 | install: $(EXE) 33 | cp -f $(EXE) $(bindir) 34 | strip --strip-all $(bindir)/$(EXE) 35 | 36 | $(bindir): 37 | mkdir -p $(bindir) 38 | 39 | clean: 40 | -rm $(EXE) $(OBJS) *~ 41 | 42 | distclean: clean 43 | -rm -f Makefile 44 | 45 | main.o: main.cpp iconview.h 46 | jpeg.o: jpeg.cpp 47 | -------------------------------------------------------------------------------- /src/apps/desktop/Makefile.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | bindir=${prefix}/bin 3 | 4 | CFLAGS = -g -c -Wall -Wno-multichar -Woverloaded-virtual -Wnon-virtual-dtor `cat @top_srcdir@/cosmoe.specs` 5 | CXXFLAGS = $(CFLAGS) 6 | 7 | CC = @CC@ 8 | CXX = @CXX@ 9 | EXE = desktop 10 | COSMOELIBDIR=@top_srcdir@/src/kits/objs 11 | 12 | OBJDIR := objs 13 | 14 | 15 | $(OBJDIR)/%.o : %.c 16 | $(CC) $(CFLAGS) $< -o $@ 17 | 18 | $(OBJDIR)/%.o : %.cpp 19 | $(CXX) $(CXXFLAGS) $< -o $@ 20 | 21 | 22 | OBJS := main.o iconview.o jpeg.o 23 | OBJS := $(addprefix $(OBJDIR)/,$(OBJS)) 24 | 25 | 26 | $(EXE): objs $(OBJS) Makefile 27 | $(CXX) -g $(OBJS) -L$(COSMOELIBDIR) -lcosmoe -ljpeg -o $(EXE) 28 | 29 | objs: 30 | mkdir objs 31 | 32 | install: $(EXE) 33 | cp -f $(EXE) $(bindir) 34 | strip --strip-all $(bindir)/$(EXE) 35 | 36 | $(bindir): 37 | mkdir -p $(bindir) 38 | 39 | clean: 40 | -rm $(EXE) $(OBJS) *~ 41 | 42 | distclean: clean 43 | -rm -f Makefile 44 | 45 | main.o: main.cpp iconview.h 46 | jpeg.o: jpeg.cpp 47 | 48 | .PHONY: clean distclean deps doc install uninstall all -------------------------------------------------------------------------------- /src/apps/desktop/icon.h: -------------------------------------------------------------------------------- 1 | #ifndef __F_ICON_H__ 2 | #define __F_ICON_H__ 3 | 4 | void ConvertIcon( Bitmap* pcDst, const uint8* pSrc, bool bLarge ); 5 | Bitmap* load_jpeg( const char* pzPath ); 6 | 7 | 8 | #endif // __F_ICON_H__ 9 | -------------------------------------------------------------------------------- /src/apps/guido/Makefile.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | bindir=$(prefix)/bin 3 | 4 | CFLAGS = -g -c -Wall -Wno-multichar `cat @top_srcdir@/cosmoe.specs` 5 | CXXFLAGS = $(CFLAGS) -Woverloaded-virtual -Wnon-virtual-dtor 6 | 7 | CC = @CC@ 8 | CXX = @CXX@ 9 | EXE = guido 10 | COSMOELIBDIR=@top_srcdir@/src/kits/objs 11 | 12 | OBJDIR := objs 13 | 14 | 15 | $(OBJDIR)/%.o : %.c 16 | $(CC) $(CFLAGS) $< -o $@ 17 | 18 | $(OBJDIR)/%.o : %.cpp 19 | $(CXX) $(CXXFLAGS) $< -o $@ 20 | 21 | 22 | OBJS := app.o disapp.o diswindow.o 23 | OBJS := $(addprefix $(OBJDIR)/,$(OBJS)) 24 | 25 | 26 | $(EXE): objs $(OBJS) Makefile 27 | $(CXX) -g $(OBJS) -L$(COSMOELIBDIR) -lcosmoe -o $(EXE) 28 | 29 | objs: 30 | mkdir objs 31 | 32 | install: $(EXE) $(bindir) 33 | cp -f $(EXE) $(bindir) 34 | strip --strip-all $(bindir)/$(EXE) 35 | 36 | $(bindir): 37 | mkdir -p $(bindir) 38 | 39 | clean: 40 | -rm $(EXE) $(OBJS) *~ 41 | 42 | distclean: clean 43 | -rm -f Makefile 44 | 45 | .PHONY: clean distclean deps doc install uninstall all -------------------------------------------------------------------------------- /src/apps/guido/app.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | */ 3 | #include "diswindow.h" 4 | #include "disapp.h" 5 | 6 | int main () 7 | 8 | { 9 | DisApplication NewApplication; 10 | 11 | NewApplication.Run(); 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /src/apps/guido/disapp.cpp: -------------------------------------------------------------------------------- 1 | /* This is DisApp.cpp*/ 2 | 3 | #include "disapp.h" 4 | #include "diswindow.h" 5 | 6 | 7 | DisApplication::DisApplication() 8 | : BApplication ("application/x-vnd.Guido") // Make a new application bassed on the BApplication class 9 | { 10 | DisWindow *pDwindow; // Gimmie a window to put it in 11 | BRect aRect; // Gimmie a BRect that defines the window 12 | 13 | aRect.Set(30,100,440,400); // Left, Top, Right and Bottom borders of the Window 14 | pDwindow = new DisWindow (aRect); // Gimmie a new window based on DisWindow 15 | pDwindow->Populate(); 16 | pDwindow->Show(); // Show me da Window! 17 | } 18 | -------------------------------------------------------------------------------- /src/apps/guido/disapp.h: -------------------------------------------------------------------------------- 1 | #ifndef _DISAPP_H 2 | #define _DISAPP_H 3 | 4 | #include 5 | 6 | 7 | 8 | class DisApplication : public BApplication 9 | { 10 | public : 11 | DisApplication(); 12 | virtual ~DisApplication(){}; 13 | }; 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /src/apps/guido/diswindow.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef DIS_WINDOW_H 3 | #define DIS_WINDOW_H 4 | 5 | #include 6 | #include 7 | 8 | 9 | 10 | class DisWindow : public BWindow 11 | { 12 | public: 13 | DisWindow (BRect aRect); 14 | virtual ~DisWindow() {}; 15 | 16 | virtual bool QuitRequested(); 17 | virtual void MessageReceived(BMessage* message); 18 | 19 | void Populate(); 20 | private: 21 | void SetupMenus(); 22 | 23 | BMenuBar* mMenuBar; 24 | }; 25 | #endif 26 | -------------------------------------------------------------------------------- /src/apps/osutils/Makefile.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | bindir=${prefix}/bin 3 | 4 | CFLAGS = -g -c -Wall -Wno-multichar `cat @top_srcdir@/cosmoe.specs` 5 | CXXFLAGS = $(CFLAGS) 6 | 7 | CC = @CC@ 8 | CXX = @CXX@ 9 | EXE = seminfo portinfo 10 | COSMOELIBDIR=@top_srcdir@/src/kits/objs 11 | 12 | OBJDIR := objs 13 | 14 | 15 | $(OBJDIR)/%.o : %.c 16 | $(CC) $(CFLAGS) $< -o $@ 17 | 18 | $(OBJDIR)/%.o : %.cpp 19 | $(CXX) $(CXXFLAGS) $< -o $@ 20 | 21 | 22 | OBJS := seminfo.o portinfo.o 23 | 24 | all: $(EXE) 25 | 26 | seminfo: seminfo.o 27 | $(CXX) seminfo.o -L$(COSMOELIBDIR) -lcosmoe -o seminfo 28 | 29 | portinfo: portinfo.o 30 | $(CXX) portinfo.o -L$(COSMOELIBDIR) -lcosmoe -o portinfo 31 | 32 | objs: 33 | mkdir objs 34 | 35 | install: $(EXE) $(bindir) 36 | cp -f seminfo $(bindir) 37 | cp -f portinfo $(bindir) 38 | strip --strip-all $(bindir)/seminfo 39 | strip --strip-all $(bindir)/portinfo 40 | 41 | $(bindir): 42 | mkdir -p $(bindir) 43 | 44 | clean: 45 | -rm $(EXE) $(OBJS) *~ 46 | 47 | distclean: clean 48 | -rm -f Makefile 49 | 50 | seminfo.o : seminfo.cpp 51 | 52 | portinfo.o : portinfo.cpp 53 | 54 | .PHONY: clean distclean all install 55 | -------------------------------------------------------------------------------- /src/apps/osutils/portinfo.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char **argv) 4 | { 5 | dump_port_info(argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /src/apps/osutils/seminfo.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(int argc, char **argv) 4 | { 5 | dump_sem_info(argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /src/apps/pulse/BottomPrefsView.cpp: -------------------------------------------------------------------------------- 1 | //**************************************************************************************** 2 | // 3 | // File: BottomPrefsView.cpp 4 | // 5 | // Written by: Daniel Switkin 6 | // 7 | // Copyright 1999, Be Incorporated 8 | // 9 | // Revised by: Steffen Yount 10 | // 11 | //**************************************************************************************** 12 | 13 | #include "BottomPrefsView.h" 14 | #include "Common.h" 15 | #include 16 | #include 17 | 18 | BottomPrefsView::BottomPrefsView(BRect rect, const char *name) : 19 | BView(rect, name, B_FOLLOW_NONE, B_WILL_DRAW) { 20 | 21 | // Set the background color dynamically, don't hardcode 216, 216, 216 22 | SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); 23 | 24 | BRect r = Bounds(); 25 | r.right -= 13; 26 | r.left = r.right - 75; 27 | r.top += 10; 28 | r.bottom = r.top + 24; 29 | BButton *ok = new BButton(r, "OKButton", "OK", new BMessage(PRV_BOTTOM_OK)); 30 | AddChild(ok); 31 | 32 | r.right = r.left - 10; 33 | r.left = r.right - 75; 34 | BButton *defaults = new BButton(r, "DefaultsButton", "Defaults", new BMessage(PRV_BOTTOM_DEFAULTS)); 35 | AddChild(defaults); 36 | 37 | ok->MakeDefault(true); 38 | } 39 | 40 | // Do a little drawing to fit better with BTabView 41 | void BottomPrefsView::Draw(BRect rect) { 42 | PushState(); 43 | 44 | BRect bounds = Bounds(); 45 | SetHighColor(255, 255, 255, 255); 46 | StrokeLine(BPoint(0, 0), BPoint(bounds.right - 1, 0)); 47 | StrokeLine(BPoint(0, 0), BPoint(0, bounds.bottom - 1)); 48 | SetHighColor(96, 96, 96, 255); 49 | StrokeLine(BPoint(bounds.right, 0), BPoint(bounds.right, bounds.bottom)); 50 | StrokeLine(BPoint(0, bounds.bottom), BPoint(bounds.right, bounds.bottom)); 51 | 52 | PopState(); 53 | } 54 | -------------------------------------------------------------------------------- /src/apps/pulse/BottomPrefsView.h: -------------------------------------------------------------------------------- 1 | //**************************************************************************************** 2 | // 3 | // File: BottomPrefsView.h 4 | // 5 | // Written by: Daniel Switkin 6 | // 7 | // Copyright 1999, Be Incorporated 8 | // 9 | // Revised by: Steffen Yount 10 | // 11 | //**************************************************************************************** 12 | 13 | #ifndef BOTTOMPREFSVIEW_H 14 | #define BOTTOMPREFSVIEW_H 15 | 16 | #include 17 | #include "Prefs.h" 18 | 19 | 20 | 21 | 22 | 23 | class BottomPrefsView : public BView { 24 | public: 25 | BottomPrefsView(BRect rect, const char *name); 26 | void Draw(BRect rect); 27 | }; 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /src/apps/pulse/CPUButton.h: -------------------------------------------------------------------------------- 1 | //**************************************************************************************** 2 | // 3 | // File: CPUButton.h 4 | // 5 | // Written by: Daniel Switkin 6 | // 7 | // Copyright 1999, Be Incorporated 8 | // 9 | // Revised by: Steffen Yount 10 | // 11 | //**************************************************************************************** 12 | 13 | #ifndef CPUBUTTON_H 14 | #define CPUBUTTON_H 15 | 16 | #include 17 | #include 18 | 19 | class CPUButton : public BControl { 20 | public: 21 | CPUButton(BRect rect, const char *name, const char *label, BMessage *message); 22 | CPUButton(BMessage *message); 23 | void Draw(BRect rect); 24 | void MouseDown(BPoint point); 25 | void MouseUp(BPoint point); 26 | void MouseMoved(BPoint point, uint32 transit, const BMessage *message); 27 | ~CPUButton(); 28 | 29 | status_t Invoke(BMessage *message = NULL); 30 | static CPUButton *Instantiate(BMessage *data); 31 | status_t Archive(BMessage *data, bool deep = true) const; 32 | void MessageReceived(BMessage *message); 33 | 34 | void UpdateColors(int32 color); 35 | void AttachedToWindow(); 36 | 37 | private: 38 | rgb_color on_color, off_color; 39 | bool replicant; 40 | BMessageRunner *messagerunner; 41 | }; 42 | 43 | #endif 44 | 45 | -------------------------------------------------------------------------------- /src/apps/pulse/ConfigView.h: -------------------------------------------------------------------------------- 1 | //**************************************************************************************** 2 | // 3 | // File: ConfigView.h 4 | // 5 | // Written by: Daniel Switkin 6 | // 7 | // Copyright 1999, Be Incorporated 8 | // 9 | // Revised by: Steffen Yount 10 | // 11 | //**************************************************************************************** 12 | 13 | #ifndef CONFIGVIEW_H 14 | #define CONFIGVIEW_H 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include "Prefs.h" 21 | 22 | 23 | 24 | 25 | 26 | class RTColorControl : public BColorControl { 27 | public: 28 | RTColorControl(BPoint point, BMessage *message); 29 | void SetValue(int32 color); 30 | }; 31 | 32 | class ConfigView : public BView { 33 | public: 34 | ConfigView(BRect rect, const char *name, int mode, Prefs *prefs); 35 | void AttachedToWindow(); 36 | void MessageReceived(BMessage *message); 37 | void UpdateDeskbarIconWidth(); 38 | 39 | private: 40 | void ResetDefaults(); 41 | bool first_time_attached; 42 | int mode; 43 | 44 | RTColorControl *colorcontrol; 45 | // For Normal 46 | BCheckBox *fadecolors; 47 | // For Mini and Deskbar 48 | BRadioButton *active, *idle, *frame; 49 | // For Deskbar 50 | BTextControl *iconwidth; 51 | }; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/apps/pulse/DeskbarPulseView.h: -------------------------------------------------------------------------------- 1 | //**************************************************************************************** 2 | // 3 | // File: DeskbarPulseView.h 4 | // 5 | // Written by: Daniel Switkin 6 | // 7 | // Copyright 1999, Be Incorporated 8 | // 9 | //**************************************************************************************** 10 | 11 | #ifndef DESKBARPULSEVIEW_H 12 | #define DESKBARPULSEVIEW_H 13 | 14 | #include "MiniPulseView.h" 15 | #include "PrefsWindow.h" 16 | #include 17 | 18 | class DeskbarPulseView : public MiniPulseView { 19 | public: 20 | DeskbarPulseView(BRect rect); 21 | DeskbarPulseView(BMessage *message); 22 | ~DeskbarPulseView(); 23 | void MouseDown(BPoint point); 24 | void AttachedToWindow(); 25 | void Pulse(); 26 | 27 | void MessageReceived(BMessage *message); 28 | static DeskbarPulseView *Instantiate(BMessage *data); 29 | virtual status_t Archive(BMessage *data, bool deep = true) const; 30 | 31 | private: 32 | void Remove(); 33 | void SetMode(bool normal); 34 | 35 | PrefsWindow *prefswindow; 36 | Prefs *prefs; 37 | BMessageRunner *messagerunner; 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/apps/pulse/LICENSE: -------------------------------------------------------------------------------- 1 | ---------------------- 2 | Be Sample Code License 3 | ---------------------- 4 | 5 | Copyright 1991-1999, Be Incorporated. 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without 9 | modification, are permitted provided that the following conditions 10 | are met: 11 | 12 | 1. Redistributions of source code must retain the above copyright 13 | notice, this list of conditions, and the following disclaimer. 14 | 15 | 2. Redistributions in binary form must reproduce the above copyright 16 | notice, this list of conditions, and the following disclaimer in the 17 | documentation and/or other materials provided with the distribution. 18 | 19 | 3. The name of the author may not be used to endorse or promote products 20 | derived from this software without specific prior written permission. 21 | 22 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR 23 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 24 | OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 25 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 26 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 27 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 29 | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 30 | TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | -------------------------------------------------------------------------------- /src/apps/pulse/Makefile.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | bindir=$(prefix)/bin 3 | 4 | COPTS = `cat @top_srcdir@/cosmoe.specs` -Wall -Wno-multichar -Woverloaded-virtual -Wnon-virtual-dtor -c 5 | 6 | OBJS = DeskbarPulseView.o ProgressBar.o PulseApp.o PulseWindow.o ConfigView.o \ 7 | BottomPrefsView.o CPUButton.o PrefsWindow.o NormalPulseView.o MiniPulseView.o PulseView.o Prefs.o 8 | EXE = pulse 9 | COSMOELIBDIR = @top_srcdir@/src/kits/objs 10 | 11 | CXX = @CXX@ 12 | LL = @CXX@ 13 | 14 | $(EXE) : $(OBJS) Makefile 15 | $(LL) $(OBJS) -L$(COSMOELIBDIR) -lcosmoe -o $@ 16 | 17 | install: $(EXE) $(bindir) 18 | cp -f $(EXE) $(bindir) 19 | strip --strip-all $(bindir)/$(EXE) 20 | 21 | $(bindir): 22 | mkdir -p $(bindir) 23 | 24 | clean: 25 | -rm $(EXE) $(OBJS) *~ 26 | 27 | distclean: clean 28 | -rm -f Makefile 29 | 30 | .cpp.o: 31 | $(CXX) $(COPTS) $< -o $@ 32 | 33 | .PHONY: clean distclean deps doc install uninstall all 34 | -------------------------------------------------------------------------------- /src/apps/pulse/MiniPulseView.h: -------------------------------------------------------------------------------- 1 | //**************************************************************************************** 2 | // 3 | // File: MiniPulseView.h 4 | // 5 | // Written by: Arve Hjonnevag and Daniel Switkin 6 | // 7 | // Copyright 1999, Be Incorporated 8 | // 9 | // Revised by: Steffen Yount 10 | // 11 | //**************************************************************************************** 12 | 13 | #ifndef MINIPULSEVIEW_H 14 | #define MINIPULSEVIEW_H 15 | 16 | #include "PulseView.h" 17 | #include "Prefs.h" 18 | 19 | 20 | 21 | 22 | 23 | class MiniPulseView : public PulseView { 24 | public: 25 | MiniPulseView(BRect rect, const char *name, Prefs *prefs); 26 | MiniPulseView(BRect rect, const char *name); 27 | MiniPulseView(BMessage *message); 28 | ~MiniPulseView(); 29 | void Draw(BRect rect); 30 | void AttachedToWindow(); 31 | void Pulse(); 32 | void FrameResized(float width, float height); 33 | void UpdateColors(BMessage *message); 34 | 35 | protected: 36 | BMenuItem *quit; 37 | rgb_color frame_color, active_color, idle_color; 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/apps/pulse/NormalPulseView.h: -------------------------------------------------------------------------------- 1 | //**************************************************************************************** 2 | // 3 | // File: NormalPulseView.h 4 | // 5 | // Written by: Daniel Switkin 6 | // 7 | // Copyright 1999, Be Incorporated 8 | // 9 | // Revised by: Steffen Yount 10 | // 11 | //**************************************************************************************** 12 | 13 | #ifndef NORMALPULSEVIEW_H 14 | #define NORMALPULSEVIEW_H 15 | 16 | #include "PulseView.h" 17 | #include "ProgressBar.h" 18 | #include "CPUButton.h" 19 | 20 | class NormalPulseView : public PulseView { 21 | public: 22 | NormalPulseView(BRect rect); 23 | ~NormalPulseView(); 24 | void Draw(BRect rect); 25 | void Pulse(); 26 | void AttachedToWindow(); 27 | void UpdateColors(BMessage *message); 28 | 29 | private: 30 | int CalculateCPUSpeed(); 31 | void DetermineVendorAndProcessor(); 32 | 33 | char vendor[32], processor[32]; 34 | bigtime_t prev_time; 35 | ProgressBar **progress_bars; 36 | CPUButton **cpu_buttons; 37 | BBitmap *cpu_logo; 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /src/apps/pulse/Prefs.h: -------------------------------------------------------------------------------- 1 | //**************************************************************************************** 2 | // 3 | // File: Prefs.h 4 | // 5 | // Written by: Daniel Switkin 6 | // 7 | // Copyright 1999, Be Incorporated 8 | // 9 | //**************************************************************************************** 10 | 11 | #ifndef PREFS_H 12 | #define PREFS_H 13 | 14 | #include 15 | #include 16 | 17 | class Prefs { 18 | public: 19 | Prefs(); 20 | bool Save(); 21 | ~Prefs(); 22 | 23 | int window_mode, deskbar_icon_width; 24 | BRect normal_window_rect, mini_window_rect, prefs_window_rect; 25 | int normal_bar_color, mini_active_color, mini_idle_color, mini_frame_color, 26 | deskbar_active_color, deskbar_idle_color, deskbar_frame_color; 27 | bool normal_fade_colors; 28 | 29 | bool fatalerror; 30 | 31 | private: 32 | BFile *file; 33 | 34 | bool GetInt(char *name, int *value, int *defaultvalue); 35 | bool GetBool(char *name, bool *value, bool *defaultvalue); 36 | bool GetRect(char *name, BRect *value, BRect *defaultvalue); 37 | bool PutInt(char *name, int *value); 38 | bool PutBool(char *name, bool *value); 39 | bool PutRect(char *name, BRect *value); 40 | 41 | BRect GetNormalWindowRect(); 42 | BRect GetMiniWindowRect(); 43 | }; 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/apps/pulse/PrefsWindow.h: -------------------------------------------------------------------------------- 1 | //**************************************************************************************** 2 | // 3 | // File: PrefsWindow.h 4 | // 5 | // Written by: Daniel Switkin 6 | // 7 | // Copyright 1999, Be Incorporated 8 | // 9 | // Revised by: Steffen Yount 10 | // 11 | //**************************************************************************************** 12 | 13 | #ifndef PREFSWINDOW_H 14 | #define PREFSWINDOW_H 15 | 16 | #include 17 | #include 18 | #include "Prefs.h" 19 | 20 | class PrefsWindow : public BWindow { 21 | public: 22 | PrefsWindow(BRect rect, const char *name, BMessenger *messenger, Prefs *prefs); 23 | void MessageReceived(BMessage *message); 24 | ~PrefsWindow(); 25 | void Quit(); 26 | 27 | Prefs *prefs; 28 | BMessenger *messenger; 29 | }; 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /src/apps/pulse/ProgressBar.h: -------------------------------------------------------------------------------- 1 | //**************************************************************************************** 2 | // 3 | // File: ProgressBar.h 4 | // 5 | // Written by: David Ramsey and Daniel Switkin 6 | // 7 | // Copyright 1999, Be Incorporated 8 | // 9 | // Revised by: Steffen Yount 10 | // 11 | //**************************************************************************************** 12 | 13 | #ifndef PROGRESSBAR_H 14 | #define PROGRESSBAR_H 15 | 16 | #include 17 | #include "Prefs.h" 18 | 19 | typedef struct { 20 | rgb_color color; 21 | BRect rect; 22 | } segment; 23 | 24 | #define ltgray 216 25 | #define dkgray 80 26 | 27 | class ProgressBar : public BView { 28 | public: 29 | ProgressBar(BRect r, char* name); 30 | void Draw(BRect rect); 31 | void Set(int32 value); 32 | void UpdateColors(int32 color, bool fade); 33 | void AttachedToWindow(); 34 | 35 | enum { 36 | PROGRESS_WIDTH = 146, 37 | PROGRESS_HEIGHT = 20 38 | }; 39 | 40 | private: 41 | void Render(bool all = false); 42 | 43 | segment segments[20]; 44 | int32 current_value, previous_value; 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/apps/pulse/Pulse.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/apps/pulse/Pulse.rsrc -------------------------------------------------------------------------------- /src/apps/pulse/PulseApp.h: -------------------------------------------------------------------------------- 1 | //**************************************************************************************** 2 | // 3 | // File: PulseApp.h 4 | // 5 | // Written by: Daniel Switkin 6 | // 7 | // Copyright 1999, Be Incorporated 8 | // 9 | // Revised by: Steffen Yount 10 | // 11 | //**************************************************************************************** 12 | 13 | #ifndef PULSEAPP_H 14 | #define PULSEAPP_H 15 | 16 | #include 17 | #include "Prefs.h" 18 | 19 | bool LastEnabledCPU(int my_cpu); 20 | int GetMinimumViewWidth(); 21 | bool LoadInDeskbar(); 22 | void Usage(); 23 | 24 | class PulseApp : public BApplication { 25 | public: 26 | PulseApp(int argc, char **argv); 27 | ~PulseApp(); 28 | 29 | Prefs *prefs; 30 | 31 | private: 32 | void BuildPulse(); 33 | }; 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /src/apps/pulse/PulseView.h: -------------------------------------------------------------------------------- 1 | //**************************************************************************************** 2 | // 3 | // File: PulseView.h 4 | // 5 | // Written by: David Ramsey and Daniel Switkin 6 | // 7 | // Copyright 1999, Be Incorporated 8 | // 9 | // Revised by: Steffen Yount 10 | // 11 | //**************************************************************************************** 12 | 13 | #ifndef PULSEVIEW_H 14 | #define PULSEVIEW_H 15 | 16 | #include 17 | #include 18 | #include 19 | #include "Common.h" 20 | #include "PulseApp.h" 21 | #include "Prefs.h" 22 | 23 | 24 | 25 | class PulseView : public BView { 26 | public: 27 | PulseView(BRect rect, const char *name); 28 | PulseView(BMessage *message); 29 | ~PulseView(); 30 | virtual void MouseDown(BPoint point); 31 | void ChangeCPUState(BMessage *message); 32 | 33 | protected: 34 | void Init(); 35 | void Update(); 36 | 37 | BPopUpMenu *popupmenu; 38 | BMenuItem *mode1, *mode2, *preferences, *about; 39 | BMenuItem **cpu_menu_items; 40 | 41 | double cpu_times[B_MAX_CPU_COUNT]; 42 | bigtime_t prev_active[B_MAX_CPU_COUNT]; 43 | bigtime_t prev_time; 44 | }; 45 | 46 | #endif 47 | 48 | -------------------------------------------------------------------------------- /src/apps/pulse/PulseWindow.h: -------------------------------------------------------------------------------- 1 | //**************************************************************************************** 2 | // 3 | // File: PulseWindow.h 4 | // 5 | // Written by: Daniel Switkin 6 | // 7 | // Copyright 1999, Be Incorporated 8 | // 9 | // Revised by: Steffen Yount 10 | // 11 | //**************************************************************************************** 12 | 13 | #ifndef PULSEWINDOW_H 14 | #define PULSEWINDOW_H 15 | 16 | #include 17 | #include "NormalPulseView.h" 18 | #include "MiniPulseView.h" 19 | #include "PrefsWindow.h" 20 | 21 | class PulseWindow : public BWindow { 22 | public: 23 | PulseWindow(BRect rect); 24 | ~PulseWindow(); 25 | bool QuitRequested(); 26 | void MessageReceived(BMessage *message); 27 | void SetMode(int newmode); 28 | 29 | private: 30 | NormalPulseView* normalpulseview; 31 | MiniPulseView* minipulseview; 32 | PrefsWindow *prefswindow; 33 | int mode; 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /src/apps/testharness/Makefile.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | bindir=${prefix}/bin 3 | 4 | COPTS = `cat @top_srcdir@/cosmoe.specs` -g -Wall -Wno-multichar -c 5 | 6 | OBJS = main.o testlist.o teststopwatch.o testoskit.o testports.o testsem.o testsempingpong.o 7 | EXE = testharness testlist teststopwatch testoskit testports testsem testsempingpong 8 | 9 | 10 | COSMOELIBDIR = @top_srcdir@/src/kits/objs 11 | 12 | CC = @CXX@ 13 | LL = @CXX@ 14 | 15 | all: $(EXE) 16 | 17 | testharness: main.o Makefile 18 | $(LL) main.o -L$(COSMOELIBDIR) -lcosmoe -o testharness 19 | 20 | testlist: testlist.o Makefile 21 | $(LL) testlist.o -L$(COSMOELIBDIR) -lcosmoe -o testlist 22 | 23 | teststopwatch: teststopwatch.o Makefile 24 | $(LL) teststopwatch.o -L$(COSMOELIBDIR) -lcosmoe -o teststopwatch 25 | 26 | testoskit: testoskit.o Makefile 27 | $(LL) testoskit.o -L$(COSMOELIBDIR) -lcosmoe -o testoskit 28 | 29 | testports: testports.o Makefile 30 | $(LL) testports.o -L$(COSMOELIBDIR) -lcosmoe -o testports 31 | 32 | testsem: testsem.o Makefile 33 | $(LL) testsem.o -L$(COSMOELIBDIR) -lcosmoe -o testsem 34 | 35 | testsempingpong: testsempingpong.o Makefile 36 | $(LL) testsempingpong.o -L$(COSMOELIBDIR) -lcosmoe -lrt -o testsempingpong 37 | 38 | install: 39 | cp -f clean_shm.sh $(bindir) 40 | 41 | clean: 42 | -rm $(EXE) $(OBJS) *~ 43 | 44 | distclean: clean 45 | -rm -f Makefile 46 | 47 | .cpp.o: 48 | $(CC) $(COPTS) $< -o $@ 49 | 50 | teststopwatch.o : teststopwatch.cpp 51 | 52 | testlist.o : testlist.cpp 53 | 54 | testoskit.o : testoskit.cpp 55 | 56 | testports.o : testports.cpp 57 | 58 | testsem.o : testsem.cpp 59 | 60 | testsempingpong.o : testsempingpong.cpp 61 | 62 | main.o : main.cpp 63 | 64 | .PHONY: clean distclean deps doc install uninstall all 65 | -------------------------------------------------------------------------------- /src/apps/testharness/clean_shm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | currUser=`whoami` 4 | 5 | echo Deleting all unattached shm and sem segments for user $currUser 6 | 7 | for segment in `ipcs -m | grep '^[0-9]' | grep $currUser | cut -f2 -d' '`; do 8 | echo Deleting shared memory with shmid $segment 9 | ipcrm -m $segment 10 | done 11 | 12 | for segment in `ipcs -s | grep '^[0-9]' | grep $currUser | cut -f2 -d' '`; do 13 | echo Deleting sem with semid $segment 14 | ipcrm -s $segment 15 | done 16 | -------------------------------------------------------------------------------- /src/apps/testharness/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | 6 | int main(void) 7 | { 8 | BVolumeRoster aRoster; 9 | BVolume* aVolume; 10 | int count = 0L; 11 | char* aVolumeName; 12 | 13 | aVolume = new BVolume; 14 | aVolumeName = new char[256]; 15 | 16 | while (aRoster.GetNextVolume(aVolume) != -1) 17 | { 18 | aVolume->GetName(aVolumeName); 19 | printf("Found Volume \"%s\"\n", aVolumeName); 20 | count++; 21 | } 22 | 23 | printf("\nFound %d volumes in total\n", count); 24 | 25 | delete[] aVolumeName; 26 | delete aVolume; 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /src/apps/testharness/testlist.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | 6 | 7 | bool Prepend(void* inItem); 8 | 9 | int main(void) 10 | { 11 | BList aList; 12 | char* aName; 13 | int x; 14 | 15 | for (x = 0; x < 10; x++) 16 | { 17 | aName = new char[256]; 18 | 19 | aName[0] = '0' + x; 20 | strcpy(aName + 1, "List Item"); 21 | aList.AddItem(aName); 22 | } 23 | 24 | printf("Number of list items: %ld\n", aList.CountItems()); 25 | 26 | for (x = 0; x < 10; x++) 27 | { 28 | aName = (char*)aList.ItemAt(x); 29 | printf("Item #%d contains \"%s\"\n", x, aName); 30 | } 31 | 32 | printf("\nThe first item is: \"%s\"\n", (char*)aList.FirstItem()); 33 | printf("The last item is : \"%s\"\n\n", (char*)aList.LastItem()); 34 | 35 | aName = (char*)aList.RemoveItem(5); 36 | delete[] aName; 37 | aName = new char[256]; 38 | strcpy(aName, "this is the replacement item 5"); 39 | aList.AddItem(aName, 5); 40 | puts("Item 5 was replaced"); 41 | 42 | aList.SwapItems(7, 8); 43 | puts("Items 7 & 8 were swapped"); 44 | 45 | aList.MoveItem(3, 0); 46 | puts("Item 3 moved to the front"); 47 | 48 | aList.DoForEach(Prepend); 49 | puts("\" - Appended\" appended to each item\n"); 50 | 51 | printf("An item at an invalid index returned %ld\n", (int32)aList.ItemAt(10)); 52 | 53 | for (x = 0; x < 10; x++) 54 | { 55 | aName = (char*)aList.RemoveItem((int32)0); 56 | printf("Item %d which said \"%s\" was removed\n", x, aName); 57 | } 58 | 59 | printf("Number of list items: %ld\n", aList.CountItems()); 60 | 61 | delete[] aName; 62 | 63 | return 0; 64 | } 65 | 66 | 67 | bool Prepend(void* inItem) 68 | { 69 | char* testString = " - Appended"; 70 | strcpy((char*)inItem, strcat((char*)inItem, testString)); 71 | 72 | return false; 73 | } 74 | -------------------------------------------------------------------------------- /src/apps/testharness/testsempingpong.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main(int argc, char** argv) 6 | { 7 | sem_id ping; 8 | sem_id pong; 9 | 10 | if (argc == 1) 11 | { 12 | ping = create_sem(1, "ping"); 13 | pong = create_sem(0, "pong"); 14 | printf("Now run \"testsempingpong %ld %ld\" from another shell\n", 15 | ping, pong); 16 | } 17 | else 18 | { 19 | ping = atol(argv[1]); 20 | pong = atol(argv[2]); 21 | } 22 | 23 | 24 | if (ping < 0 || pong < 0) 25 | { 26 | printf("At least one of the semaphores could not be created.\n"); 27 | return 1; 28 | } 29 | 30 | for(int i = 0; i < 12; i++) 31 | { 32 | if (argc == 1) 33 | { 34 | acquire_sem(ping); 35 | puts("Ping..."); 36 | release_sem(pong); 37 | } 38 | else 39 | { 40 | acquire_sem(pong); 41 | puts("Pong..."); 42 | release_sem(ping); 43 | } 44 | } 45 | 46 | /* It's a race, but who cares */ 47 | delete_sem(ping); 48 | delete_sem(pong); 49 | 50 | return 0; 51 | } 52 | -------------------------------------------------------------------------------- /src/apps/testharness/teststopwatch.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | 6 | int main(void) 7 | { 8 | BStopWatch* aTimer; 9 | int x; 10 | int y; 11 | 12 | puts("About to create StopWatch"); 13 | aTimer = new BStopWatch("1", false); 14 | puts("StopWatch created"); 15 | for (x = 0; x < 10; x++) 16 | { 17 | for (y = 0; y < 100000; y++) 18 | { 19 | x++; 20 | x--; 21 | } 22 | 23 | printf("%lld microseconds elapsed on stopwatch %s\n", 24 | aTimer->ElapsedTime(), 25 | aTimer->Name()); 26 | } 27 | 28 | aTimer->Reset(); 29 | 30 | for (y = 0; y < 100000; y++) 31 | { 32 | x++; 33 | x--; 34 | } 35 | 36 | aTimer->Lap(); 37 | 38 | { 39 | BStopWatch stackWatch("Stack", false); 40 | 41 | for (y = 0; y < 100000; y++) 42 | { 43 | x++; 44 | x--; 45 | } 46 | } 47 | 48 | aTimer->Lap(); 49 | 50 | delete aTimer; 51 | 52 | aTimer = new BStopWatch("2", false); 53 | 54 | { 55 | BStopWatch stackWatch("Stack2", false); 56 | 57 | for (y = 0; y < 100000; y++) 58 | { 59 | x++; 60 | x--; 61 | } 62 | 63 | stackWatch.Lap(); 64 | aTimer->Suspend(); 65 | 66 | for (y = 0; y < 100000; y++) 67 | { 68 | x++; 69 | x--; 70 | } 71 | 72 | aTimer->Resume(); 73 | stackWatch.Lap(); 74 | 75 | for (y = 0; y < 100000; y++) 76 | { 77 | x++; 78 | x--; 79 | } 80 | } 81 | 82 | delete aTimer; 83 | 84 | return 0; 85 | } 86 | 87 | -------------------------------------------------------------------------------- /src/kits/app/AppDefs.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 | ** Distributed under the terms of the Haiku License. 4 | */ 5 | 6 | 7 | #include 8 | #include 9 | 10 | 11 | const uint8 B_HAND_CURSOR[] = { 12 | 16, // size (width/height) 13 | 1, // depth 14 | 2, 2, // hot-spot coordinates 15 | 16 | // image mask 17 | 0x0, 0x0, 0x0, 0x0, 0x38, 0x0, 0x24, 0x0, 0x24, 0x0, 0x13, 0xe0, 0x12, 0x5c, 0x9, 0x2a, 18 | 0x8, 0x1, 0x3c, 0x1, 0x4c, 0x1, 0x42, 0x1, 0x30, 0x1, 0xc, 0x1, 0x2, 0x0, 0x1, 0x0, 19 | 20 | // transparency mask 21 | 0x0, 0x0, 0x0, 0x0, 0x38, 0x0, 0x3c, 0x0, 0x3c, 0x0, 0x1f, 0xe0, 0x1f, 0xfc, 0xf, 0xfe, 22 | 0xf, 0xff, 0x3f, 0xff, 0x7f, 0xff, 0x7f, 0xff, 0x3f, 0xff, 0xf, 0xff, 0x3, 0xfe, 0x1, 0xf8, 23 | }; 24 | 25 | const uint8 B_I_BEAM_CURSOR[] = { 26 | 16, // size (width/height) 27 | 1, // depth 28 | 5, 8, // hot-spot coordinates 29 | 30 | // image mask 31 | 0x6, 0xc0, 0x3, 0x80, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 32 | 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x3, 0x80, 0x6, 0xc0, 33 | 34 | // transparency mask 35 | 0xf, 0xc0, 0x7, 0x80, 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, 36 | 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, 0x3, 0x0, 0x7, 0x80, 0xf, 0xc0, 37 | }; 38 | -------------------------------------------------------------------------------- /src/kits/app/MessageField.cpp: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // MessageField.cpp 3 | // 4 | //------------------------------------------------------------------------------ 5 | 6 | // Standard Includes ----------------------------------------------------------- 7 | 8 | // System Includes ------------------------------------------------------------- 9 | #include 10 | 11 | // Project Includes ------------------------------------------------------------ 12 | #include "MessageField.h" 13 | 14 | // Local Includes -------------------------------------------------------------- 15 | 16 | // Local Defines --------------------------------------------------------------- 17 | 18 | // Globals --------------------------------------------------------------------- 19 | 20 | namespace BPrivate { 21 | 22 | const char* BMessageField::sNullData = "\0\0\0\0\0\0\0\0"; 23 | 24 | //------------------------------------------------------------------------------ 25 | void BMessageField::PrintToStream(const char* name) const 26 | { 27 | int32 type = B_BENDIAN_TO_HOST_INT32(Type()); 28 | printf(" entry %14s, type='%.4s', c=%2zd, ", 29 | name, (char*)&type, CountItems()); 30 | 31 | for (int32 i = 0; i < CountItems(); ++i) 32 | { 33 | if (i) 34 | { 35 | printf(" "); 36 | } 37 | PrintDataItem(i); 38 | } 39 | } 40 | //------------------------------------------------------------------------------ 41 | 42 | } // namespace BPrivate 43 | 44 | /* 45 | * $Log $ 46 | * 47 | * $Id $ 48 | * 49 | */ 50 | 51 | -------------------------------------------------------------------------------- /src/kits/app/RegistrarDefs.cpp: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // Copyright (c) 2001-2002, OpenBeOS 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a 5 | // copy of this software and associated documentation files (the "Software"), 6 | // to deal in the Software without restriction, including without limitation 7 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | // and/or sell copies of the Software, and to permit persons to whom the 9 | // Software is furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | // DEALINGS IN THE SOFTWARE. 21 | // 22 | // File Name: RegistrarDefs.cpp 23 | // Author(s): Ingo Weinhold (bonefish@users.sf.net) 24 | // Description: API classes - registrar interface. 25 | //------------------------------------------------------------------------------ 26 | 27 | #include 28 | 29 | // names 30 | const char *kRegistrarSignature = "application/x-vnd.OBOS-Registrar"; 31 | const char *kRosterThreadName = "_obos_roster_thread_"; 32 | const char *kRosterPortName = "_obos_roster_port_"; 33 | const char *kRAppLooperPortName = "rAppLooperPort"; 34 | 35 | -------------------------------------------------------------------------------- /src/kits/kernel/dirent.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/kits/kernel/dirent.c -------------------------------------------------------------------------------- /src/kits/storage/sniffer/DisjList.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file DisjList.cpp 7 | MIME sniffer Disjunction List class implementation 8 | */ 9 | 10 | #include 11 | 12 | using namespace BPrivate::Storage::Sniffer; 13 | 14 | DisjList::DisjList() 15 | : fCaseInsensitive(false) 16 | { 17 | } 18 | 19 | DisjList::~DisjList() { 20 | } 21 | 22 | void 23 | DisjList::SetCaseInsensitive(bool how) { 24 | fCaseInsensitive = how; 25 | } 26 | 27 | bool 28 | DisjList::IsCaseInsensitive() { 29 | return fCaseInsensitive; 30 | } 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/kits/storage/sniffer/Range.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | /*! 6 | \file Range.cpp 7 | MIME sniffer range implementation 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | using namespace BPrivate::Storage::Sniffer; 16 | 17 | Range::Range(int32 start, int32 end) 18 | : fStart(-1) 19 | , fEnd(-1) 20 | , fCStatus(B_NO_INIT) 21 | { 22 | SetTo(start, end); 23 | } 24 | 25 | status_t 26 | Range::InitCheck() const { 27 | return fCStatus; 28 | } 29 | 30 | Err* 31 | Range::GetErr() const { 32 | if (fCStatus == B_OK) 33 | return NULL; 34 | else { 35 | char start_str[32]; 36 | char end_str[32]; 37 | sprintf(start_str, "%ld", fStart); 38 | sprintf(end_str, "%ld", fEnd); 39 | return new Err(std::string("Sniffer Parser Error -- Invalid range: [") + start_str + ":" + end_str + "]", -1); 40 | } 41 | } 42 | 43 | int32 44 | Range::Start() const { 45 | return fStart; 46 | } 47 | 48 | int32 49 | Range::End() const { 50 | return fEnd; 51 | } 52 | 53 | void 54 | Range::SetTo(int32 start, int32 end) { 55 | fStart = start; 56 | fEnd = end; 57 | if (start > end) { 58 | fCStatus = B_BAD_VALUE; 59 | } else { 60 | fCStatus = B_OK; 61 | } 62 | } 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/kits/support/Beep.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3 | ** Distributed under the terms of the Haiku License. 4 | */ 5 | 6 | 7 | #include 8 | #include 9 | 10 | 11 | status_t 12 | system_beep(const char *eventName) 13 | { 14 | char BEEP[]={7,'\0'}; 15 | printf("%s", BEEP); 16 | printf("beep event \"%s\" requested.\n", eventName); 17 | // ToDo: ask media server to beep around 18 | return B_ERROR; 19 | } 20 | 21 | 22 | status_t 23 | beep() 24 | { 25 | return system_beep(NULL); 26 | } 27 | 28 | 29 | status_t 30 | add_system_beep_event(const char *eventName, uint32 flags) 31 | { 32 | // ToDo: ask media server to add beep event 33 | return B_ERROR; 34 | } 35 | 36 | -------------------------------------------------------------------------------- /src/kits/support/Flattenable.cpp: -------------------------------------------------------------------------------- 1 | // Quick and dirty implementation of the BFlattenable class. 2 | // Just here to be able to compile and test BPath. 3 | // To be replaced by the OpenBeOS version to be provided by the IK Team. 4 | 5 | #include 6 | 7 | #include 8 | 9 | #ifdef USE_OPENBEOS_NAMESPACE 10 | namespace OpenBeOS { 11 | #endif 12 | 13 | // AllowsTypeCode 14 | bool 15 | BFlattenable::AllowsTypeCode(type_code code) const 16 | { 17 | return (TypeCode() == code); 18 | } 19 | 20 | // destructor 21 | BFlattenable::~BFlattenable() 22 | { 23 | } 24 | 25 | 26 | void BFlattenable::_ReservedFlattenable1() {} 27 | void BFlattenable::_ReservedFlattenable2() {} 28 | void BFlattenable::_ReservedFlattenable3() {} 29 | 30 | 31 | #ifdef USE_OPENBEOS_NAMESPACE 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /src/servers/app/BGet++.h: -------------------------------------------------------------------------------- 1 | #ifndef HGET_H_ 2 | #define HGET_H_ 3 | 4 | #include 5 | 6 | class MemPool 7 | { 8 | public: 9 | MemPool(void); 10 | virtual ~MemPool(void); 11 | 12 | void AddToPool(void *buffer, ssize_t len); 13 | void *GetBuffer(ssize_t size, bool zero=false); 14 | void *ReallocateBuffer(void *buffer, ssize_t size); 15 | void ReleaseBuffer(void *buffer); 16 | 17 | virtual int *CompactMem(ssize_t sizereq, int sequence); 18 | virtual void *AcquireMem(ssize_t size); 19 | virtual void ReleaseMem(void *buffer); 20 | void SetPoolIncrement(ssize_t increment); 21 | ssize_t PoolIncrement(void); 22 | 23 | void Stats(ssize_t *curalloc, ssize_t *totfree, ssize_t *maxfree, 24 | long *nget, long *nrel); 25 | 26 | void ExtendedStats(ssize_t *pool_incr, long *npool, long *npget, 27 | long *nprel, long *ndget, long *ndrel); 28 | 29 | void BufferDump(void *buf); 30 | void PoolDump(void *pool, bool dumpalloc, bool dumpfree); 31 | int Validate(void *buffer); 32 | 33 | private: 34 | ssize_t totalloc; 35 | long numget, numrel; 36 | long numpblk; 37 | long numpget, numprel; 38 | long numdget, numdrel; 39 | ssize_t exp_incr; 40 | ssize_t pool_len; 41 | 42 | }; 43 | 44 | class AreaPool : public MemPool 45 | { 46 | public: 47 | AreaPool(void); 48 | virtual ~AreaPool(void); 49 | virtual void *AcquireMem(ssize_t size); 50 | virtual void ReleaseMem(void *buffer); 51 | }; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/servers/app/CursorData.h: -------------------------------------------------------------------------------- 1 | #ifndef CURSORDATA_H_ 2 | #define CURSORDATA_H_ 3 | 4 | extern int8 default_cursor_data[]; 5 | extern int8 default_text_data[]; 6 | extern int8 default_move_data[]; 7 | extern int8 default_drag_data[]; 8 | extern int8 default_resize_data[]; 9 | extern int8 default_resize_ew_data[]; 10 | extern int8 default_resize_ns_data[]; 11 | extern int8 default_resize_nwse_data[]; 12 | extern int8 default_resize_nesw_data[]; 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/servers/app/Globals.h: -------------------------------------------------------------------------------- 1 | #ifndef _GLOBALS_H_ 2 | #define _GLOBALS_H_ 3 | 4 | #define B_SYSTEM_LAST 10 5 | #define B_NORMAL_FEEL 11 6 | #define B_FLOATING_SUBSET_FEEL 12 7 | #define B_FLOATING_APP_FEEL 13 8 | #define B_MODAL_SUBSET_FEEL 14 9 | #define B_MODAL_APP_FEEL 15 10 | #define B_FLOATING_ALL_FEEL 16 11 | #define B_MODAL_ALL_FEEL 17 12 | #define B_SYSTEM_FIRST 18 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /src/servers/app/Makefile.in: -------------------------------------------------------------------------------- 1 | 2 | prefix=@prefix@ 3 | exec_prefix=@exec_prefix@ 4 | bindir=@bindir@ 5 | fontdir=@FONTDIR@ 6 | 7 | CFLAGS = -pipe -O2 -g `freetype-config --cflags` @VIDEODRVCFLAGS@ -c -Wall -Wno-multichar `cat @top_srcdir@/cosmoe.specs` 8 | CPPFLAGS= $(CFLAGS) -Woverloaded-virtual -Wnon-virtual-dtor 9 | 10 | CC = @CC@ 11 | EXE = appserver 12 | COSMOELIBDIR = @top_srcdir@/src/kits/objs 13 | 14 | OBJS = Angle.o AppServer.o \ 15 | BGet++.o BitmapDriver.o BitmapManager.o \ 16 | ColorSet.o CursorData.o CursorHandler.o CursorManager.o \ 17 | DisplayDriver.o DisplaySupport.o Decorator.o DefaultDecorator.o \ 18 | Desktop.o \ 19 | FMWList.o FontServer.o FontFamily.o \ 20 | GraphicsBuffer.o \ 21 | Layer.o LayerData.o \ 22 | PatternHandler.o PixelRenderer.o PNGDump.o \ 23 | RectUtils.o RGBColor.o RootLayer.o \ 24 | ServerApp.o ServerBitmap.o ServerCursor.o ServerFont.o ServerPicture.o \ 25 | ServerScreen.o ServerWindow.o SysCursor.o SystemPalette.o \ 26 | TokenHandler.o \ 27 | Utils.o \ 28 | WinBorder.o Workspace.o @VIDEODRVOBJ@ 29 | 30 | OBJDIR := objs 31 | 32 | include @top_srcdir@/makefile.rules 33 | 34 | all : $(OBJDIR) $(OBJDIR)/$(EXE) 35 | 36 | $(OBJDIR): 37 | mkdir $(OBJDIR) 38 | 39 | $(OBJDIR)/$(EXE): $(OBJS) $(COSMOELIBDIR)/libcosmoe.@LIBEXT@ Makefile 40 | $(CC) -g -rdynamic $(OBJS) -o $(OBJDIR)/$(EXE) `freetype-config --libs` @VIDEODRVLIB@ -L$(COSMOELIBDIR) -lcosmoe -lpng -lz -lm -lstdc++ -lpthread 41 | 42 | install: $(OBJDIR)/$(EXE) $(bindir) $(fontdir) 43 | cp -f $(OBJDIR)/$(EXE) $(bindir) 44 | cp -f fonts/ttfonts/*.ttf $(fontdir) 45 | 46 | uninstall: 47 | rm -f $(bindir)/$(EXE) 48 | rm -rf $(fontdir) 49 | 50 | $(bindir): 51 | mkdir -p $(bindir) 52 | 53 | $(fontdir): 54 | mkdir -p $(fontdir) 55 | 56 | deps: $(OBJDIR) $(DEPS) 57 | 58 | clean: 59 | rm -f $(OBJS) $(OBJDIR)/*.d $(OBJDIR)/$(EXE) *~ 60 | 61 | distclean: clean 62 | rm -f Makefile 63 | 64 | -include $(OBJDIR)/*.d 65 | 66 | .PHONY: clean distclean deps doc install uninstall all 67 | -------------------------------------------------------------------------------- /src/servers/app/PNGDump.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // Copyright (c) 2001-2002, Haiku, Inc. 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a 5 | // copy of this software and associated documentation files (the "Software"), 6 | // to deal in the Software without restriction, including without limitation 7 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | // and/or sell copies of the Software, and to permit persons to whom the 9 | // Software is furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | // DEALINGS IN THE SOFTWARE. 21 | // 22 | // File Name: PNGDump.H 23 | // Author: DarkWyrm 24 | // Description: Function for saving a generic framebuffer to a PNG file 25 | // 26 | //------------------------------------------------------------------------------ 27 | #ifndef PNGDUMP_H 28 | #define PNGDUMP_H 29 | 30 | void SaveToPNG(const char *filename, const BRect &bounds, color_space space, 31 | const void *bits, const int32 &bitslength, const int32 bytesperrow); 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /src/servers/app/Utils.h: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // Copyright (c) 2001-2002, Haiku 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a 5 | // copy of this software and associated documentation files (the "Software"), 6 | // to deal in the Software without restriction, including without limitation 7 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | // and/or sell copies of the Software, and to permit persons to whom the 9 | // Software is furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | // DEALINGS IN THE SOFTWARE. 21 | // 22 | // File Name: Utils.h 23 | // Author: DarkWyrm 24 | // Description: Miscellaneous utility functions 25 | // 26 | //------------------------------------------------------------------------------ 27 | #ifndef UTILS_H_ 28 | #define UTILS_H_ 29 | 30 | #include 31 | #include 32 | #include 33 | 34 | void SendMessage(port_id port, BMessage *message, int32 target=-1); 35 | const char *MsgCodeToString(int32 code); 36 | BString MsgCodeToBString(int32 code); 37 | status_t ConvertModeToDisplayMode(uint32 mode, display_mode *dmode); 38 | BRect CalculatePolygonBounds(BPoint *pts, int32 pointcount); 39 | #endif 40 | -------------------------------------------------------------------------------- /src/servers/app/fonts/ttfonts/Vera.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/servers/app/fonts/ttfonts/Vera.ttf -------------------------------------------------------------------------------- /src/servers/app/fonts/ttfonts/VeraBI.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/servers/app/fonts/ttfonts/VeraBI.ttf -------------------------------------------------------------------------------- /src/servers/app/fonts/ttfonts/VeraBd.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/servers/app/fonts/ttfonts/VeraBd.ttf -------------------------------------------------------------------------------- /src/servers/app/fonts/ttfonts/VeraIt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/servers/app/fonts/ttfonts/VeraIt.ttf -------------------------------------------------------------------------------- /src/servers/app/fonts/ttfonts/VeraMoBI.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/servers/app/fonts/ttfonts/VeraMoBI.ttf -------------------------------------------------------------------------------- /src/servers/app/fonts/ttfonts/VeraMoBd.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/servers/app/fonts/ttfonts/VeraMoBd.ttf -------------------------------------------------------------------------------- /src/servers/app/fonts/ttfonts/VeraMoIt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/servers/app/fonts/ttfonts/VeraMoIt.ttf -------------------------------------------------------------------------------- /src/servers/app/fonts/ttfonts/VeraMono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/servers/app/fonts/ttfonts/VeraMono.ttf -------------------------------------------------------------------------------- /src/servers/app/fonts/ttfonts/VeraSe.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/servers/app/fonts/ttfonts/VeraSe.ttf -------------------------------------------------------------------------------- /src/servers/app/fonts/ttfonts/VeraSeBd.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/servers/app/fonts/ttfonts/VeraSeBd.ttf -------------------------------------------------------------------------------- /src/servers/app/fonts/ttfonts/code_alt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ithamar/cosmoe/ff9803afcfa6ef588548dfb850f55a098d84ee13/src/servers/app/fonts/ttfonts/code_alt.ttf -------------------------------------------------------------------------------- /src/servers/app/isa_io.h: -------------------------------------------------------------------------------- 1 | #ifndef __COSMOE_IO_H__ 2 | #define __COSMOE_IO_H__ 3 | 4 | 5 | 6 | static inline void outb_p(unsigned char value, unsigned short port) 7 | { 8 | __asm__ volatile 9 | ( 10 | #ifdef __i386__ 11 | 12 | "outb %b0,%w1\n" 13 | "outb %%al,$0x80" : : "a" (value), "Nd" (port) 14 | 15 | #elif defined(__ppc__) 16 | 17 | "stbx %0,0,%1\n" 18 | "1: sync\n" 19 | "2:\n" 20 | ".section __ex_table,\"a\"\n" 21 | " .align 2\n" 22 | " .long 1b,2b\n" 23 | ".previous" 24 | : : "r" (value), "r" (port) 25 | 26 | #endif 27 | ); 28 | } 29 | 30 | 31 | #endif /* ndef __COSMOE_IO_H__ */ 32 | -------------------------------------------------------------------------------- /src/servers/registrar/ClipboardHandler.h: -------------------------------------------------------------------------------- 1 | // ClipboardHandler.h 2 | 3 | #ifndef CLIPBOARD_HANDLER_H 4 | #define CLIPBOARD_HANDLER_H 5 | 6 | #include 7 | #include 8 | #include "ClipboardTree.h" 9 | 10 | class ClipboardHandler : public BHandler { 11 | public: 12 | ClipboardHandler(); 13 | virtual ~ClipboardHandler(); 14 | 15 | virtual void MessageReceived(BMessage *message); 16 | private: 17 | ClipboardTree fClipboardTree; 18 | }; 19 | 20 | #endif // CLIPBOARD_HANDLER_H 21 | 22 | -------------------------------------------------------------------------------- /src/servers/registrar/ClipboardTree.h: -------------------------------------------------------------------------------- 1 | // ClipboardTree.h 2 | 3 | #ifndef CLIPBOARD_TREE_H 4 | #define CLIPBOARD_TREE_H 5 | 6 | #include 7 | #include 8 | #include 9 | #include "WatchingService.h" 10 | 11 | class ClipboardTree { 12 | public: 13 | ClipboardTree(); 14 | ~ClipboardTree(); 15 | void AddNode(BString name); 16 | ClipboardTree* GetNode(BString name); 17 | uint32 GetCount(); 18 | uint32 IncrementCount(); 19 | BMessage *GetData(); 20 | void SetData(BMessage *data); 21 | BMessenger *GetDataSource(); 22 | void SetDataSource(BMessenger *dataSource); 23 | bool AddWatcher(BMessenger *watcher); 24 | bool RemoveWatcher(BMessenger *watcher); 25 | void NotifyWatchers(); 26 | private: 27 | BString fName; 28 | BMessage fData; 29 | BMessenger fDataSource; 30 | ClipboardTree *fLeftChild; 31 | ClipboardTree *fRightChild; 32 | uint32 fCount; 33 | WatchingService fWatchingService; 34 | }; 35 | 36 | #endif // CLIPBOARD_TREE_H 37 | 38 | -------------------------------------------------------------------------------- /src/servers/registrar/Jamfile: -------------------------------------------------------------------------------- 1 | SubDir OBOS_TOP src servers registrar ; 2 | 3 | UsePrivateHeaders app ; 4 | UsePrivateHeaders shared ; 5 | UsePrivateHeaders storage ; 6 | 7 | AddResources obos_registrar : registrar.rdef ; 8 | 9 | Server obos_registrar : 10 | AppInfoList.cpp 11 | ClipboardHandler.cpp 12 | ClipboardTree.cpp 13 | Event.cpp 14 | EventMaskWatcher.cpp 15 | EventQueue.cpp 16 | MessageEvent.cpp 17 | MessageHandler.cpp 18 | MessageRunnerManager.cpp 19 | MIMEManager.cpp 20 | PriorityMessageQueue.cpp 21 | RecentApps.cpp 22 | RecentEntries.cpp 23 | Registrar.cpp 24 | RosterAppInfo.cpp 25 | RosterSettingsCharStream.cpp 26 | TRoster.cpp 27 | Watcher.cpp 28 | WatchingService.cpp 29 | ; 30 | LinkSharedOSLibs obos_registrar : 31 | libopenbeos.so 32 | stdc++.r4 33 | be 34 | ; 35 | -------------------------------------------------------------------------------- /src/servers/registrar/MIMEManager.h: -------------------------------------------------------------------------------- 1 | // MIMEManager.h 2 | 3 | #ifndef MIME_MANAGER_H 4 | #define MIME_MANAGER_H 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | class MIMEManager : public BLooper { 11 | public: 12 | MIMEManager(); 13 | virtual ~MIMEManager(); 14 | 15 | virtual void MessageReceived(BMessage *message); 16 | private: 17 | void HandleSetParam(BMessage *message); 18 | void HandleDeleteParam(BMessage *message); 19 | 20 | BPrivate::Storage::Mime::Database fDatabase; 21 | RegistrarThreadManager fThreadManager; 22 | BMessenger fManagerMessenger; 23 | }; 24 | 25 | #endif // MIME_MANAGER_H 26 | -------------------------------------------------------------------------------- /src/servers/registrar/Makefile.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | bindir=$(prefix)/bin 3 | 4 | CFLAGS = -g -c -Wall -Wno-multichar `cat @top_srcdir@/cosmoe.specs` 5 | CXXFLAGS = $(CFLAGS) -Woverloaded-virtual -Wnon-virtual-dtor 6 | 7 | CC = @CC@ 8 | CXX = @CXX@ 9 | EXE = registrar 10 | COSMOELIBDIR=@top_srcdir@/src/kits/objs 11 | 12 | OBJDIR := objs 13 | 14 | 15 | $(OBJDIR)/%.o : %.c 16 | $(CC) $(CFLAGS) $< -o $@ 17 | 18 | $(OBJDIR)/%.o : %.cpp 19 | $(CXX) $(CXXFLAGS) $< -o $@ 20 | 21 | 22 | OBJS := AppInfoList.o \ 23 | ClipboardHandler.o \ 24 | ClipboardTree.o \ 25 | Event.o \ 26 | EventMaskWatcher.o \ 27 | EventQueue.o \ 28 | MessageEvent.o \ 29 | MessageHandler.o \ 30 | MessageRunnerManager.o \ 31 | MIMEManager.o \ 32 | RecentApps.o \ 33 | RecentEntries.o \ 34 | Registrar.o \ 35 | RosterAppInfo.o \ 36 | RosterSettingsCharStream.o \ 37 | TRoster.o \ 38 | Watcher.o \ 39 | WatchingService.o 40 | 41 | OBJS := $(addprefix $(OBJDIR)/,$(OBJS)) 42 | 43 | 44 | $(EXE): objs $(OBJS) 45 | $(CXX) -g $(OBJS) -lstdc++ -L$(COSMOELIBDIR) -lcosmoe -o $(EXE) 46 | 47 | objs: 48 | mkdir objs 49 | 50 | install: $(EXE) $(bindir) 51 | cp -f $(EXE) $(bindir) 52 | strip --strip-all $(bindir)/$(EXE) 53 | 54 | $(bindir): 55 | mkdir -p $(bindir) 56 | 57 | clean: 58 | -rm $(EXE) $(OBJS) *~ 59 | 60 | distclean: clean 61 | -rm -f Makefile 62 | -------------------------------------------------------------------------------- /src/servers/registrar/MessageHandler.cpp: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | 6 | #include "MessageHandler.h" 7 | 8 | // constructor 9 | MessageHandler::MessageHandler() 10 | { 11 | } 12 | 13 | // destructor 14 | MessageHandler::~MessageHandler() 15 | { 16 | } 17 | 18 | // HandleMessage 19 | void 20 | MessageHandler::HandleMessage(BMessage *message) 21 | { 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/servers/registrar/MessageHandler.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | 6 | #ifndef MESSAGE_HANDLER_H 7 | #define MESSAGE_HANDLER_H 8 | 9 | class BMessage; 10 | 11 | class MessageHandler { 12 | public: 13 | MessageHandler(); 14 | virtual ~MessageHandler(); 15 | 16 | virtual void HandleMessage(BMessage *message); 17 | }; 18 | 19 | #endif // MESSAGE_HANDLER_H 20 | -------------------------------------------------------------------------------- /src/servers/registrar/PriorityMessageQueue.h: -------------------------------------------------------------------------------- 1 | //---------------------------------------------------------------------- 2 | // This software is part of the OpenBeOS distribution and is covered 3 | // by the OpenBeOS license. 4 | //--------------------------------------------------------------------- 5 | 6 | #ifndef PRIORITY_MESSAGE_QUEUE_H 7 | #define PRIORITY_MESSAGE_QUEUE_H 8 | 9 | #include 10 | #include 11 | 12 | class BMessage; 13 | 14 | class PriorityMessageQueue { 15 | public: 16 | PriorityMessageQueue(); 17 | ~PriorityMessageQueue(); 18 | 19 | bool Lock(); 20 | void Unlock(); 21 | 22 | bool PushMessage(BMessage *message, int32 priority = 0); 23 | BMessage *PopMessage(); 24 | 25 | int32 CountMessages() const; 26 | bool IsEmpty() const; 27 | 28 | private: 29 | int32 _FindInsertionIndex(int32 priority); 30 | 31 | private: 32 | class MessageInfo; 33 | 34 | private: 35 | mutable BLocker fLock; 36 | BObjectList fMessages; 37 | }; 38 | 39 | #endif // PRIORITY_MESSAGE_QUEUE_H 40 | --------------------------------------------------------------------------------