├── .gitignore ├── LICENSE ├── README.md ├── add-ons ├── LoadAddon │ ├── Effects │ │ ├── Effect_ppc.proj │ │ ├── Effect_x86.proj │ │ ├── effect.cpp │ │ ├── effect.h │ │ ├── effectaddon.cpp │ │ └── makefile │ ├── LICENSE │ ├── LoadAddon Article │ ├── LoadAddon.rsrc │ ├── LoadAddon_ppc.proj │ ├── LoadAddon_x86.proj │ ├── effectpal.cpp │ ├── effectpal.h │ ├── loadaddonapp.cpp │ ├── loadaddonapp.h │ ├── makefile │ └── makefile.all ├── MailMarker │ ├── EditWindow.cpp │ ├── EditWindow.h │ ├── LICENSE │ ├── MailMarker.cpp │ ├── MailMarker_ppc.proj │ ├── MailMarker_x86.proj │ └── makefile ├── dosfs │ ├── LICENSE │ ├── attr.c │ ├── attr.h │ ├── dir.c │ ├── dir.h │ ├── dlist.c │ ├── dlist.h │ ├── dosfs.c │ ├── dosfs.h │ ├── fat.c │ ├── fat.h │ ├── file.c │ ├── file.h │ ├── inc │ │ ├── cache.h │ │ ├── fsproto.h │ │ ├── kalloc.h │ │ ├── lock.h │ │ └── rtc_info.h │ ├── iter.c │ ├── iter.h │ ├── makefile │ ├── mime_table │ │ ├── mime_table.c │ │ └── mime_table.h │ ├── textencoding │ │ ├── EncodingConversions.cpp │ │ ├── UnicodeMappings.cpp │ │ ├── UnicodeMappings.h │ │ ├── encodings.cpp │ │ ├── encodings.h │ │ ├── msdos866.cpp │ │ └── mswin1251.cpp │ ├── util.c │ ├── util.h │ ├── vcache.c │ ├── vcache.h │ └── version.c ├── index.html ├── iso9660 │ ├── LICENSE │ ├── README │ ├── cache.h │ ├── fsproto.h │ ├── iso.c │ ├── iso.h │ ├── iso9660_ppc.proj │ ├── iso9660_x86.proj │ ├── kernel_interface.c │ ├── lock.h │ ├── makefile │ └── rock.h └── makefile.all ├── application_kit ├── AppKitModel │ ├── Article │ ├── HandlerAsDataObject │ │ ├── Notes │ │ ├── StringApplication.cpp │ │ ├── StringApplication.h │ │ ├── StringApplication.rsrc │ │ ├── StringApplication_ppc.proj │ │ ├── StringApplication_x86.proj │ │ ├── StringHandler.cpp │ │ ├── StringHandler.h │ │ ├── StringHandlerProtocol.h │ │ ├── StringLooper.cpp │ │ ├── StringLooper.h │ │ └── makefile │ ├── HandlerAsOperation │ │ ├── Filters.cpp │ │ ├── Filters.h │ │ ├── Notes │ │ ├── StringFilter.cpp │ │ ├── StringFilter.h │ │ ├── StringFilterApp.cpp │ │ ├── StringFilterApp.h │ │ ├── StringFilterApp.rsrc │ │ ├── StringFilterApp_ppc.proj │ │ ├── StringFilterApp_x86.proj │ │ ├── StringFilterLooper.cpp │ │ ├── StringFilterLooper.h │ │ ├── StringFilterProtocol.h │ │ └── makefile │ ├── LICENSE │ └── makefile ├── BeBounce │ ├── BeBounce.rsrc │ ├── BeBounce_ppc.proj │ ├── BeBounce_x86.proj │ ├── Crunch.cpp │ ├── Crunch.h │ ├── LICENSE │ ├── README.BeBounce │ ├── main.cpp │ ├── main.h │ └── makefile ├── Container │ ├── Container.rsrc │ ├── Container_ppc.proj │ ├── Container_x86.proj │ ├── LICENSE │ ├── main.cpp │ └── makefile ├── EZLauncher │ ├── EZLauncher Article │ ├── EZLauncher.cpp │ ├── EZLauncher_ppc.proj │ ├── EZLauncher_x86.proj │ ├── LICENSE │ └── makefile ├── Magnify │ ├── LICENSE │ ├── Magnify.rsrc │ ├── Magnify_ppc.proj │ ├── Magnify_x86.proj │ ├── main.cpp │ ├── main.h │ └── makefile ├── Pulse │ ├── CPUButton.cpp │ ├── CPUButton.h │ ├── Common.h │ ├── ConfigView.cpp │ ├── ConfigView.h │ ├── DeskbarPulseView.cpp │ ├── DeskbarPulseView.h │ ├── LICENSE │ ├── 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 │ ├── Pulse_ppc.proj │ ├── Pulse_x86.proj │ └── makefile ├── Scripter │ ├── LICENSE │ ├── ScriptWorld │ │ ├── Makefile │ │ ├── PropDump.cpp │ │ ├── PropDump.h │ │ ├── README.ScriptWorld │ │ ├── ScriptView.cpp │ │ ├── ScriptView.h │ │ ├── ScriptWindow.cpp │ │ ├── ScriptWindow.h │ │ ├── ScriptWorld.cpp │ │ ├── ScriptWorld.h │ │ ├── ScriptWorld.rdef │ │ ├── ScriptWorld_ppc.proj │ │ ├── ScriptWorld_x86.proj │ │ ├── SendPanel.cpp │ │ └── SendPanel.h │ └── makefile ├── ShelfInspector │ ├── Info.cpp │ ├── LICENSE │ ├── ShelfInspector_ppc.proj │ ├── ShelfInspector_x86.proj │ ├── main.cpp │ ├── main.h │ ├── makefile │ └── readme.txt ├── Thesaurus │ ├── Article.txt │ ├── Dictionary.cpp │ ├── Dictionary.h │ ├── DragSelector.cpp │ ├── DragSelector.h │ ├── LICENSE │ ├── RemoteTextScanner.cpp │ ├── RemoteTextScanner.h │ ├── Thesaurus.rsrc │ ├── ThesaurusWindow.cpp │ ├── ThesaurusWindow.h │ ├── Thesaurus_ppc.proj │ ├── Thesaurus_x86.proj │ ├── main.cpp │ ├── makefile │ └── thesaurus ├── Watcher │ ├── LICENSE │ ├── WatchItem.cpp │ ├── WatchItem.h │ ├── Watcher.cpp │ ├── Watcher.h │ ├── Watcher_ppc.proj │ ├── Watcher_x86.proj │ ├── WatchingStuff │ └── makefile ├── colorPickerModule │ ├── Article.txt │ ├── LICENSE │ ├── colorPickerClient │ │ ├── ColorLabel.cpp │ │ ├── ColorLabel.h │ │ ├── ColorPickerClient.wks │ │ ├── ColorPickerClient_ppc.proj │ │ ├── ColorPickerClient_x86.proj │ │ ├── ModuleProxy.cpp │ │ ├── ModuleProxy.h │ │ ├── SimpleWindow.cpp │ │ ├── SimpleWindow.h │ │ ├── main.cpp │ │ └── makefile │ ├── crayonColorPicker │ │ ├── CrayonColorPicker.cpp │ │ ├── CrayonColorPicker.h │ │ ├── CrayonColorPicker_ppc.proj │ │ ├── CrayonColorPicker_x86.proj │ │ ├── CrayonPicker.cpp │ │ ├── CrayonPicker.h │ │ ├── CrayonPicker.rsrc │ │ ├── CrayonPicker.wks │ │ ├── CrayonPickerApp.cpp │ │ ├── CrayonPickerApp.h │ │ ├── Protocol.h │ │ └── makefile │ ├── makefile │ └── simpleColorPicker │ │ ├── ColorPicker.wks │ │ ├── Protocol.h │ │ ├── SimpleColorPicker_ppc.proj │ │ ├── SimpleColorPicker_x86.proj │ │ ├── SimplePicker.cpp │ │ ├── SimplePicker.h │ │ ├── SimplePicker.rsrc │ │ ├── SimplePickerApp.cpp │ │ ├── SimplePickerApp.h │ │ └── makefile ├── index.html └── makefile.all ├── drivers ├── EtherPCI │ ├── Addon │ │ ├── EtherDevice.cpp │ │ ├── EtherDevice.h │ │ ├── NetBufList.h │ │ ├── cplusplus.h │ │ ├── ether_driver.h │ │ ├── generic.cpp │ │ ├── generic.h │ │ ├── makefile │ │ ├── ne2000pci.cpp │ │ ├── ne2000pci_ppc.proj │ │ ├── ne2000pci_x86.proj │ │ ├── netconfig.h │ │ └── netdebug.h │ ├── Driver │ │ ├── ether_driver.h │ │ ├── etherpci.c │ │ ├── etherpci_ppc.proj │ │ ├── etherpci_private.h │ │ ├── etherpci_x86.proj │ │ └── makefile │ ├── LICENSE │ └── makefile.all ├── buslogic │ ├── LICENSE │ ├── buslogic.h │ ├── buslogic_x86.proj │ ├── makefile │ └── sim_buslogic.c ├── digit │ ├── LICENSE │ ├── README.txt │ ├── article.txt │ ├── driver │ │ ├── digit_ppc.proj │ │ ├── digit_x86.proj │ │ ├── driver.c │ │ └── makefile │ ├── makefile.all │ └── test │ │ ├── makefile │ │ ├── testdigit.c │ │ ├── testdigit_ppc.proj │ │ └── testdigit_x86.proj ├── graphics │ ├── LICENSE │ ├── R4_Graphics_Driver_Docs │ ├── Release_Notes │ ├── makefile.all │ ├── nudge │ │ ├── makefile │ │ └── nudge.c │ ├── ram_driver │ │ ├── accelerant │ │ │ ├── Acceleration.c │ │ │ ├── Cursor.c │ │ │ ├── EngineManagment.c │ │ │ ├── GetAccelerantHook.c │ │ │ ├── GetModeInfo.c │ │ │ ├── GlobalData.c │ │ │ ├── GlobalData.h │ │ │ ├── InitAccelerant.c │ │ │ ├── ProposeDisplayMode.c │ │ │ ├── SetDisplayMode.c │ │ │ ├── generic.h │ │ │ └── makefile │ │ ├── driver │ │ │ ├── driver.c │ │ │ └── makefile │ │ ├── include │ │ │ └── DriverInterface.h │ │ └── makefile │ ├── sample_driver │ │ ├── accelerant │ │ │ ├── Acceleration.c │ │ │ ├── Cursor.c │ │ │ ├── EngineManagment.c │ │ │ ├── GetAccelerantHook.c │ │ │ ├── GetModeInfo.c │ │ │ ├── GlobalData.c │ │ │ ├── GlobalData.h │ │ │ ├── InitAccelerant.c │ │ │ ├── ProposeDisplayMode.c │ │ │ ├── SetDisplayMode.c │ │ │ ├── generic.h │ │ │ └── makefile │ │ ├── driver │ │ │ ├── driver.c │ │ │ ├── makefile │ │ │ └── save │ │ │ │ └── driver.c │ │ ├── include │ │ │ └── DriverInterface.h │ │ └── makefile │ └── test_harness │ │ ├── harness.c │ │ └── makefile ├── index.html ├── inquiry │ ├── LICENSE │ ├── inquiry.cpp │ ├── inquiry_ppc.proj │ ├── inquiry_x86.proj │ └── makefile ├── makefile.all ├── multiaudio_test │ ├── LICENSE │ ├── article.txt │ └── loop_test.c ├── scsi_raw │ ├── LICENSE │ ├── devlistmgr.c │ ├── makefile │ ├── scsi_common.c │ ├── scsi_raw.c │ ├── scsi_raw_ppc.proj │ └── scsi_raw_x86.proj ├── scsi_skel │ ├── LICENSE │ ├── makefile │ └── skel.c ├── sonic_vibes │ ├── LICENSE │ ├── inc │ │ ├── R3MediaDefs.h │ │ ├── audio_driver.h │ │ ├── joystick_driver.h │ │ ├── midi_driver.h │ │ ├── sonic_vibes.h │ │ ├── sound.h │ │ └── sv_private.h │ ├── joy.c │ ├── makefile │ ├── midi.c │ ├── mixer.c │ ├── mux.c │ ├── pcm.c │ ├── sonic_vibes_x86.proj │ └── sv.c ├── symbios │ ├── 53c8xx.c │ ├── 53c8xx.h │ ├── LICENSE │ ├── makefile │ ├── scripts.c │ ├── scripts.ss │ └── symbios.h └── usb_speaker │ ├── Makefile │ ├── audio.h │ └── usb_speaker.c ├── game_kit ├── Chart │ ├── Chart.cpp │ ├── Chart.h │ ├── Chart.rsrc │ ├── ChartRender.cpp │ ├── ChartRender.h │ ├── ChartRender_d.h │ ├── ChartView.cpp │ ├── ChartView.h │ ├── ChartWindow.cpp │ ├── ChartWindow.h │ ├── Chart_ppc.proj │ ├── Chart_x86.proj │ ├── LICENSE │ └── makefile ├── PageFlipper │ ├── LICENSE │ ├── PageFlip_ppc.proj │ ├── PageFlip_x86.proj │ ├── makefile │ └── page_flip.cpp ├── SndFilePanel │ ├── SndFilePanel.cpp │ ├── SndFilePanel.h │ ├── article.txt │ ├── main.cpp │ └── makefile ├── Stars │ ├── LICENSE │ ├── StarWindow.cpp │ ├── StarWindow.h │ ├── Stars.cpp │ ├── Stars.h │ ├── Stars.rsrc │ ├── Stars_ppc.proj │ ├── Stars_x86.proj │ └── makefile ├── Whack │ ├── LICENSE │ ├── README │ ├── Whack_ppc.proj │ ├── Whack_x86.proj │ ├── addon.cpp │ ├── addon.h │ ├── article.txt │ ├── makefile │ ├── settings.h │ ├── template │ ├── whack.cpp │ └── whack.h ├── index.html └── makefile.all ├── graphics ├── FrameRate │ ├── FrameRate_ppc.proj │ ├── FrameRate_x86.proj │ ├── LICENSE │ ├── frame_rate.cpp │ └── makefile ├── Mandelbrot │ ├── LICENSE │ ├── Mandelbrot.rsrc │ ├── Mandelbrot_ppc.proj │ ├── Mandelbrot_x86.proj │ ├── main.cpp │ ├── makefile │ ├── tsb.cpp │ ├── tsb.h │ └── tsb1.cpp ├── QuickPaint │ ├── Article.txt │ ├── BitmapDocument.cpp │ ├── BitmapDocument.h │ ├── BitmapEditor.cpp │ ├── BitmapEditor.h │ ├── BitmapEditorWindow.cpp │ ├── BitmapEditorWindow.h │ ├── BitmapView.cpp │ ├── BitmapView.h │ ├── LICENSE │ ├── Layers.cpp │ ├── Layers.h │ ├── Matrix.cpp │ ├── Matrix.h │ ├── PaintApp.cpp │ ├── PaintApp.h │ ├── QuickPaint_ppc.proj │ ├── QuickPaint_x86.proj │ ├── Scroller.cpp │ ├── Scroller.h │ ├── Tool.cpp │ ├── Tool.h │ ├── ToolLib.cpp │ ├── ToolLib.h │ ├── Toolbox.cpp │ ├── Toolbox.h │ └── makefile ├── SlimDemo │ ├── LICENSE │ ├── SlimDemo_x86.proj │ ├── article │ ├── main.c │ └── makefile ├── index.html └── makefile ├── index.html ├── input_server ├── index.html ├── input_recorder │ ├── Makefile │ ├── README │ └── srcs │ │ ├── InputRecorder │ │ ├── InputRecorder.rdef │ │ ├── Makefile │ │ ├── MessageWriter.cpp │ │ ├── MessageWriter.h │ │ ├── main.cpp │ │ ├── main.h │ │ ├── view.cpp │ │ ├── view.h │ │ ├── win.cpp │ │ └── win.h │ │ ├── InputRecorderDevice │ │ ├── InputRecorderDevice.cpp │ │ └── Makefile │ │ └── InputRecorderFilter │ │ ├── InputRecorderFilter.cpp │ │ └── Makefile ├── makefile.all └── nervous │ ├── LICENSE │ ├── README │ ├── makefile │ ├── nervous.cpp │ ├── nervous.h │ ├── nervous_ppc.proj │ └── nervous_x86.proj ├── interface_kit ├── CDButton │ ├── CDButton.cpp │ ├── CDButton.h │ ├── CDButton.rsrc │ ├── CDButton_ppc.proj │ ├── CDButton_x86.proj │ ├── CDDBSupport.cpp │ ├── CDDBSupport.h │ ├── CDEngine.cpp │ ├── CDEngine.h │ ├── CDPanel.cpp │ ├── CDPanel.h │ ├── FunctionObjectMessage.cpp │ ├── FunctionObjectMessage.h │ ├── LICENSE │ ├── Observer.cpp │ ├── Observer.h │ ├── Readme │ ├── TypedList.cpp │ ├── TypedList.h │ ├── iconfile.h │ └── makefile ├── Clock │ ├── Clock.rsrc │ ├── Clock_ppc.proj │ ├── Clock_x86.proj │ ├── LICENSE │ ├── README.Clock │ ├── cl_view.cpp │ ├── cl_view.h │ ├── cl_wind.cpp │ ├── cl_wind.h │ ├── clock.cpp │ ├── clock.h │ └── makefile ├── Iterview │ ├── BShape-Article │ ├── Iterview-ppc.proj │ ├── Iterview-x86.proj │ ├── LICENSE │ ├── iterview.cpp │ └── makefile ├── MenuWorld │ ├── BitmapMenuItem.cpp │ ├── BitmapMenuItem.h │ ├── LICENSE │ ├── MenuApp.cpp │ ├── MenuApp.h │ ├── MenuView.cpp │ ├── MenuView.h │ ├── MenuWindow.cpp │ ├── MenuWindow.h │ ├── MenuWorld.rsrc │ ├── MenuWorld_ppc.proj │ ├── MenuWorld_x86.proj │ ├── PostDispatchInvoker.cpp │ ├── PostDispatchInvoker.h │ ├── TestIcons.h │ ├── TestMenuBuilder.cpp │ ├── TestMenuBuilder.h │ ├── ViewLayoutFactory.cpp │ ├── ViewLayoutFactory.h │ ├── _README.txt │ ├── constants.cpp │ ├── constants.h │ ├── main.cpp │ ├── makefile │ ├── stddlg.cpp │ └── stddlg.h ├── dragme │ ├── Article.txt │ ├── DragApp.cpp │ ├── DragApp.h │ ├── DragMe_ppc.proj │ ├── DragMe_x86.proj │ ├── DragView.cpp │ ├── DragView.h │ ├── DragWindow.cpp │ ├── DragWindow.h │ ├── LICENSE │ ├── Main.cpp │ └── makefile ├── dynadraw3 │ ├── ColorWin.cpp │ ├── ColorWin.h │ ├── DDApp.cpp │ ├── DDApp.h │ ├── DDWindow.cpp │ ├── DDWindow.h │ ├── FilterView.cpp │ ├── FilterView.h │ ├── LICENSE │ ├── MsgVals.h │ ├── README │ ├── TweakWin.cpp │ ├── TweakWin.h │ ├── dynadraw3_ppc.proj │ ├── dynadraw3_x86.proj │ ├── main.cpp │ └── makefile ├── imaging │ ├── GMCGraphics.cpp │ ├── GMCGraphics.h │ ├── LICENSE │ ├── StringLabel.cpp │ ├── StringLabel.h │ ├── imaging.h │ ├── imaging.txt │ ├── imaging_app.cpp │ ├── imaging_app.h │ ├── imaging_main.cpp │ ├── makefile │ ├── scale.cpp │ ├── scale.h │ ├── scaler_ppc.proj │ └── scaler_x86.proj ├── index.html ├── makefile.all ├── pot │ ├── LICENSE │ ├── article.txt │ ├── colorutils.cpp │ ├── colorutils.h │ ├── constants.cpp │ ├── constants.h │ ├── drawutils.cpp │ ├── drawutils.h │ ├── makefile │ ├── offscreenview.cpp │ ├── offscreenview.h │ ├── pot.cpp │ ├── pot.h │ ├── pot.rsrc │ ├── pot_ppc.proj │ ├── pot_x86.proj │ ├── potapp.cpp │ ├── potapp.h │ ├── potview.cpp │ ├── potview.h │ ├── potwin.cpp │ ├── potwin.h │ ├── testview.cpp │ ├── testview.h │ ├── testwin.cpp │ └── testwin.h └── scrollbarapp │ ├── LICENSE │ ├── iview.cpp │ ├── iview.h │ ├── main.cpp │ ├── main.h │ ├── makefile │ ├── newsletter-article │ ├── scrollbarapp.rsrc │ ├── scrollbarapp_ppc.proj │ ├── scrollbarapp_x86.proj │ ├── win.cpp │ └── win.h ├── intro ├── BasicButton │ ├── BTSButtonApp.cpp │ ├── BTSButtonApp.h │ ├── BTSButtonWindow.cpp │ ├── BTSButtonWindow.h │ ├── BasicButton_ppc.proj │ ├── BasicButton_x86.proj │ ├── LICENSE │ ├── README.BasicButton │ └── makefile ├── ButtonWorld │ ├── ButtonView.cpp │ ├── ButtonView.h │ ├── ButtonWindow.cpp │ ├── ButtonWindow.h │ ├── ButtonWorld.cpp │ ├── ButtonWorld.h │ ├── ButtonWorld.rsrc │ ├── ButtonWorld_ppc.proj │ ├── ButtonWorld_x86.proj │ ├── LICENSE │ ├── README.ButtonWorld │ ├── blue4x4.h │ ├── blue4x4on.h │ └── makefile ├── DoubleClick │ ├── Article │ ├── DoubleClick.cpp │ ├── DoubleClick.h │ └── makefile ├── DropWorld │ ├── DropView.cpp │ ├── DropView.h │ ├── DropWindow.cpp │ ├── DropWindow.h │ ├── DropWorld.cpp │ ├── DropWorld.h │ ├── DropWorld.rsrc │ ├── DropWorld_ppc.proj │ ├── DropWorld_x86.proj │ ├── LICENSE │ ├── README.DropWorld │ └── makefile ├── HelloWorld │ ├── HelloView.cpp │ ├── HelloView.h │ ├── HelloWindow.cpp │ ├── HelloWindow.h │ ├── HelloWorld.cpp │ ├── HelloWorld.h │ ├── HelloWorld.rsrc │ ├── HelloWorld_ppc.proj │ ├── HelloWorld_x86.proj │ ├── LICENSE │ ├── README.HelloWorld │ └── makefile ├── QSort │ ├── LICENSE │ ├── UntanglingThreads │ ├── makefile │ ├── qsort.cpp │ ├── qsort_ppc.proj │ └── qsort_x86.proj ├── TextEditor │ ├── LICENSE │ ├── constants.h │ ├── makefile │ ├── textapp.h │ ├── textwindow.cpp │ ├── textwindow.h │ ├── textworld.cpp │ ├── textworld_ppc.proj │ └── textworld_x86.proj ├── doodle │ ├── LICENSE │ ├── MultiLocker.cpp │ ├── MultiLocker.h │ ├── README.txt │ ├── article1.txt │ ├── article2.txt │ ├── cmdtool.cpp │ ├── cmdtool.h │ ├── constants.h │ ├── doodle.cpp │ ├── doodle.h │ ├── doodle.rsrc │ ├── doodle_ppc.proj │ ├── doodle_x86.proj │ ├── dudedoc.cpp │ ├── dudedoc.h │ ├── dudeprefs.cpp │ ├── dudeprefs.h │ ├── dudeview.cpp │ ├── dudeview.h │ ├── dudewin.cpp │ ├── dudewin.h │ ├── icons.h │ ├── makefile │ ├── minivec.h │ ├── pendlg.cpp │ ├── pendlg.h │ ├── stroke.cpp │ ├── stroke.h │ ├── syncutil.cpp │ ├── syncutil.h │ ├── toolbar.cpp │ ├── toolbar.h │ ├── toolbaritem.cpp │ └── toolbaritem.h ├── index.html ├── makefile.all ├── messageworld │ ├── LICENSE │ ├── makefile │ ├── messageworld.cpp │ ├── messageworld_ppc.proj │ └── messageworld_x86.proj ├── prefs_article │ ├── LICENSE │ ├── README.txt │ ├── makefile.all │ ├── prefslib │ │ ├── TPreferences.cpp │ │ ├── TPreferences.h │ │ ├── makefile │ │ ├── prefslib_ppc.proj │ │ └── prefslib_x86.proj │ └── sample │ │ ├── makefile │ │ ├── sample.cpp │ │ ├── sample_ppc.proj │ │ └── sample_x86.proj └── xmas │ ├── LICENSE │ ├── makefile │ ├── newr4.jpg │ ├── readme.txt │ ├── time │ ├── BitmapView.cpp │ ├── BitmapView.h │ ├── UptimeView.cpp │ ├── UptimeView.h │ ├── UptimeWindow.cpp │ ├── UptimeWindow.h │ └── main.cpp │ ├── xmas.wav │ ├── xmas_ppc.proj │ ├── xmas_x86.proj │ ├── xmas_x86.rsrc │ └── xmas_x86_No_bitmap.rsrc ├── kernel_kit ├── cputime │ ├── cputime.proj │ ├── datadefs.h │ ├── main.cpp │ ├── makefile │ ├── uiclasses.cpp │ └── uiclasses.h └── makefile.all ├── languages ├── ObjectOrientedC │ ├── Makefile │ ├── class.c │ ├── class.h │ └── main.c └── makefile.all ├── media_kit ├── BitmapWriter │ ├── Article.txt │ ├── BitmapMovie.cpp │ ├── BitmapMovie.h │ ├── BitmapWriter.cpp │ ├── BitmapWriter.h │ ├── LICENSE │ └── makefile ├── CodyCam │ ├── CodyCam.cpp │ ├── CodyCam.h │ ├── FtpClient.cpp │ ├── FtpClient.h │ ├── Settings.cpp │ ├── Settings.h │ ├── SettingsHandler.cpp │ ├── SettingsHandler.h │ ├── VideoConsumer.cpp │ ├── VideoConsumer.h │ ├── codycam.rsrc │ └── makefile ├── FilmStrip │ ├── BitmapView.cpp │ ├── BitmapView.h │ ├── ControlWindow.cpp │ ├── ControlWindow.h │ ├── ErrorAlert.cpp │ ├── ErrorAlert.h │ ├── FilmStrip.cpp │ ├── FilmStrip.h │ ├── FilmStrip.rsrc │ ├── FilmStripApp.cpp │ ├── FilmStripApp.h │ ├── FilmStripWindow.cpp │ ├── FilmStripWindow.h │ ├── FilmStrip_PPC.proj │ ├── FilmStrip_x86.proj │ ├── MessageVals.h │ ├── article.txt │ ├── main.cpp │ └── makefile ├── LoggingConsumerApp │ ├── .dependencies │ ├── LICENSE │ ├── LogWriter.cpp │ ├── LogWriter.h │ ├── LoggingConsumer.cpp │ ├── LoggingConsumer.h │ ├── LoggingConsumerApp.cpp │ ├── LoggingConsumerApp_x86.proj │ ├── NodeHarnessApp.cpp │ ├── NodeHarnessApp.h │ ├── NodeHarnessWin.cpp │ ├── NodeHarnessWin.h │ ├── article.html │ └── makefile ├── MediaConverter │ ├── LICENSE │ ├── MediaConverter.cpp │ ├── MediaConverter.h │ ├── MediaConverter_ppc.proj │ ├── MediaConverter_x86.proj │ └── makefile ├── MediaFile │ ├── README │ ├── easy │ │ ├── README │ │ ├── easy-media-reader.cpp │ │ ├── easy-reader.proj │ │ └── makefile │ ├── makefile.all │ ├── mplay │ │ ├── AudioOutput.cpp │ │ ├── AudioOutput.h │ │ ├── Bitmaps.h │ │ ├── DrawingTidbits.cpp │ │ ├── DrawingTidbits.h │ │ ├── MediaPlayer.rsrc │ │ ├── MediaSlider.cpp │ │ ├── MediaSlider.h │ │ ├── MediaView.cpp │ │ ├── MediaView.h │ │ ├── TransportButton.cpp │ │ ├── TransportButton.h │ │ ├── draw.cpp │ │ ├── draw.h │ │ ├── draw_window.cpp │ │ ├── draw_window.h │ │ └── makefile │ ├── transcode │ │ ├── encode.cpp │ │ ├── makefile │ │ └── tcode.cpp │ └── transcode_r5 │ │ ├── makefile │ │ ├── tcode.cpp │ │ └── tcode.proj_x86 ├── Mix-A-Lot │ ├── LICENSE │ ├── Mix-A-Lot │ │ ├── Channel.cpp │ │ ├── Channel.h │ │ ├── FileDock.cpp │ │ ├── FileDock.h │ │ ├── MixALot.rsrc │ │ ├── MixALot_ppc.proj │ │ ├── MixALot_x86.proj │ │ ├── MixApp.cpp │ │ ├── MixApp.h │ │ ├── MixWin.cpp │ │ ├── MixWin.h │ │ ├── MixerManager.cpp │ │ ├── MixerManager.h │ │ ├── SoundDock.cpp │ │ ├── SoundDock.h │ │ ├── article.txt │ │ └── makefile │ └── media_common │ │ ├── Connection.cpp │ │ ├── Connection.h │ │ ├── LogWriter.cpp │ │ ├── LogWriter.h │ │ ├── MediaControlPanelApp.cpp │ │ ├── MediaControlPanelApp.h │ │ ├── MediaNodeWrapper.cpp │ │ ├── MediaNodeWrapper.h │ │ ├── NodeLooper.cpp │ │ ├── NodeLooper.h │ │ ├── array_delete.h │ │ ├── utilmedia.cpp │ │ └── utilmedia.h ├── ParameterSample │ ├── Article │ ├── EasySampleWin.cpp │ ├── EasySampleWin.h │ ├── HarderSampleWin.cpp │ ├── HarderSampleWin.h │ ├── LICENSE │ ├── MediaParams.cpp │ ├── ParamSampleApp.cpp │ ├── ParamSampleApp.h │ ├── ParamSampleApp_x86.proj │ ├── ParameterSample.rsrc │ └── makefile ├── ToneProducer │ ├── .dependencies │ ├── LICENSE │ ├── NodeHarnessApp.cpp │ ├── NodeHarnessApp.h │ ├── NodeHarnessWin.cpp │ ├── NodeHarnessWin.h │ ├── ToneProducer.cpp │ ├── ToneProducer.h │ ├── article.html │ ├── main.cpp │ └── makefile ├── VideoProducer │ ├── AddOn.cpp │ ├── AddOn.h │ ├── Makefile │ ├── Producer.cpp │ └── Producer.h ├── index.html └── makefile.all ├── midi_kit ├── PatchBay │ ├── CountEventConsumer.h │ ├── EndpointInfo.cpp │ ├── EndpointInfo.h │ ├── MidiEventMeter.cpp │ ├── MidiEventMeter.h │ ├── PatchApp.cpp │ ├── PatchApp.h │ ├── PatchBay.rsrc │ ├── PatchBay_ppc.proj │ ├── PatchBay_x86.proj │ ├── PatchRow.cpp │ ├── PatchRow.h │ ├── PatchView.cpp │ ├── PatchView.h │ ├── PatchWin.cpp │ ├── PatchWin.h │ ├── TToolTip.cpp │ ├── TToolTip.h │ ├── UnknownDeviceIcons.h │ └── makefile ├── Transposer │ ├── ChannelMaskWin.cpp │ ├── ChannelMaskWin.h │ ├── MidiUtil.cpp │ ├── MidiUtil.h │ ├── SimpleMidiFilter.cpp │ ├── SimpleMidiFilter.h │ ├── SimpleMidiFilterConsumer.cpp │ ├── SimpleMidiFilterConsumer.h │ ├── Transposer.cpp │ ├── Transposer.h │ ├── Transposer.rsrc │ ├── TransposerApp.cpp │ ├── TransposerApp.h │ ├── TransposerView.cpp │ ├── TransposerView.h │ ├── TransposerWin.cpp │ ├── TransposerWin.h │ ├── Transposer_ppc.proj │ ├── Transposer_x86.proj │ └── makefile ├── index.html └── makefile.all ├── modules ├── makefile.all └── xyz5038 │ ├── LICENSE │ ├── article.txt │ ├── makefile │ ├── xyz5038.c │ ├── xyz5038.h │ ├── xyz5038_ppc.proj │ └── xyz5038_x86.proj ├── network_kit ├── FtpClient │ ├── FtpClient.cpp │ ├── FtpClient.h │ ├── FtpClient_ppc.proj │ ├── FtpClient_x86.proj │ ├── LICENSE │ ├── article.txt │ └── makefile ├── IMAP │ ├── IMAP.cpp │ ├── IMAP.h │ ├── IMAP_For_the_Masses.txt │ ├── LICENSE │ ├── MailCrimez.cpp │ ├── MailCrimez_ppc.proj │ ├── MailCrimez_x86.proj │ └── Makefile ├── NetDisc │ ├── NetDisc.proj.ppc │ ├── NetDisc.proj.x86 │ ├── article.txt │ ├── makefile │ └── netdisc.cpp ├── Tank │ ├── Fish.cpp │ ├── FishBits.h │ ├── FishPortal.cpp │ ├── FishPortal.h │ ├── LICENSE │ ├── Makefile │ ├── Something Fishy.txt │ ├── Tank.rsrc │ ├── TankWindow.cpp │ ├── TankWindow.h │ ├── Tank_ppc.proj │ ├── Tank_x86.proj │ └── dfp.h ├── VoteOften │ ├── LICENSE │ ├── ReadMe │ ├── ScriptTheVote │ ├── VoteOften.rsrc │ ├── VoteOften_ppc.proj │ ├── VoteOften_x86.proj │ ├── VoterApp.cpp │ ├── VoterApp.h │ ├── VoterStats.cpp │ ├── VoterStats.h │ ├── makefile │ ├── voter.cpp │ └── voter.h ├── index.html └── makefile.all ├── open_gl ├── 3Dlife-Voodoo │ ├── 3Dlife_ppc.proj │ ├── 3Dlife_x86.proj │ ├── LICENSE │ ├── article │ ├── common.h │ ├── lifeApp.cpp │ ├── lifeApp.h │ ├── lifeView.cpp │ ├── lifeView.h │ ├── lifeWin.cpp │ ├── lifeWin.h │ ├── makefile │ └── readme.txt ├── 3Dlife │ ├── 3Dlife_ppc.proj │ ├── 3Dlife_x86.proj │ ├── LICENSE │ ├── article │ ├── common.h │ ├── lifeApp.cpp │ ├── lifeApp.h │ ├── lifeView.cpp │ ├── lifeView.h │ ├── lifeWin.cpp │ ├── lifeWin.h │ └── makefile ├── GLTeapot-Voodoo │ ├── FPS.cpp │ ├── FPS.h │ ├── GLObject.cpp │ ├── GLObject.h │ ├── GLTeapot │ ├── GLTeapot.rsrc │ ├── GLTeapot_ppc.proj │ ├── GLTeapot_x86.proj │ ├── LICENSE │ ├── ObjectView.cpp │ ├── ObjectView.h │ ├── README.GLTeapot │ ├── ResScroll.h │ ├── error.cpp │ ├── error.h │ ├── glob.h │ ├── makefile │ ├── readme.txt │ ├── teapot.data │ ├── teapot.h │ ├── teapot_main.cpp │ └── util.h ├── GLTeapot │ ├── FPS.cpp │ ├── FPS.h │ ├── GLObject.cpp │ ├── GLObject.h │ ├── GLTeapot.rsrc │ ├── GLTeapot_ppc.proj │ ├── GLTeapot_x86.proj │ ├── LICENSE │ ├── ObjectView.cpp │ ├── ObjectView.h │ ├── README.GLTeapot │ ├── ResScroll.h │ ├── error.cpp │ ├── error.h │ ├── glob.h │ ├── makefile │ ├── teapot.data │ ├── teapot.h │ ├── teapot_main.cpp │ └── util.h ├── index.html └── makefile.all ├── portability ├── condvar │ ├── Article │ ├── Article2 │ ├── alarm.cpp │ ├── condvar.c │ ├── condvar.h │ ├── errors.h │ └── makefile └── makefile.all ├── screen_savers ├── Ball │ ├── Ball.cpp │ ├── Ball.h │ ├── Ball_ppc.proj │ ├── Ball_x86.pld │ ├── Ball_x86.proj │ └── makefile ├── LICENSE ├── Spots │ ├── Spots.cpp │ ├── Spots.h │ ├── Spots_ppc.proj │ ├── Spots_x86.proj │ └── makefile ├── WhackLoader │ ├── WhackLoader.cpp │ ├── WhackLoader.h │ ├── WhackLoader_ppc.proj │ ├── WhackLoader_x86.proj │ └── makefile ├── index.html └── makefile.all ├── storage_kit ├── DriveDaemon │ ├── DriveDaemon_x86.proj │ ├── article.txt │ ├── daemonapp.cpp │ ├── daemonapp.h │ ├── drive.cpp │ ├── drive.h │ ├── drivedaemon.h │ ├── drivelistener.cpp │ ├── drivelistener.h │ └── makefile ├── FolderWatcher │ ├── Article.txt │ ├── FolderWatcher.cpp │ ├── FolderWatcher.h │ ├── FolderWatcher_ppc.proj │ ├── FolderWatcher_x86.proj │ ├── LICENSE │ ├── Main.cpp │ └── makefile ├── Indexer │ ├── Defs.cpp │ ├── Defs.h │ ├── Indexer.rsrc │ ├── Indexer_ppc.proj │ ├── Indexer_x86.proj │ ├── LICENSE │ ├── article │ ├── dInfoView.cpp │ ├── dInfoView.h │ ├── fInfoView.cpp │ ├── fInfoView.h │ ├── indexer.cpp │ ├── indexer.h │ ├── lInfoView.cpp │ ├── lInfoView.h │ ├── makefile │ ├── vInfoView.cpp │ └── vInfoView.h ├── LiveQueryApp │ ├── Article │ ├── LICENSE │ ├── LiveQueryApp.rdef │ ├── LiveQueryApp_ppc.proj │ ├── LiveQueryApp_x86.proj │ ├── LiveQueryWindow.cpp │ ├── LiveQueryWindow.h │ └── Makefile ├── People │ ├── LICENSE │ ├── People.rsrc │ ├── PeopleApp.cpp │ ├── PeopleApp.h │ ├── PeopleView.cpp │ ├── PeopleView.h │ ├── PeopleWindow.cpp │ ├── PeopleWindow.h │ ├── People_ppc.proj │ ├── People_x86.proj │ ├── PersonIcons.h │ ├── README │ ├── TTextControl.cpp │ ├── TTextControl.h │ ├── main.cpp │ └── makefile ├── QueryApp │ ├── Article │ ├── LICENSE │ ├── Makefile │ ├── QueryApp.rdef │ ├── QueryApp_ppc.proj │ ├── QueryApp_x86.proj │ ├── QueryWindow.cpp │ └── QueryWindow.h ├── index.html └── makefile.all ├── support_kit ├── MultiLock │ ├── LICENSE │ ├── MultiLocker.cpp │ ├── MultiLocker.h │ ├── Newsletter Article │ ├── TestMultiLock_ppc.proj │ ├── TestMultiLock_x86.proj │ ├── Timings PPC │ ├── Timings x86 │ ├── makefile │ └── test.cpp ├── index.html └── makefile.all └── translation_kit ├── TranslatorPanel ├── Common.h ├── TestApp.cpp ├── TestApp.h ├── TestView.cpp ├── TestView.h ├── TestWindow.cpp ├── TestWindow.h ├── TranslatorPanel_ppc.proj ├── TranslatorPanel_x86.proj ├── TranslatorSavePanel.cpp ├── TranslatorSavePanel.h ├── addons │ ├── BlurFilter.cpp │ ├── BlurFilter.h │ ├── EdgesFilter.cpp │ ├── EdgesFilter.h │ ├── GreyscaleFilter.cpp │ ├── GreyscaleFilter.h │ ├── ImageFilter.h │ ├── buildaddons │ ├── makefile.Blur │ ├── makefile.Edges │ └── makefile.Greyscale └── makefile ├── TranslatorTemplate ├── TranslatorTemplate.cpp ├── TranslatorTemplate.h ├── TranslatorTemplate_ppc.proj ├── TranslatorTemplate_x86.proj └── makefile ├── index.html ├── makefile.all ├── ppm ├── LICENSE ├── PPMMain.cpp ├── PPMTranslator.cpp ├── PPMTranslator_ppc.proj ├── PPMTranslator_x86.proj ├── README ├── article.txt ├── colorspace.cpp ├── colorspace.h ├── foo.ppm └── makefile └── translate ├── LICENSE ├── foo.ppm ├── index.html ├── makefile ├── translate.cpp ├── translate_ppc.proj └── translate_x86.proj /.gitignore: -------------------------------------------------------------------------------- 1 | objects.* 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BeOSSampleCode 2 | 3 | This repository holds the original BeOS developer sample code for those interested in learning the BeOS / Haiku APIs. It also has a branch of the original archive (`master`) and a port to Haiku (in the `haiku` branch). 4 | 5 | Although some projects in the sample code compiles on Haiku with small changes, there are still some which use the old BeOS APIs which need to updated to use the Haiku API. -------------------------------------------------------------------------------- /add-ons/LoadAddon/Effects/Effect_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/add-ons/LoadAddon/Effects/Effect_ppc.proj -------------------------------------------------------------------------------- /add-ons/LoadAddon/Effects/Effect_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/add-ons/LoadAddon/Effects/Effect_x86.proj -------------------------------------------------------------------------------- /add-ons/LoadAddon/Effects/effect.h: -------------------------------------------------------------------------------- 1 | //**************************************** 2 | // effect.h 3 | //**************************************** 4 | 5 | /* 6 | Copyright 1999, Be Incorporated. All Rights Reserved. 7 | This file may be used under the terms of the Be Sample Code License. 8 | */ 9 | 10 | #ifndef EFFECT_H 11 | #define EFFECT_H 12 | 13 | #include 14 | #include 15 | 16 | //**************************************** 17 | //Effect class 18 | class Effect 19 | { 20 | public: 21 | //constructor and destructor 22 | Effect( image_id ); 23 | 24 | //operations 25 | virtual void GetButtonSize( BPoint* ); 26 | virtual void Init( BWindow*, BPoint ); 27 | 28 | protected: 29 | //members 30 | image_id mId; 31 | BButton *mpButton; 32 | }; 33 | 34 | //**************************************** 35 | 36 | #endif //EFFECT_H 37 | -------------------------------------------------------------------------------- /add-ons/LoadAddon/Effects/effectaddon.cpp: -------------------------------------------------------------------------------- 1 | //**************************************** 2 | // effectaddon.c 3 | //**************************************** 4 | /* 5 | Copyright 1999, Be Incorporated. All Rights Reserved. 6 | This file may be used under the terms of the Be Sample Code License. 7 | */ 8 | #include "effect.h" 9 | 10 | #include 11 | 12 | //**************************************** 13 | 14 | extern "C" _EXPORT Effect* NewEffect( image_id ); 15 | 16 | //**************************************** 17 | 18 | Effect* NewEffect( image_id id ) 19 | { 20 | Effect* effect; 21 | effect = new Effect( id ); 22 | return effect; 23 | } 24 | -------------------------------------------------------------------------------- /add-ons/LoadAddon/LoadAddon.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/add-ons/LoadAddon/LoadAddon.rsrc -------------------------------------------------------------------------------- /add-ons/LoadAddon/LoadAddon_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/add-ons/LoadAddon/LoadAddon_ppc.proj -------------------------------------------------------------------------------- /add-ons/LoadAddon/LoadAddon_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/add-ons/LoadAddon/LoadAddon_x86.proj -------------------------------------------------------------------------------- /add-ons/LoadAddon/effectpal.h: -------------------------------------------------------------------------------- 1 | //**************************************** 2 | //effectpal.h 3 | //**************************************** 4 | /* 5 | Copyright 1999, Be Incorporated. All Rights Reserved. 6 | This file may be used under the terms of the Be Sample Code License. 7 | */ 8 | 9 | #ifndef EFFECTPAL_H 10 | #define EFFECTPAL_H 11 | 12 | #include 13 | 14 | class EffectPal : public BWindow 15 | { 16 | public: 17 | EffectPal( BRect, const char*, window_type, uint32, uint32 ); 18 | ~EffectPal(); 19 | 20 | void Init( void ); 21 | virtual bool QuitRequested(); 22 | 23 | }; 24 | 25 | 26 | //**************************************** 27 | #endif //EFFECTPAL_H 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /add-ons/LoadAddon/loadaddonapp.cpp: -------------------------------------------------------------------------------- 1 | //******************************* 2 | // loadaddonapp.cpp 3 | //******************************* 4 | /* 5 | Copyright 1999, Be Incorporated. All Rights Reserved. 6 | This file may be used under the terms of the Be Sample Code License. 7 | */ 8 | 9 | #include "loadaddonapp.h" 10 | #include "effectpal.h" 11 | 12 | 13 | int main(int, char**) 14 | { 15 | LoadAddOnApp app; 16 | 17 | app.Run(); 18 | 19 | return (0); 20 | } 21 | 22 | 23 | LoadAddOnApp::LoadAddOnApp() 24 | : BApplication("application/x-vnd.Be-LoadAddOnSample") 25 | { 26 | BRect rect( 100, 100, 200, 200 ); 27 | 28 | EffectPal *palette = new EffectPal( rect, "Effects", B_TITLED_WINDOW, 0, 0 ); 29 | 30 | palette->Init(); 31 | 32 | palette->Show(); 33 | } 34 | 35 | -------------------------------------------------------------------------------- /add-ons/LoadAddon/loadaddonapp.h: -------------------------------------------------------------------------------- 1 | //******************************* 2 | // loadaddonapp.h 3 | //******************************* 4 | /* 5 | Copyright 1999, Be Incorporated. All Rights Reserved. 6 | This file may be used under the terms of the Be Sample Code License. 7 | */ 8 | 9 | #ifndef LOAD_ADDON_APP_H 10 | #define LOAD_ADDON_APP_H 11 | 12 | #include 13 | 14 | class LoadAddOnApp : public BApplication 15 | { 16 | public: 17 | LoadAddOnApp(); 18 | }; 19 | 20 | #endif -------------------------------------------------------------------------------- /add-ons/LoadAddon/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for the LoadAddon sample 2 | 3 | default .DEFAULT: 4 | -@$(MAKE) -C Effects $@ 5 | -@$(MAKE) $@ 6 | -------------------------------------------------------------------------------- /add-ons/MailMarker/EditWindow.h: -------------------------------------------------------------------------------- 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 | #ifndef EDIT_WINDOW_H 7 | #define EDIT_WINDOW_H 8 | 9 | #include 10 | 11 | class BListView; 12 | class BTextControl; 13 | class BFile; 14 | class BButton; 15 | 16 | class EditWindow : public BWindow { 17 | public: 18 | EditWindow(BFile *file, char **buffer); 19 | virtual ~EditWindow(); 20 | 21 | void MessageReceived(BMessage *msg); 22 | private: 23 | BTextView * fText; 24 | BButton * fRevert; 25 | BButton * fSave; 26 | char * fBuffer; 27 | char ** fOrigin; 28 | BFile * fFile; 29 | }; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /add-ons/MailMarker/MailMarker_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/add-ons/MailMarker/MailMarker_ppc.proj -------------------------------------------------------------------------------- /add-ons/MailMarker/MailMarker_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/add-ons/MailMarker/MailMarker_x86.proj -------------------------------------------------------------------------------- /add-ons/dosfs/dlist.h: -------------------------------------------------------------------------------- 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 | #ifndef _DOSFS_DLIST_H_ 7 | #define _DOSFS_DLIST_H_ 8 | 9 | status_t dlist_init(nspace *vol); 10 | status_t dlist_uninit(nspace *vol); 11 | status_t dlist_add(nspace *vol, vnode_id vnid); 12 | status_t dlist_remove(nspace *vol, vnode_id vnid); 13 | vnode_id dlist_find(nspace *vol, uint32 cluster); 14 | 15 | void dlist_dump(nspace *vol); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /add-ons/dosfs/inc/kalloc.h: -------------------------------------------------------------------------------- 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 | #ifndef _ALLOC_H 7 | #define _ALLOC_H 8 | 9 | #include 10 | 11 | #if KMALLOC_TRACKING 12 | extern bool kmalloc_tracking_enabled; 13 | #endif 14 | 15 | extern void init_malloc(void); 16 | extern void init_smalloc(void); 17 | 18 | extern void * smalloc(unsigned int nbytes); 19 | extern void sfree(void *ptr); 20 | extern void * scalloc(unsigned int nobj, unsigned int size); 21 | extern void * srealloc(void *p, unsigned int newsize); 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /add-ons/dosfs/inc/rtc_info.h: -------------------------------------------------------------------------------- 1 | /* ++++++++++ 2 | FILE: rtc_info.h 3 | NAME: mani 4 | DATE: 2/1998 5 | Copyright 1999, Be Incorporated. All Rights Reserved. 6 | This file may be used under the terms of the Be Sample Code License. 7 | +++++ */ 8 | 9 | #ifndef _RTC_INFO_H 10 | #define _RTC_INFO_H 11 | 12 | typedef struct { 13 | uint32 time; 14 | bool is_gmt; 15 | int32 tz_minuteswest; 16 | int32 tz_dsttime; 17 | } rtc_info; 18 | 19 | #define RTC_SETTINGS_FILE "RTC_time_settings" 20 | 21 | extern _IMPEXP_KERNEL status_t get_rtc_info(rtc_info *); 22 | 23 | #endif /* _RTC_INFO_H */ 24 | -------------------------------------------------------------------------------- /add-ons/dosfs/mime_table/mime_table.h: -------------------------------------------------------------------------------- 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 | #ifndef MIME_TYPES_H 7 | #define MIME_TYPES_H 8 | 9 | struct ext_mime { 10 | char *extension; 11 | char *mime; 12 | }; 13 | 14 | extern struct ext_mime mimes[]; 15 | 16 | #endif -------------------------------------------------------------------------------- /add-ons/dosfs/version.c: -------------------------------------------------------------------------------- 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 | const char *build_time = __TIME__; 7 | const char *build_date = __DATE__; 8 | -------------------------------------------------------------------------------- /add-ons/iso9660/README: -------------------------------------------------------------------------------- 1 | To set things up to create a filesystem: 2 | 3 | * the files fsproto.h, lock.h, and cache.h are private 4 | headers and will change in the future. they are here 5 | only so you can develop file systems now. 6 | 7 | * if you intend to use the IDE for your development you 8 | will need to delete the sym link _KERNEL_ and instead 9 | copy /boot/beos/system/kernel_mac into this directory 10 | and call it _KERNEL_ (this is because the IDE can't 11 | deal with a symlink to a kernel but the command line 12 | tools can). 13 | 14 | * modify kernel_interface.c to suit your filesystem 15 | 16 | * run the makefile. it puts a copy of the file system 17 | into ~/config/add-ons/kernel/file_systems. Then you 18 | have to mount your file system using the mount tool 19 | in the shell (with the "-t fstype" argument to specify 20 | your file system). 21 | -------------------------------------------------------------------------------- /add-ons/iso9660/iso9660_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/add-ons/iso9660/iso9660_ppc.proj -------------------------------------------------------------------------------- /add-ons/iso9660/iso9660_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/add-ons/iso9660/iso9660_x86.proj -------------------------------------------------------------------------------- /add-ons/iso9660/lock.h: -------------------------------------------------------------------------------- 1 | #ifndef _LOCK_H 2 | #define _LOCK_H 3 | 4 | #include 5 | 6 | #include 7 | 8 | typedef struct lock lock; 9 | typedef struct mlock mlock; 10 | 11 | struct lock { 12 | sem_id s; 13 | long c; 14 | }; 15 | 16 | struct mlock { 17 | sem_id s; 18 | }; 19 | 20 | extern _IMPEXP_KERNEL int new_lock(lock *l, const char *name); 21 | extern _IMPEXP_KERNEL int free_lock(lock *l); 22 | 23 | #define LOCK(l) if (atomic_add(&l.c, -1) <= 0) acquire_sem(l.s); 24 | #define UNLOCK(l) if (atomic_add(&l.c, 1) < 0) release_sem(l.s); 25 | 26 | extern _IMPEXP_KERNEL int new_mlock(mlock *l, long c, const char *name); 27 | extern _IMPEXP_KERNEL int free_mlock(mlock *l); 28 | 29 | #define LOCKM(l,cnt) acquire_sem_etc(l.s, cnt, 0, 0) 30 | #define UNLOCKM(l,cnt) release_sem_etc(l.s, cnt, 0) 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /add-ons/iso9660/rock.h: -------------------------------------------------------------------------------- 1 | // rock.h 2 | 3 | /* 4 | Copyright 1999, Be Incorporated. All Rights Reserved. 5 | This file may be used under the terms of the Be Sample Code License. 6 | */ 7 | 8 | // Altername name field flags. 9 | enum 10 | { 11 | NM_CONTINUE = 1, 12 | NM_CURRENT = 2, 13 | NM_PARENT = 4, 14 | NM_HOST = 32 15 | }NMFLAGS; 16 | 17 | // Symbolic link field flags 18 | enum 19 | { 20 | SL_CONTINUE = 1 21 | }SLFLAGS; 22 | 23 | // Symbolic link field component flags 24 | enum 25 | { 26 | SLCP_CONTINUE = 1, 27 | SLCP_CURRENT = 2, 28 | SLCP_PARENT = 4, 29 | SLCP_ROOT = 8, 30 | SLCP_VOLROOT = 16, 31 | SLCP_HOST = 32 32 | }SLCPFLAGS; -------------------------------------------------------------------------------- /add-ons/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all "add-ons" sample code 2 | 3 | SUBMAKES = \ 4 | LoadAddon 5 | 6 | LEAFDIRS = \ 7 | MailMarker \ 8 | dosfs \ 9 | iso9660 10 | 11 | default .DEFAULT: 12 | -@for f in $(SUBMAKES); do \ 13 | $(MAKE) -C $$f -f makefile.all $@; \ 14 | done 15 | -@for f in $(LEAFDIRS); do \ 16 | $(MAKE) -C $$f $@; \ 17 | done 18 | -------------------------------------------------------------------------------- /application_kit/AppKitModel/HandlerAsDataObject/StringApplication.h: -------------------------------------------------------------------------------- 1 | /* StringAppkication.h */ 2 | 3 | /* 4 | Copyright 1999, Be Incorporated. All Rights Reserved. 5 | This file may be used under the terms of the Be Sample Code License. 6 | */ 7 | 8 | #ifndef STRING_APPLICATION_H 9 | #define STRING_APPLICATION_H 10 | 11 | #include 12 | 13 | class StringLooper; 14 | 15 | class StringApplication : public BApplication { 16 | public: 17 | StringApplication(); 18 | virtual ~StringApplication(); 19 | virtual bool QuitRequested(); 20 | virtual void ReadyToRun(); 21 | 22 | private: 23 | void TestPhrase(const char *name, const char *phrase); 24 | StringLooper * fStrings; 25 | }; 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /application_kit/AppKitModel/HandlerAsDataObject/StringApplication.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/AppKitModel/HandlerAsDataObject/StringApplication.rsrc -------------------------------------------------------------------------------- /application_kit/AppKitModel/HandlerAsDataObject/StringApplication_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/AppKitModel/HandlerAsDataObject/StringApplication_ppc.proj -------------------------------------------------------------------------------- /application_kit/AppKitModel/HandlerAsDataObject/StringApplication_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/AppKitModel/HandlerAsDataObject/StringApplication_x86.proj -------------------------------------------------------------------------------- /application_kit/AppKitModel/HandlerAsDataObject/StringHandler.h: -------------------------------------------------------------------------------- 1 | /* StringHandler.h */ 2 | 3 | /* 4 | Copyright 1999, Be Incorporated. All Rights Reserved. 5 | This file may be used under the terms of the Be Sample Code License. 6 | */ 7 | 8 | #ifndef STRING_HANDLER_H 9 | #define STRING_HANDLER_H 10 | 11 | #include 12 | #include 13 | 14 | class StringHandler : public BHandler { 15 | public: 16 | StringHandler(const char *value, const char *name = NULL); 17 | virtual ~StringHandler(); 18 | 19 | virtual void MessageReceived(BMessage *msg); 20 | 21 | private: 22 | void UpperCase(); 23 | void LowerCase(); 24 | void MixedCase(); 25 | void GetValue(BMessage *msg) const; 26 | void SetValue(BMessage *msg); 27 | void GetInfo(BMessage *msg) const; 28 | 29 | BString fValue; 30 | }; 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /application_kit/AppKitModel/HandlerAsDataObject/StringHandlerProtocol.h: -------------------------------------------------------------------------------- 1 | /* StringHandlerProtocol.h */ 2 | 3 | /* 4 | Copyright 1999, Be Incorporated. All Rights Reserved. 5 | This file may be used under the terms of the Be Sample Code License. 6 | */ 7 | 8 | #ifndef STRING_HANDLER_PROTOCOL_H 9 | #define STRING_HANDLER_PROTOCOL_H 10 | 11 | const uint32 LOWERCASE = 'lwrc'; 12 | const uint32 UPPERCASE = 'uprc'; 13 | const uint32 MIXEDCASE = 'mixc'; 14 | const uint32 GET_VALUE = 'gval'; 15 | const uint32 SET_VALUE = 'sval'; 16 | 17 | const uint32 NEW_STRING = 'news'; 18 | const uint32 GET_STRINGS = 'gstr'; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /application_kit/AppKitModel/HandlerAsDataObject/StringLooper.h: -------------------------------------------------------------------------------- 1 | /* StringLooper.h */ 2 | 3 | /* 4 | Copyright 1999, Be Incorporated. All Rights Reserved. 5 | This file may be used under the terms of the Be Sample Code License. 6 | */ 7 | 8 | #ifndef STRING_LOOPER_H 9 | #define STRING_LOOPER_H 10 | 11 | #include 12 | 13 | class StringLooper : public BLooper { 14 | public: 15 | StringLooper(); 16 | virtual ~StringLooper(); 17 | 18 | virtual void MessageReceived(BMessage *msg); 19 | virtual bool QuitRequested(); 20 | private: 21 | void NewString(BMessage *msg); 22 | void GetStrings(BMessage *msg); 23 | }; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /application_kit/AppKitModel/HandlerAsOperation/StringFilter.h: -------------------------------------------------------------------------------- 1 | /* StringFilter.h */ 2 | 3 | /* 4 | Copyright 1999, Be Incorporated. All Rights Reserved. 5 | This file may be used under the terms of the Be Sample Code License. 6 | */ 7 | 8 | #ifndef STRING_FILTER_H 9 | #define STRING_FILTER_H 10 | 11 | #include 12 | 13 | class BString; 14 | 15 | class StringFilter : public BHandler { 16 | public: 17 | StringFilter(const char *name); 18 | virtual ~StringFilter(); 19 | 20 | virtual void MessageReceived(BMessage *msg); 21 | 22 | private: 23 | // change the string directly 24 | virtual void Filter(BString &string) = 0; 25 | //add an operation name, opcode and description for each opcode handled 26 | virtual void Opcodes(BMessage *info) = 0; 27 | /* handle the replies for the filtering */ 28 | void FilterStrings(BMessage *msg); 29 | }; 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /application_kit/AppKitModel/HandlerAsOperation/StringFilterApp.h: -------------------------------------------------------------------------------- 1 | /* StringFilterApp.h */ 2 | 3 | /* 4 | Copyright 1999, Be Incorporated. All Rights Reserved. 5 | This file may be used under the terms of the Be Sample Code License. 6 | */ 7 | 8 | #ifndef STRING_FILTER_APP_H 9 | #define STRING_FILTER_APP_H 10 | 11 | #include 12 | 13 | class StringFilterLooper; 14 | 15 | class StringFilterApp : public BApplication { 16 | public: 17 | StringFilterApp(); 18 | virtual ~StringFilterApp(); 19 | 20 | virtual void ReadyToRun(); 21 | virtual bool QuitRequested(); 22 | private: 23 | StringFilterLooper * fFilters; 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /application_kit/AppKitModel/HandlerAsOperation/StringFilterApp.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/AppKitModel/HandlerAsOperation/StringFilterApp.rsrc -------------------------------------------------------------------------------- /application_kit/AppKitModel/HandlerAsOperation/StringFilterApp_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/AppKitModel/HandlerAsOperation/StringFilterApp_ppc.proj -------------------------------------------------------------------------------- /application_kit/AppKitModel/HandlerAsOperation/StringFilterApp_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/AppKitModel/HandlerAsOperation/StringFilterApp_x86.proj -------------------------------------------------------------------------------- /application_kit/AppKitModel/HandlerAsOperation/StringFilterLooper.h: -------------------------------------------------------------------------------- 1 | /* StringFilterLooper.h */ 2 | 3 | /* 4 | Copyright 1999, Be Incorporated. All Rights Reserved. 5 | This file may be used under the terms of the Be Sample Code License. 6 | */ 7 | 8 | #ifndef STRING_FILTER_LOOPER_H 9 | #define STRING_FILTER_LOOPER_H 10 | 11 | #include 12 | 13 | class BList; 14 | 15 | class StringFilterLooper : public BLooper { 16 | public: 17 | StringFilterLooper(); 18 | virtual ~StringFilterLooper(); 19 | 20 | virtual void MessageReceived(BMessage *msg); 21 | virtual bool QuitRequested(); 22 | virtual void LoadFilters(); 23 | private: 24 | virtual void GetOpcodes(BMessage *msg); 25 | virtual void Filter(BMessage *msg); 26 | }; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /application_kit/AppKitModel/HandlerAsOperation/StringFilterProtocol.h: -------------------------------------------------------------------------------- 1 | /* StringFilterProtocol.h */ 2 | 3 | /* 4 | Copyright 1999, Be Incorporated. All Rights Reserved. 5 | This file may be used under the terms of the Be Sample Code License. 6 | */ 7 | 8 | #ifndef STRING_FILTER_PROTOCOL_H 9 | #define STRING_FILTER_PROTOCOL_H 10 | 11 | const uint32 OPCODES = 'opcd'; 12 | const uint32 FILTER = 'filt'; 13 | 14 | #endif 15 | 16 | -------------------------------------------------------------------------------- /application_kit/AppKitModel/makefile: -------------------------------------------------------------------------------- 1 | # Makefile for the AppKitModel samples 2 | 3 | SUBDIRS = \ 4 | HandlerAsDataObject \ 5 | HandlerAsOperation 6 | 7 | default .DEFAULT: 8 | -@for f in $(SUBDIRS) ; do \ 9 | $(MAKE) -C $$f $@; \ 10 | done 11 | -------------------------------------------------------------------------------- /application_kit/BeBounce/BeBounce.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/BeBounce/BeBounce.rsrc -------------------------------------------------------------------------------- /application_kit/BeBounce/BeBounce_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/BeBounce/BeBounce_ppc.proj -------------------------------------------------------------------------------- /application_kit/BeBounce/BeBounce_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/BeBounce/BeBounce_x86.proj -------------------------------------------------------------------------------- /application_kit/BeBounce/README.BeBounce: -------------------------------------------------------------------------------- 1 | BeBounce Project README 2 | ======================= 3 | 4 | This project demonstrates interapplication communication. When the application 5 | starts, a ball bounces in a window. By starting another copy, the ball can 6 | bounce between the two applications. 7 | 8 | Files 9 | ===== 10 | 11 | The archive should contain the following files: 12 | 13 | README.BeBounce -- This file 14 | BeBounce_ppc.proj -- PPC project file 15 | BeBounce_x86.proj -- Intel project file 16 | makefile -- project makefile 17 | BeBounce.rsrc -- Application resource file 18 | 19 | main.cpp -- Source files 20 | main.h 21 | Crunch.cpp 22 | Crunch.h 23 | 24 | -------------------------------------------------------------------------------- /application_kit/Container/Container.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Container/Container.rsrc -------------------------------------------------------------------------------- /application_kit/Container/Container_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Container/Container_ppc.proj -------------------------------------------------------------------------------- /application_kit/Container/Container_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Container/Container_x86.proj -------------------------------------------------------------------------------- /application_kit/EZLauncher/EZLauncher_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/EZLauncher/EZLauncher_ppc.proj -------------------------------------------------------------------------------- /application_kit/EZLauncher/EZLauncher_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/EZLauncher/EZLauncher_x86.proj -------------------------------------------------------------------------------- /application_kit/Magnify/Magnify.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Magnify/Magnify.rsrc -------------------------------------------------------------------------------- /application_kit/Magnify/Magnify_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Magnify/Magnify_ppc.proj -------------------------------------------------------------------------------- /application_kit/Magnify/Magnify_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Magnify/Magnify_x86.proj -------------------------------------------------------------------------------- /application_kit/Pulse/PrefsWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2006 Haiku, Inc. All Rights Reserved. 3 | * Distributed under the terms of the MIT license. 4 | * 5 | * Copyright 1999, Be Incorporated. All Rights Reserved. 6 | * This file may be used under the terms of the Be Sample Code License. 7 | * 8 | * Written by: Daniel Switkin 9 | */ 10 | #ifndef PREFS_WINDOW_H 11 | #define PREFS_WINDOW_H 12 | 13 | 14 | #include "Prefs.h" 15 | 16 | #include 17 | #include 18 | 19 | class BTabView; 20 | 21 | class PrefsWindow : public BWindow { 22 | public: 23 | PrefsWindow(BRect rect, const char *name, BMessenger *messenger, Prefs *prefs); 24 | virtual ~PrefsWindow(); 25 | 26 | virtual void MessageReceived(BMessage *message); 27 | virtual bool QuitRequested(); 28 | 29 | private: 30 | BTabView* fTabView; 31 | BMessenger fTarget; 32 | Prefs* fPrefs; 33 | }; 34 | 35 | #endif // PREFS_WINDOW_H 36 | -------------------------------------------------------------------------------- /application_kit/Pulse/Pulse.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Pulse/Pulse.rsrc -------------------------------------------------------------------------------- /application_kit/Pulse/Pulse_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Pulse/Pulse_ppc.proj -------------------------------------------------------------------------------- /application_kit/Pulse/Pulse_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Pulse/Pulse_x86.proj -------------------------------------------------------------------------------- /application_kit/Scripter/ScriptWorld/PropDump.h: -------------------------------------------------------------------------------- 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 | #ifndef _propdump_h 7 | #define _propdump_h 8 | 9 | #include 10 | #include 11 | 12 | enum { 13 | MSG_IS_SPEC = 0x00000001, 14 | MSG_IS_CMD = 0x00000002 15 | }; 16 | 17 | BString DumpMessage(const BMessage* msg, uint32 dumpFlags = 0, 18 | int32 pprint = 0); 19 | BString DumpMessageField(const BMessage* msg, const char* name, 20 | type_code type, int32 count, uint32 dumpFlags, int32 pprint); 21 | BString DumpPropInfo(const BPropertyInfo* info, int32 pprint); 22 | BString GetCommandName(type_code command); 23 | BString GetSpecName(type_code spec); 24 | 25 | #endif /* _propdump_h */ -------------------------------------------------------------------------------- /application_kit/Scripter/ScriptWorld/README.ScriptWorld: -------------------------------------------------------------------------------- 1 | ScriptWorld Project README 2 | ========================== 3 | 4 | This is simple application that demonstrates Be scripting. 5 | It allows you to build and send scripting messages to any 6 | open application, window, or view. 7 | 8 | Files 9 | ===== 10 | 11 | The archive should contain the following files: 12 | 13 | README.ScriptWorld -- This file 14 | ScriptWorld.proj -- BeIDE project file 15 | ScriptWorld.rsrc -- Application resource file 16 | makefile -- project makefile 17 | 18 | ScriptWorld.cpp -- Source files 19 | ScriptWorld.h 20 | ScriptWindow.cpp 21 | ScriptWindow.h 22 | ScriptView.cpp 23 | ScriptView.h 24 | SendView.cpp 25 | SendView.h 26 | PropDump.cpp 27 | PropDump.h -------------------------------------------------------------------------------- /application_kit/Scripter/ScriptWorld/ScriptView.h: -------------------------------------------------------------------------------- 1 | /* 2 | ScriptView.h 3 | 4 | Copyright 1997 Be Incorporated, All Rights Reserved. 5 | */ 6 | 7 | /* 8 | Copyright 1999, Be Incorporated. All Rights Reserved. 9 | This file may be used under the terms of the Be Sample Code License. 10 | */ 11 | 12 | #ifndef SCRIPT_VIEW_H 13 | #define SCRIPT_VIEW_H 14 | 15 | #ifndef _OUTLINE_LIST_VIEW_H 16 | #include 17 | #endif 18 | 19 | class ScriptView : public BOutlineListView 20 | { 21 | public: 22 | ScriptView(BRect frame, const char *name); 23 | 24 | virtual status_t FillList(); /* creates the list */ 25 | virtual status_t Invoke(BMessage *msg = NULL); 26 | }; 27 | 28 | #endif //SCRIPT_VIEW_H 29 | -------------------------------------------------------------------------------- /application_kit/Scripter/ScriptWorld/ScriptWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | ScriptWindow.h 3 | 4 | Copyright 1997 Be Incorporated, All Rights Reserved. 5 | */ 6 | 7 | /* 8 | Copyright 1999, Be Incorporated. All Rights Reserved. 9 | This file may be used under the terms of the Be Sample Code License. 10 | */ 11 | 12 | #ifndef SCRIPT_WINDOW_H 13 | #define SCRIPT_WINDOW_H 14 | 15 | #ifndef _WINDOW_H 16 | #include 17 | #endif 18 | 19 | class ScriptWindow : public BWindow 20 | { 21 | public: 22 | ScriptWindow(BRect frame); 23 | virtual bool QuitRequested(); 24 | }; 25 | 26 | #endif //SCRIPT_WINDOW_H 27 | -------------------------------------------------------------------------------- /application_kit/Scripter/ScriptWorld/ScriptWorld.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ScriptWorld.cpp 3 | 4 | Copyright 1999, Be Incorporated. All Rights Reserved. 5 | This file may be used under the terms of the Be Sample Code License. 6 | */ 7 | 8 | #ifndef SCRIPT_WINDOW_H 9 | #include "ScriptWindow.h" 10 | #endif 11 | #ifndef SCRIPT_WORLD_H 12 | #include "ScriptWorld.h" 13 | #endif 14 | 15 | int main(int, char**) 16 | { 17 | ScriptApplication myApplication; 18 | 19 | myApplication.Run(); 20 | 21 | return(0); 22 | } 23 | 24 | ScriptApplication::ScriptApplication() 25 | : BApplication("application/x-vnd.Be-DTS.ScriptWorld") 26 | { 27 | ScriptWindow *aWindow; 28 | BRect aRect; 29 | 30 | // set up a rectangle and instantiate a new window 31 | aRect.Set(100, 80, 260, 280); 32 | aWindow = new ScriptWindow(aRect); 33 | 34 | // make window visible 35 | aWindow->Show(); 36 | } 37 | -------------------------------------------------------------------------------- /application_kit/Scripter/ScriptWorld/ScriptWorld.h: -------------------------------------------------------------------------------- 1 | /* 2 | ScriptWorld.h 3 | 4 | Copyright 1999, Be Incorporated. All Rights Reserved. 5 | This file may be used under the terms of the Be Sample Code License. 6 | */ 7 | 8 | #ifndef SCRIPT_WORLD_H 9 | #define SCRIPT_WORLD_H 10 | 11 | #ifndef _APPLICATION_H 12 | #include 13 | #endif 14 | 15 | class ScriptApplication : public BApplication 16 | { 17 | public: 18 | ScriptApplication(); 19 | }; 20 | 21 | #endif //SCRIPT_WORLD_H 22 | -------------------------------------------------------------------------------- /application_kit/Scripter/ScriptWorld/ScriptWorld_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Scripter/ScriptWorld/ScriptWorld_ppc.proj -------------------------------------------------------------------------------- /application_kit/Scripter/ScriptWorld/ScriptWorld_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Scripter/ScriptWorld/ScriptWorld_x86.proj -------------------------------------------------------------------------------- /application_kit/Scripter/makefile: -------------------------------------------------------------------------------- 1 | # makefile for Scripter 2 | 3 | LEAFDIRS = \ 4 | FIR \ 5 | ScriptWorld 6 | 7 | default .DEFAULT: 8 | -@for f in $(LEAFDIRS); do \ 9 | $(MAKE) -C $$f $@; \ 10 | done 11 | -------------------------------------------------------------------------------- /application_kit/ShelfInspector/ShelfInspector_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/ShelfInspector/ShelfInspector_ppc.proj -------------------------------------------------------------------------------- /application_kit/ShelfInspector/ShelfInspector_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/ShelfInspector/ShelfInspector_x86.proj -------------------------------------------------------------------------------- /application_kit/ShelfInspector/main.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 "main.h" 9 | 10 | extern const char *INFO_WINDOW_TITLE = "Shelf Inspector"; 11 | 12 | /*------------------------------------------------------------*/ 13 | 14 | int main(int argc, char* argv[]) 15 | { 16 | BApplication app("application/x-vnd.Be-shelf-inspector"); 17 | 18 | be_roster->Launch("application/x-vnd.Be-MYTE"); // Launch the Container Demo 19 | 20 | BWindow *rw = new TInfoWindow(BRect(100, 50, 380, 400), INFO_WINDOW_TITLE); 21 | rw->Show(); 22 | app.Run(); 23 | return 0; 24 | } -------------------------------------------------------------------------------- /application_kit/Thesaurus/DragSelector.h: -------------------------------------------------------------------------------- 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 | // 7 | // Drag selector shows an icon which can be dragged onto a view in another application 8 | // to return a messenger to it. 9 | // 10 | 11 | #ifndef DRAGGER_H 12 | #define DRAGGER_H 13 | 14 | #include 15 | 16 | class Bitmap; 17 | 18 | class DragSelector : public BView { 19 | public: 20 | 21 | DragSelector(BRect); 22 | ~DragSelector(); 23 | void Enable(); 24 | void Disable(); 25 | virtual void Draw(BRect); 26 | virtual void MouseDown(BPoint); 27 | virtual void MessageReceived(BMessage *msg); 28 | 29 | private: 30 | 31 | BBitmap *fBitmap; 32 | bool fEnabled; 33 | }; 34 | 35 | #endif -------------------------------------------------------------------------------- /application_kit/Thesaurus/Thesaurus.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Thesaurus/Thesaurus.rsrc -------------------------------------------------------------------------------- /application_kit/Thesaurus/Thesaurus_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Thesaurus/Thesaurus_ppc.proj -------------------------------------------------------------------------------- /application_kit/Thesaurus/Thesaurus_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Thesaurus/Thesaurus_x86.proj -------------------------------------------------------------------------------- /application_kit/Watcher/Watcher_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Watcher/Watcher_ppc.proj -------------------------------------------------------------------------------- /application_kit/Watcher/Watcher_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/Watcher/Watcher_x86.proj -------------------------------------------------------------------------------- /application_kit/colorPickerModule/colorPickerClient/ColorPickerClient_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/colorPickerModule/colorPickerClient/ColorPickerClient_ppc.proj -------------------------------------------------------------------------------- /application_kit/colorPickerModule/colorPickerClient/ColorPickerClient_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/colorPickerModule/colorPickerClient/ColorPickerClient_x86.proj -------------------------------------------------------------------------------- /application_kit/colorPickerModule/colorPickerClient/SimpleWindow.h: -------------------------------------------------------------------------------- 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 | #ifndef __SIMPLE_WINDOW__ 7 | #define __SIMPLE_WINDOW__ 8 | 9 | #include 10 | #include 11 | 12 | class SimpleView : public BBox { 13 | public: 14 | SimpleView(BRect frame); 15 | 16 | protected: 17 | virtual void MessageReceived(BMessage *); 18 | virtual void AttachedToWindow(); 19 | 20 | private: 21 | typedef BBox _inherited; 22 | }; 23 | 24 | class SimpleWindow : public BWindow { 25 | public: 26 | SimpleWindow(BPoint offset); 27 | 28 | protected: 29 | virtual void MessageReceived(BMessage *); 30 | virtual bool QuitRequested(); 31 | 32 | private: 33 | 34 | typedef BWindow _inherited; 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /application_kit/colorPickerModule/colorPickerClient/main.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 | 8 | #include "SimpleWindow.h" 9 | 10 | class ColorPickingApp : public BApplication { 11 | public: 12 | ColorPickingApp() 13 | : BApplication("application/x-vnd.Be.sampleColorPickerUser") 14 | {} 15 | 16 | protected: 17 | virtual void ReadyToRun() 18 | { 19 | (new SimpleWindow(BPoint(200, 200)))->Show(); 20 | } 21 | 22 | }; 23 | 24 | int 25 | main() 26 | { 27 | ColorPickingApp app; 28 | app.Run(); 29 | 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /application_kit/colorPickerModule/crayonColorPicker/CrayonColorPicker_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/colorPickerModule/crayonColorPicker/CrayonColorPicker_ppc.proj -------------------------------------------------------------------------------- /application_kit/colorPickerModule/crayonColorPicker/CrayonColorPicker_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/colorPickerModule/crayonColorPicker/CrayonColorPicker_x86.proj -------------------------------------------------------------------------------- /application_kit/colorPickerModule/crayonColorPicker/CrayonPicker.h: -------------------------------------------------------------------------------- 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 | #ifndef __CRAYON_PICKER__ 7 | #define __CRAYON_PICKER__ 8 | 9 | #include 10 | 11 | #include "CrayonColorPicker.h" 12 | 13 | class CrayonColorPickerDialog : public BWindow { 14 | public: 15 | CrayonColorPickerDialog(BMessage *); 16 | virtual ~CrayonColorPickerDialog(); 17 | 18 | protected: 19 | virtual void MessageReceived(BMessage *message); 20 | virtual bool QuitRequested(); 21 | 22 | private: 23 | TCrayonColorPicker* colorPicker; 24 | rgb_color initialColor; 25 | BMessenger target; 26 | }; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /application_kit/colorPickerModule/crayonColorPicker/CrayonPicker.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/colorPickerModule/crayonColorPicker/CrayonPicker.rsrc -------------------------------------------------------------------------------- /application_kit/colorPickerModule/crayonColorPicker/CrayonPickerApp.h: -------------------------------------------------------------------------------- 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 | #ifndef __CRAYON_PICKER_APP__ 7 | #define __CRAYON_PICKER_APP__ 8 | 9 | #include 10 | 11 | class CrayonColorPickerDialog; 12 | 13 | class CrayonPickerApp : public BApplication { 14 | public: 15 | CrayonPickerApp(); 16 | 17 | protected: 18 | virtual void ReadyToRun(); 19 | virtual void RefsReceived(BMessage *); 20 | 21 | private: 22 | CrayonColorPickerDialog *colorPicker; 23 | }; 24 | 25 | 26 | 27 | #endif -------------------------------------------------------------------------------- /application_kit/colorPickerModule/crayonColorPicker/Protocol.h: -------------------------------------------------------------------------------- 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 | #ifndef __PROTOCOL__ 7 | #define __PROTOCOL_ 8 | 9 | const uint32 kInitiateConnection = 'inim'; 10 | const uint32 kOpenConnection = 'opnm'; 11 | const uint32 kCloseConnection = 'clsm'; 12 | const uint32 kServerQuitting = 'srvq'; 13 | const uint32 kApplyValue = 'appl'; 14 | 15 | #define kInvokePoint "be:invokePoint" 16 | #define kTargetName "be:targetName" 17 | #define kInitialValue "be:initialValue" 18 | #define kNewValue "be:value" 19 | #define kRequestedValues "be:requestedValues" 20 | #define kProvidedValues "be:providedValues" 21 | #define kServerAddress "be:serverAddress" 22 | #define kClientAddress "be:clientAddress" 23 | 24 | 25 | #define kColorPickerType "application/x-vnd.Be.colorPicker" 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /application_kit/colorPickerModule/makefile: -------------------------------------------------------------------------------- 1 | # makefile for colorPickerModule 2 | 3 | LEAFDIRS = \ 4 | colorPickerClient \ 5 | crayonColorPicker \ 6 | simpleColorPicker 7 | 8 | default .DEFAULT: 9 | -@for f in $(LEAFDIRS); do \ 10 | $(MAKE) -C $$f $@; \ 11 | done 12 | -------------------------------------------------------------------------------- /application_kit/colorPickerModule/simpleColorPicker/SimpleColorPicker_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/colorPickerModule/simpleColorPicker/SimpleColorPicker_ppc.proj -------------------------------------------------------------------------------- /application_kit/colorPickerModule/simpleColorPicker/SimpleColorPicker_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/colorPickerModule/simpleColorPicker/SimpleColorPicker_x86.proj -------------------------------------------------------------------------------- /application_kit/colorPickerModule/simpleColorPicker/SimplePicker.h: -------------------------------------------------------------------------------- 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 | #ifndef __SIMPLE_PICKER__ 7 | #define __SIMPLE_PICKER__ 8 | 9 | #include 10 | 11 | class BColorControl; 12 | 13 | class SimpleColorPickerDialog : public BWindow { 14 | public: 15 | SimpleColorPickerDialog(BMessage *); 16 | virtual ~SimpleColorPickerDialog(); 17 | 18 | protected: 19 | virtual void MessageReceived(BMessage *message); 20 | virtual bool QuitRequested(); 21 | 22 | private: 23 | BColorControl *colorPalette; 24 | rgb_color initialColor; 25 | BMessenger target; 26 | }; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /application_kit/colorPickerModule/simpleColorPicker/SimplePicker.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/application_kit/colorPickerModule/simpleColorPicker/SimplePicker.rsrc -------------------------------------------------------------------------------- /application_kit/colorPickerModule/simpleColorPicker/SimplePickerApp.h: -------------------------------------------------------------------------------- 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 | #ifndef __SIMPLE_PICKER_APP__ 7 | #define __SIMPLE_PICKER_APP__ 8 | 9 | #include 10 | 11 | class SimpleColorPickerDialog; 12 | 13 | class SimplePickerApp : public BApplication { 14 | public: 15 | SimplePickerApp(); 16 | 17 | protected: 18 | virtual void ReadyToRun(); 19 | virtual void RefsReceived(BMessage *); 20 | 21 | private: 22 | SimpleColorPickerDialog *colorPicker; 23 | }; 24 | 25 | 26 | 27 | #endif -------------------------------------------------------------------------------- /application_kit/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all Application Kit sample code 2 | 3 | SUBMAKES = \ 4 | AppKitModel \ 5 | Scripter \ 6 | colorPickerModule 7 | 8 | LEAFDIRS = \ 9 | BeBounce \ 10 | Container \ 11 | EZLauncher \ 12 | Magnify \ 13 | Pulse \ 14 | ShelfInspector \ 15 | Thesaurus \ 16 | Watcher 17 | 18 | default .DEFAULT: 19 | -@for f in $(SUBMAKES); do \ 20 | $(MAKE) -C $$f -f makefile.all $@; \ 21 | done 22 | -@for f in $(LEAFDIRS); do \ 23 | $(MAKE) -C $$f $@; \ 24 | done 25 | -------------------------------------------------------------------------------- /drivers/EtherPCI/Addon/NetBufList.h: -------------------------------------------------------------------------------- 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 | #ifndef _NET_BUF_LIST_H 6 | #define _NET_BUF_LIST_H 7 | 8 | #include 9 | #include 10 | 11 | typedef struct _netbuflist { 12 | BNetPacket *buf; 13 | struct _netbuflist *next; 14 | } *_netbuflist_t; 15 | 16 | class _NetBufList { 17 | _netbuflist_t list; 18 | _netbuflist_t freelist; 19 | public: 20 | _NetBufList(void); 21 | ~_NetBufList(void); 22 | void ChainToEnd(BNetPacket *packet); 23 | BNetPacket *RemoveHead(); 24 | }; 25 | 26 | #endif /* _NET_BUF_LIST_H */ 27 | 28 | 29 | -------------------------------------------------------------------------------- /drivers/EtherPCI/Addon/cplusplus.h: -------------------------------------------------------------------------------- 1 | /* 2 | * cplusplus.h 3 | * 4 | * Include this file, and then you can use EXTERNC for externs, whether 5 | * you are compiling C code or C++ code. 6 | */ 7 | /* 8 | Copyright 1999, Be Incorporated. All Rights Reserved. 9 | This file may be used under the terms of the Be Sample Code License. 10 | */ 11 | #ifndef _CPLUSPLUS_H 12 | #define _CPLUSPLUS_H 13 | 14 | #if __cplusplus 15 | #define EXTERNC extern "C" 16 | #else /* __cplusplus */ 17 | #define EXTERNC extern 18 | #endif /* __cplusplus */ 19 | 20 | #endif /* _CPLUSPLUS_H */ 21 | 22 | 23 | -------------------------------------------------------------------------------- /drivers/EtherPCI/Addon/ne2000pci.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 "generic.h" 7 | 8 | static const char TITLE[] = "Novell NE2000 compatible adapter (PCI) Sample"; 9 | static const char CONFIG[] = "ne2000pci"; 10 | static const char LINK[] = "/dev/net/etherpci"; 11 | 12 | 13 | extern "C" _EXPORT BNetDevice * 14 | open_device(const char *device) 15 | { 16 | GenericDevice *dev; 17 | 18 | dev = new GenericDevice(); 19 | if (dev->Start(device) < B_NO_ERROR) { 20 | delete dev; 21 | return (NULL); 22 | } 23 | return (dev); 24 | } 25 | 26 | extern "C" _EXPORT BNetConfig * 27 | open_config(const char *device) 28 | { 29 | return (new GenericConfig(TITLE, CONFIG, LINK)); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /drivers/EtherPCI/Addon/ne2000pci_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/drivers/EtherPCI/Addon/ne2000pci_ppc.proj -------------------------------------------------------------------------------- /drivers/EtherPCI/Addon/ne2000pci_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/drivers/EtherPCI/Addon/ne2000pci_x86.proj -------------------------------------------------------------------------------- /drivers/EtherPCI/Driver/etherpci_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/drivers/EtherPCI/Driver/etherpci_ppc.proj -------------------------------------------------------------------------------- /drivers/EtherPCI/Driver/etherpci_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/drivers/EtherPCI/Driver/etherpci_x86.proj -------------------------------------------------------------------------------- /drivers/EtherPCI/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for the EtherPCI driver sample 2 | 3 | LEAFDIRS = \ 4 | Driver \ 5 | Addon 6 | 7 | default .DEFAULT: 8 | -@for f in $(LEAFDIRS); do \ 9 | $(MAKE) -C $$f $@; \ 10 | done 11 | -------------------------------------------------------------------------------- /drivers/buslogic/buslogic_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/drivers/buslogic/buslogic_x86.proj -------------------------------------------------------------------------------- /drivers/digit/driver/digit_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/drivers/digit/driver/digit_ppc.proj -------------------------------------------------------------------------------- /drivers/digit/driver/digit_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/drivers/digit/driver/digit_x86.proj -------------------------------------------------------------------------------- /drivers/digit/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all driver sample code 2 | 3 | LEAFDIRS = \ 4 | driver \ 5 | test 6 | 7 | default .DEFAULT: 8 | -@for f in $(LEAFDIRS); do \ 9 | $(MAKE) -C $$f $@; \ 10 | done 11 | -------------------------------------------------------------------------------- /drivers/digit/test/testdigit_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/drivers/digit/test/testdigit_ppc.proj -------------------------------------------------------------------------------- /drivers/digit/test/testdigit_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/drivers/digit/test/testdigit_x86.proj -------------------------------------------------------------------------------- /drivers/graphics/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all graphics driver sample code 2 | 3 | SUBDIRS = \ 4 | nudge \ 5 | ram_driver \ 6 | sample_driver \ 7 | test_harness 8 | 9 | default .DEFAULT: 10 | -@for f in $(SUBDIRS); do \ 11 | $(MAKE) -C $$f $@; \ 12 | done 13 | -------------------------------------------------------------------------------- /drivers/graphics/nudge/nudge.c: -------------------------------------------------------------------------------- 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 | 12 | int main(int argc, char **argv) { 13 | 14 | int fd; 15 | ssize_t wrote; 16 | 17 | if (argc != 2) { 18 | fprintf(stderr, "USAGE: %s driver_file_name (no path)\n", argv[0]); 19 | return -1; 20 | } 21 | fd = open("/dev", O_WRONLY); 22 | if (fd < 0) { 23 | fprintf(stderr, "Couldn't open /dev: %s (0x%08x)\n", strerror(errno), errno); 24 | return -1; 25 | } 26 | wrote = write(fd, argv[1], strlen(argv[1])); 27 | if (wrote != strlen(argv[1])) 28 | fprintf(stderr, "Couldn't write name to /dev: %s (0x%08x)\n", strerror(errno), errno); 29 | close(fd); 30 | return wrote; 31 | } 32 | -------------------------------------------------------------------------------- /drivers/graphics/ram_driver/accelerant/GlobalData.c: -------------------------------------------------------------------------------- 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 "GlobalData.h" 7 | 8 | int fd; 9 | shared_info *si; 10 | area_id shared_info_area; 11 | area_id regs_area; 12 | display_mode *my_mode_list; 13 | area_id my_mode_list_area; 14 | int accelerantIsClone; 15 | -------------------------------------------------------------------------------- /drivers/graphics/ram_driver/accelerant/GlobalData.h: -------------------------------------------------------------------------------- 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 | #if !defined(GLOBALDATA_H) 7 | #define GLOBALDATA_H 8 | 9 | #include "../include/DriverInterface.h" 10 | 11 | extern int fd; 12 | extern shared_info *si; 13 | extern area_id shared_info_area; 14 | extern area_id regs_area; 15 | extern display_mode *my_mode_list; 16 | extern area_id my_mode_list_area; 17 | extern int accelerantIsClone; 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /drivers/graphics/ram_driver/makefile: -------------------------------------------------------------------------------- 1 | dirs := driver accelerant 2 | 3 | default .DEFAULT: 4 | @cwd=`pwd`; for dir in $(dirs); do \ 5 | if [ -d "$$dir" ]; then \ 6 | cd $$dir && $(MAKE) $@; cd $$cwd; \ 7 | fi \ 8 | done 9 | -------------------------------------------------------------------------------- /drivers/graphics/sample_driver/accelerant/GlobalData.c: -------------------------------------------------------------------------------- 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 "GlobalData.h" 7 | 8 | int fd; 9 | shared_info *si; 10 | area_id shared_info_area; 11 | vuint32 *regs; 12 | area_id regs_area; 13 | display_mode *my_mode_list; 14 | area_id my_mode_list_area; 15 | int accelerantIsClone; 16 | -------------------------------------------------------------------------------- /drivers/graphics/sample_driver/accelerant/GlobalData.h: -------------------------------------------------------------------------------- 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 | #if !defined(GLOBALDATA_H) 7 | #define GLOBALDATA_H 8 | 9 | #include "../include/DriverInterface.h" 10 | 11 | extern int fd; 12 | extern shared_info *si; 13 | extern area_id shared_info_area; 14 | extern vuint32 *regs; 15 | extern area_id regs_area; 16 | extern display_mode *my_mode_list; 17 | extern area_id my_mode_list_area; 18 | extern int accelerantIsClone; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /drivers/graphics/sample_driver/makefile: -------------------------------------------------------------------------------- 1 | # Build the sample graphics driver 2 | 3 | SUBDIRS = driver accelerant 4 | 5 | .DEFAULT: 6 | @for f in $(SUBDIRS); do \ 7 | $(MAKE) -C $$f $@; \ 8 | done 9 | -------------------------------------------------------------------------------- /drivers/inquiry/inquiry_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/drivers/inquiry/inquiry_ppc.proj -------------------------------------------------------------------------------- /drivers/inquiry/inquiry_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/drivers/inquiry/inquiry_x86.proj -------------------------------------------------------------------------------- /drivers/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all driver sample code 2 | 3 | SUBMAKES = \ 4 | digit \ 5 | EtherPCI \ 6 | graphics 7 | 8 | LEAFDIRS = \ 9 | inquiry \ 10 | scsi_raw \ 11 | scsi_skel 12 | 13 | # these drivers only support on x86 14 | ifeq ($(shell uname -m), BePC) 15 | LEAFDIRS += \ 16 | buslogic \ 17 | sonic_vibes \ 18 | symbios \ 19 | usb_speaker 20 | endif 21 | 22 | default .DEFAULT: 23 | -@for f in $(SUBMAKES); do \ 24 | $(MAKE) -C $$f -f makefile.all $@; \ 25 | done 26 | -@for f in $(LEAFDIRS); do \ 27 | $(MAKE) -C $$f $@; \ 28 | done 29 | -------------------------------------------------------------------------------- /drivers/scsi_raw/scsi_raw_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/drivers/scsi_raw/scsi_raw_ppc.proj -------------------------------------------------------------------------------- /drivers/scsi_raw/scsi_raw_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/drivers/scsi_raw/scsi_raw_x86.proj -------------------------------------------------------------------------------- /drivers/sonic_vibes/sonic_vibes_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/drivers/sonic_vibes/sonic_vibes_x86.proj -------------------------------------------------------------------------------- /drivers/usb_speaker/Makefile: -------------------------------------------------------------------------------- 1 | CC := gcc 2 | CFLAGS := -O2 3 | 4 | DRIVER := usb_speaker 5 | OBJS := usb_speaker.o 6 | 7 | BINDIR := /boot/home/config/add-ons/kernel/drivers/bin 8 | LINKDIR := /boot/home/config/add-ons/kernel/drivers/dev/misc 9 | KERNEL := /system/kernel_intel 10 | 11 | 12 | default: $(DRIVER) 13 | 14 | $(DRIVER): $(OBJS) 15 | @echo "Linking $(DRIVER)" 16 | @$(CC) -nostdlib $(OBJS) $(KERNEL) 17 | 18 | %.o: %.c 19 | @echo "Compiling $<" 20 | @$(CC) $(CFLAGS) -c -o $@ $< 21 | 22 | install: 23 | @echo "Installing $(DRIVER)" 24 | @mkdir -p $(BINDIR) $(LINKDIR) 25 | @cp $(DRIVER) $(BINDIR)/$(DRIVER) 26 | @ln -sf $(BINDIR)/$(DRIVER) $(LINKDIR)/$(DRIVER) 27 | 28 | uninstall: 29 | @echo "Uninstalling $(DRIVER)" 30 | @rm -f $(BINDIR)/$(DRIVER) 31 | @rm -f $(LINKDIR)/$(DRIVER) 32 | 33 | clean: 34 | @echo "Cleaning" 35 | @rm -f $(DRIVER) $(OBJS) 36 | -------------------------------------------------------------------------------- /game_kit/Chart/Chart.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Chart.h 4 | 5 | by Pierre Raynaud-Richard. 6 | 7 | */ 8 | 9 | /* 10 | Copyright 1999, Be Incorporated. All Rights Reserved. 11 | This file may be used under the terms of the Be Sample Code License. 12 | */ 13 | 14 | #ifndef CHART_H 15 | #define CHART_H 16 | 17 | #ifndef _APPLICATION_H 18 | #include 19 | #endif 20 | #ifndef CHART_WINDOW_H 21 | #include "ChartWindow.h" 22 | #endif 23 | 24 | /* not too much to be said... */ 25 | class ChartApp : public BApplication { 26 | public: 27 | ChartApp(); 28 | private: 29 | ChartWindow *aWindow; 30 | }; 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /game_kit/Chart/Chart.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/game_kit/Chart/Chart.rsrc -------------------------------------------------------------------------------- /game_kit/Chart/Chart_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/game_kit/Chart/Chart_ppc.proj -------------------------------------------------------------------------------- /game_kit/Chart/Chart_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/game_kit/Chart/Chart_x86.proj -------------------------------------------------------------------------------- /game_kit/PageFlipper/PageFlip_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/game_kit/PageFlipper/PageFlip_ppc.proj -------------------------------------------------------------------------------- /game_kit/PageFlipper/PageFlip_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/game_kit/PageFlipper/PageFlip_x86.proj -------------------------------------------------------------------------------- /game_kit/Stars/Stars.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Stars.h 4 | 5 | by Pierre Raynaud-Richard. 6 | 7 | */ 8 | 9 | /* 10 | Copyright 1999, Be Incorporated. All Rights Reserved. 11 | This file may be used under the terms of the Be Sample Code License. 12 | */ 13 | 14 | #ifndef STARS_H 15 | #define STARS_H 16 | 17 | #ifndef _APPLICATION_H 18 | #include 19 | #endif 20 | #ifndef STAR_WINDOW_H 21 | #include "StarWindow.h" 22 | #endif 23 | 24 | /* not too much to be said... */ 25 | class StarsApp : public BApplication { 26 | public: 27 | StarsApp(); 28 | 29 | bool abort_required; 30 | private: 31 | StarWindow *aWindow; 32 | }; 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /game_kit/Stars/Stars.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/game_kit/Stars/Stars.rsrc -------------------------------------------------------------------------------- /game_kit/Stars/Stars_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/game_kit/Stars/Stars_ppc.proj -------------------------------------------------------------------------------- /game_kit/Stars/Stars_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/game_kit/Stars/Stars_x86.proj -------------------------------------------------------------------------------- /game_kit/Whack/Whack_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/game_kit/Whack/Whack_ppc.proj -------------------------------------------------------------------------------- /game_kit/Whack/Whack_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/game_kit/Whack/Whack_x86.proj -------------------------------------------------------------------------------- /game_kit/Whack/settings.h: -------------------------------------------------------------------------------- 1 | /* settings.h */ 2 | 3 | /* 4 | Copyright 1999, Be Incorporated. All Rights Reserved. 5 | This file may be used under the terms of the Be Sample Code License. 6 | */ 7 | 8 | #ifndef SETTINGS_H 9 | #define SETTINGS_H 10 | 11 | /* relative to B_USER_SETTINGS_DIRECTORY */ 12 | #define SETTINGS_FILE "whack/settings" 13 | #define FAVORITES_DIR "whack/favorites" 14 | 15 | #define WINDOW_RECT "window_rect" 16 | 17 | #endif /* SETTINGS_H */ 18 | -------------------------------------------------------------------------------- /game_kit/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all Game Kit sample code 2 | 3 | SUBDIRS = \ 4 | Chart \ 5 | PageFlipper \ 6 | SndFilePanel \ 7 | Stars \ 8 | Whack 9 | 10 | default .DEFAULT: 11 | -@for f in $(SUBDIRS); do \ 12 | $(MAKE) -C $$f $@; \ 13 | done 14 | -------------------------------------------------------------------------------- /graphics/FrameRate/FrameRate_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/graphics/FrameRate/FrameRate_ppc.proj -------------------------------------------------------------------------------- /graphics/FrameRate/FrameRate_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/graphics/FrameRate/FrameRate_x86.proj -------------------------------------------------------------------------------- /graphics/Mandelbrot/Mandelbrot.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/graphics/Mandelbrot/Mandelbrot.rsrc -------------------------------------------------------------------------------- /graphics/Mandelbrot/Mandelbrot_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/graphics/Mandelbrot/Mandelbrot_ppc.proj -------------------------------------------------------------------------------- /graphics/Mandelbrot/Mandelbrot_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/graphics/Mandelbrot/Mandelbrot_x86.proj -------------------------------------------------------------------------------- /graphics/QuickPaint/BitmapEditorWindow.h: -------------------------------------------------------------------------------- 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 | #ifndef BitmapEditorWindow_h 7 | #define BitmapEditorWindow_h 8 | 9 | class BBitmapDocument; 10 | class BBitmapEditor; 11 | class BMatrix; 12 | class BLayerView; 13 | 14 | class BBitmapEditorWindow : public BWindow 15 | { 16 | protected: 17 | BMenuBar * m_menu; 18 | BBitmapEditor * m_editor; 19 | BScrollView * m_scrollView; 20 | BLayerView * m_layers; 21 | BView * m_layerContainer; 22 | 23 | public: 24 | 25 | BBitmapEditorWindow(BRect r, BBitmapDocument *bitmap); 26 | 27 | BBitmapEditor * Editor() { return m_editor; }; 28 | 29 | virtual bool QuitRequested(); 30 | virtual void MessageReceived(BMessage *msg); 31 | void RedoSizes(); 32 | void ResizeToMax(); 33 | 34 | }; 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /graphics/QuickPaint/QuickPaint_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/graphics/QuickPaint/QuickPaint_ppc.proj -------------------------------------------------------------------------------- /graphics/QuickPaint/QuickPaint_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/graphics/QuickPaint/QuickPaint_x86.proj -------------------------------------------------------------------------------- /graphics/SlimDemo/SlimDemo_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/graphics/SlimDemo/SlimDemo_x86.proj -------------------------------------------------------------------------------- /graphics/makefile: -------------------------------------------------------------------------------- 1 | # makefile for all graphics sample code 2 | 3 | LEAFDIRS = \ 4 | FrameRate \ 5 | Mandelbrot \ 6 | QuickPaint 7 | 8 | default .DEFAULT: 9 | -@for f in $(LEAFDIRS); do \ 10 | $(MAKE) -C $$f $@; \ 11 | done 12 | -------------------------------------------------------------------------------- /input_server/input_recorder/srcs/InputRecorder/view.h: -------------------------------------------------------------------------------- 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 | #ifndef __TVIEW_H 7 | #define __TVIEW_H 1 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | class TView : public BBox 16 | { 17 | public: 18 | TView(BRect rect, const char *name, bool rec, bool stop, bool play); 19 | virtual void MessageReceived(BMessage *msg); 20 | private: 21 | }; 22 | 23 | #endif // __TVIEW_H 24 | -------------------------------------------------------------------------------- /input_server/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all Input Server sample code 2 | 3 | SUBMAKES = \ 4 | input_recorder \ 5 | nervous 6 | 7 | default .DEFAULT : 8 | -@for f in $(SUBMAKES); do \ 9 | $(MAKE) -C $$f $@; \ 10 | done 11 | -------------------------------------------------------------------------------- /input_server/nervous/README: -------------------------------------------------------------------------------- 1 | This project is an input_server add-on. To use it 2 | you must install it into: 3 | 4 | /boot/home/config/add-ons/input_server/devices 5 | 6 | and then restart the input_server by typing: 7 | 8 | /system/servers/input_server -q 9 | 10 | in a Terminal window. When you get tired of 11 | it you'll have to reinstall the BeOS from cd. Hah. 12 | Just kidding. You just have to delete the file 13 | from /boot/home/config/add-ons/input_server/devices 14 | and restart the input server again. -------------------------------------------------------------------------------- /input_server/nervous/nervous_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/input_server/nervous/nervous_ppc.proj -------------------------------------------------------------------------------- /input_server/nervous/nervous_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/input_server/nervous/nervous_x86.proj -------------------------------------------------------------------------------- /interface_kit/CDButton/CDButton.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/CDButton/CDButton.rsrc -------------------------------------------------------------------------------- /interface_kit/CDButton/CDButton_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/CDButton/CDButton_ppc.proj -------------------------------------------------------------------------------- /interface_kit/CDButton/CDButton_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/CDButton/CDButton_x86.proj -------------------------------------------------------------------------------- /interface_kit/Clock/Clock.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/Clock/Clock.rsrc -------------------------------------------------------------------------------- /interface_kit/Clock/Clock_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/Clock/Clock_ppc.proj -------------------------------------------------------------------------------- /interface_kit/Clock/Clock_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/Clock/Clock_x86.proj -------------------------------------------------------------------------------- /interface_kit/Clock/README.Clock: -------------------------------------------------------------------------------- 1 | Clock Project README 2 | ==================== 3 | 4 | This project creates the standard clock application, and is a good example 5 | of using graphics on the BeOS. 6 | 7 | Files 8 | ===== 9 | 10 | The archive should contain the following files: 11 | 12 | README.Clock -- This file 13 | Clock.proj -- Metrowerks project file 14 | Clock.rsrc -- Application resource file 15 | makefile -- project makefile 16 | 17 | clock.cpp -- Source files 18 | clock.h 19 | cl_wind.cpp 20 | cl_wind.h 21 | cl_view.cpp 22 | cl_view.h 23 | -------------------------------------------------------------------------------- /interface_kit/Clock/cl_wind.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | cl_wind.h 4 | 5 | */ 6 | 7 | /* 8 | Copyright 1999, Be Incorporated. All Rights Reserved. 9 | This file may be used under the terms of the Be Sample Code License. 10 | */ 11 | 12 | #ifndef _WINDOW_H 13 | #include 14 | #endif 15 | #ifndef _CL_VIEW_H_ 16 | #include "cl_view.h" 17 | #endif 18 | 19 | class TClockWindow : public BWindow { 20 | 21 | public: 22 | TClockWindow(BRect, const char*); 23 | virtual bool QuitRequested( void ); 24 | 25 | TOnscreenView *theOnscreenView; 26 | }; 27 | -------------------------------------------------------------------------------- /interface_kit/Clock/clock.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | clock.h 4 | 5 | */ 6 | 7 | /* 8 | Copyright 1999, Be Incorporated. All Rights Reserved. 9 | This file may be used under the terms of the Be Sample Code License. 10 | */ 11 | 12 | #ifndef _APPLICATION_H 13 | #include 14 | #endif 15 | 16 | #include "cl_view.h" 17 | #include "cl_wind.h" 18 | 19 | #define SHOW_SECONDS 'ssec' 20 | 21 | extern const char *app_signature; 22 | 23 | class THelloApplication : public BApplication { 24 | 25 | public: 26 | THelloApplication(); 27 | virtual void MessageReceived(BMessage *msg); 28 | 29 | private: 30 | TClockWindow* myWindow; 31 | TOnscreenView *myView; 32 | }; 33 | -------------------------------------------------------------------------------- /interface_kit/Iterview/Iterview-ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/Iterview/Iterview-ppc.proj -------------------------------------------------------------------------------- /interface_kit/Iterview/Iterview-x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/Iterview/Iterview-x86.proj -------------------------------------------------------------------------------- /interface_kit/MenuWorld/MenuWorld.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/MenuWorld/MenuWorld.rsrc -------------------------------------------------------------------------------- /interface_kit/MenuWorld/MenuWorld_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/MenuWorld/MenuWorld_ppc.proj -------------------------------------------------------------------------------- /interface_kit/MenuWorld/MenuWorld_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/MenuWorld/MenuWorld_x86.proj -------------------------------------------------------------------------------- /interface_kit/MenuWorld/_README.txt: -------------------------------------------------------------------------------- 1 | MenuWorld 2 | 3 | This is an application which demostrates customizing menus in the Interface Kit. It ties in with the newsletter article "Mucking With Menus," located at: 4 | 5 | http://www.be.com/aboutbe/benewsletter/volume_II/Issue30.html#Workshop 6 | 7 | See the About box... for directions on using MenuWorld, and the newsletter article for other salient points. 8 | 9 | -- Owen Smith, 29-Jul-98 10 | -------------------------------------------------------------------------------- /interface_kit/MenuWorld/main.cpp: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------- 2 | // 3 | // main.cpp 4 | // 5 | // Written by: Owen Smith 6 | // 7 | //-------------------------------------------------------------------- 8 | 9 | /* 10 | Copyright 1999, Be Incorporated. All Rights Reserved. 11 | This file may be used under the terms of the Be Sample Code License. 12 | */ 13 | 14 | #include "MenuApp.h" 15 | 16 | int main(void) 17 | { 18 | MenuApp app; 19 | app.Run(); 20 | return B_NO_ERROR; 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /interface_kit/MenuWorld/stddlg.cpp: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------- 2 | // 3 | // stddlg.cpp 4 | // 5 | // Written by: Owen Smith 6 | // 7 | //-------------------------------------------------------------------- 8 | 9 | /* 10 | Copyright 1999, Be Incorporated. All Rights Reserved. 11 | This file may be used under the terms of the Be Sample Code License. 12 | */ 13 | 14 | #include 15 | #include 16 | 17 | #include "constants.h" 18 | #include "stddlg.h" 19 | 20 | void ierror(const char* msg) 21 | { 22 | char* fullMsg = new char[strlen(STR_IERROR) + strlen(msg) + 1]; 23 | strcpy(fullMsg, STR_IERROR); 24 | strcpy(fullMsg, msg); 25 | BAlert alert("Internal Error", fullMsg, "OK", NULL, NULL, 26 | B_WIDTH_AS_USUAL, B_STOP_ALERT); 27 | alert.Go(); 28 | delete [] fullMsg; 29 | } 30 | -------------------------------------------------------------------------------- /interface_kit/MenuWorld/stddlg.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------- 2 | // 3 | // stddlg.h 4 | // 5 | // Written by: Owen Smith 6 | // 7 | //-------------------------------------------------------------------- 8 | 9 | /* 10 | Copyright 1999, Be Incorporated. All Rights Reserved. 11 | This file may be used under the terms of the Be Sample Code License. 12 | */ 13 | 14 | #ifndef _stddlg_h 15 | #define _stddlg_h 16 | 17 | void ierror(const char* msg); 18 | 19 | #endif /* _stddlg_h */ -------------------------------------------------------------------------------- /interface_kit/dragme/DragMe_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/dragme/DragMe_ppc.proj -------------------------------------------------------------------------------- /interface_kit/dragme/DragMe_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/dragme/DragMe_x86.proj -------------------------------------------------------------------------------- /interface_kit/dragme/DragWindow.h: -------------------------------------------------------------------------------- 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 | #if !defined(DragWindow_h) 7 | #define DragWindow_h 8 | 9 | #include 10 | 11 | 12 | class DragView; 13 | 14 | 15 | class DragWindow : public BWindow { 16 | public: 17 | DragWindow( 18 | const BRect & frame, 19 | const char * name); 20 | virtual ~DragWindow(); 21 | 22 | virtual void MessageReceived( 23 | BMessage * message); 24 | virtual bool QuitRequested(); 25 | 26 | enum { 27 | QUIT_ALERT_REPLY = 'dw00' 28 | }; 29 | 30 | private: 31 | 32 | DragView * m_view; 33 | 34 | void ActionCopy( 35 | BMessage * request); 36 | void ActionTrash( 37 | BMessage * request); 38 | void QuitAlertReply( 39 | BMessage * reply); 40 | }; 41 | 42 | 43 | #endif // DragWindow_h 44 | 45 | -------------------------------------------------------------------------------- /interface_kit/dragme/Main.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 "DragApp.h" 7 | 8 | 9 | int 10 | main() 11 | { 12 | DragApp app("application/x-vnd.Be.hplus.dragapp"); 13 | app.Run(); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /interface_kit/dynadraw3/ColorWin.h: -------------------------------------------------------------------------------- 1 | /* ColorWin.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 | #include 7 | 8 | class ColorWin : public BWindow 9 | { 10 | public: 11 | ColorWin(BWindow* hand, rgb_color initialColor); 12 | void MessageReceived(BMessage* msg); 13 | void Quit(); 14 | 15 | private: 16 | BWindow* handler; 17 | BColorControl* cc; 18 | BView* swatch; 19 | 20 | }; 21 | -------------------------------------------------------------------------------- /interface_kit/dynadraw3/DDApp.h: -------------------------------------------------------------------------------- 1 | /* DDApp.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 | #include 7 | #include "DDWindow.h" 8 | #include "TweakWin.h" 9 | #include "ColorWin.h" 10 | 11 | class DDApp : public BApplication 12 | { 13 | public: 14 | DDApp(); 15 | void MessageReceived(BMessage* msg); 16 | void AboutRequested(); 17 | 18 | private: 19 | DDWindow* ddWin; 20 | ColorWin* colorWin; 21 | TweakWin* tweakWin; 22 | }; -------------------------------------------------------------------------------- /interface_kit/dynadraw3/MsgVals.h: -------------------------------------------------------------------------------- 1 | /* MsgVals.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 | const uint32 CLEAR_SCREEN = 'CLRS'; 8 | const uint32 TWEAK_REQ = 'TWKR'; 9 | const uint32 COLOR_REQ = 'CLRR'; 10 | const uint32 TWEAK_QUIT = 'TWKQ'; 11 | const uint32 COLOR_QUIT = 'CLRQ'; 12 | const uint32 COLOR_CHG = 'CCHG'; 13 | const uint32 MASS_CHG = 'MASS'; 14 | const uint32 DRAG_CHG = 'DRAG'; 15 | const uint32 WIDTH_CHG = 'WIDT'; 16 | const uint32 FILL_CHG = 'FILL'; 17 | const uint32 ANGLE_CHG = 'ANGL'; 18 | const uint32 SLEEPAGE_CHG = 'SLEP'; 19 | const uint32 TWEAK_BYEBYE = 'TWKB'; 20 | const uint32 COLOR_BYEBYE = 'CLRB'; 21 | const uint32 PRINT_REQ = 'PRNT'; 22 | const uint32 SCALE_PAGE = 'SCPG'; 23 | -------------------------------------------------------------------------------- /interface_kit/dynadraw3/README: -------------------------------------------------------------------------------- 1 | This directory contains the source to dynadraw3, a program 2 | which draws calligraphic strokes by filtering mouse movements. 3 | Holding the primary mouse button down while dragging the 4 | mouse produces a stroke. Clicking the secondary mouse 5 | button clears the window. Dynadraw3 adds printing to dynadraw2. 6 | 7 | There are two printing modes: Scale-To-Page or Full Size. 8 | Scale-To-Page is the default. The scale factor is determined 9 | by calculating the horizontal scale and the vertical scale, and 10 | the taking the smaller of the two and applying it to the FilterView 11 | with BView::SetScale(). 12 | 13 | Full Page mode determines how many pages the drawing takes up 14 | in the horizontal and vertical directions, and then offseting 15 | the current page rectangle to the top of each page, and calling 16 | FilterView::Draw(). 17 | 18 | Michael Morrissey 19 | June 1998 20 | -------------------------------------------------------------------------------- /interface_kit/dynadraw3/TweakWin.h: -------------------------------------------------------------------------------- 1 | /* TweakWin.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 | #include 7 | 8 | class TweakWin : public BWindow 9 | { 10 | public: 11 | TweakWin(BWindow* hand, int32 imass, int32 idrag, 12 | int32 iwidth, int32 isleepage); 13 | void MessageReceived(BMessage* msg); 14 | void Quit(); 15 | 16 | private: 17 | BSlider* mass; 18 | BSlider* drag; 19 | BSlider* width; 20 | BSlider* sleepage; 21 | BCheckBox* fill; 22 | BCheckBox* angle; 23 | 24 | BWindow* handler; 25 | }; 26 | 27 | -------------------------------------------------------------------------------- /interface_kit/dynadraw3/dynadraw3_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/dynadraw3/dynadraw3_ppc.proj -------------------------------------------------------------------------------- /interface_kit/dynadraw3/dynadraw3_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/dynadraw3/dynadraw3_x86.proj -------------------------------------------------------------------------------- /interface_kit/dynadraw3/main.cpp: -------------------------------------------------------------------------------- 1 | /* main.cpp */ 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 | #include "DDApp.h" 7 | 8 | int main() 9 | { 10 | DDApp App; 11 | App.Run(); 12 | return B_NO_ERROR; 13 | } -------------------------------------------------------------------------------- /interface_kit/imaging/imaging.h: -------------------------------------------------------------------------------- 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 | typedef long status_t; 7 | typedef unsigned long uint32; 8 | 9 | enum scale_method { 10 | IMG_SCALE_BILINEAR = 1 11 | }; -------------------------------------------------------------------------------- /interface_kit/imaging/imaging.txt: -------------------------------------------------------------------------------- 1 | File: imaging.zip 2 | Author: Be Developer Technical Support (devsupport@be.com) 3 | Release: 0.2 (Aprl 8,1997) 4 | Compatibility: R4 5 | Location: 6 | Description: Image processing routines 7 | Notes: 8 | This contains a basic image scaling routine. It shows how to manipulate a 9 | BBitmap directly. It also shows how to do things with BFonts. 10 | 11 | This version has been updated to R4. 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /interface_kit/imaging/imaging_main.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 "imaging_app.h" 7 | 8 | int main(int, char**) 9 | { 10 | BTSImagingApp *myApp = new BTSImagingApp(); 11 | myApp->Run(); 12 | delete myApp; 13 | 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /interface_kit/imaging/scale.h: -------------------------------------------------------------------------------- 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 "imaging.h" 7 | 8 | class BBitmap; 9 | 10 | // Scale an image. It will work in either direction. 11 | // Scaling up or down. Scaling by integer values will be 12 | // most optimal. 13 | 14 | status_t scale(const BBitmap *source, BBitmap *dst, 15 | const float xFactor = -1, const float yFactor = -1, 16 | scale_method = IMG_SCALE_BILINEAR); 17 | 18 | // These would make the transformation manipulations complete 19 | status_t rotate(const BBitmap *source, BBitmap *dest, uint32 degrees); 20 | 21 | status_t shear(); 22 | 23 | status_t translate(); 24 | 25 | status_t transform(); 26 | 27 | -------------------------------------------------------------------------------- /interface_kit/imaging/scaler_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/imaging/scaler_ppc.proj -------------------------------------------------------------------------------- /interface_kit/imaging/scaler_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/imaging/scaler_x86.proj -------------------------------------------------------------------------------- /interface_kit/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all Interface Kit sample code 2 | 3 | LEAFDIRS = \ 4 | CDButton \ 5 | Clock \ 6 | Iterview \ 7 | MenuWorld \ 8 | dragme \ 9 | dynadraw3 \ 10 | imaging \ 11 | pot \ 12 | scrollbarapp 13 | 14 | default .DEFAULT: 15 | -@for f in $(LEAFDIRS); do \ 16 | $(MAKE) -C $$f $@; \ 17 | done 18 | -------------------------------------------------------------------------------- /interface_kit/pot/constants.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 "constants.h" 7 | 8 | extern const char* APP_SIG = "application/x-vnd.Be-DTS.PotApp"; 9 | -------------------------------------------------------------------------------- /interface_kit/pot/constants.h: -------------------------------------------------------------------------------- 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 | #ifndef _constants_h 7 | #define _constants_h 8 | 9 | #include 10 | 11 | const uint32 MSG_CHANGE_COLOR = 'mCOL'; 12 | const uint32 MSG_CAPTURE_MOUSE = 'mCPM'; 13 | const uint32 MSG_CHANGE_FOCUS = 'mCFS'; 14 | const uint32 MSG_FILE_OPEN = 'mFOP'; 15 | 16 | extern const char* APP_SIG; 17 | 18 | 19 | #endif /* _constants_h */ 20 | -------------------------------------------------------------------------------- /interface_kit/pot/drawutils.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 | 8 | #include "colorutils.h" 9 | #include "drawutils.h" 10 | 11 | void Stroke3DBox(BView* v, BRect r) 12 | { 13 | v->PushState(); 14 | BRect s = r; 15 | s.right--; s.bottom--; 16 | s.OffsetBy(1,1); 17 | v->SetHighColor(PURE_WHITE); 18 | v->StrokeRect(s); 19 | s.OffsetBy(-1,-1); 20 | v->SetHighColor(tint_color(ui_color(B_PANEL_BACKGROUND_COLOR), B_DARKEN_3_TINT)); 21 | v->StrokeRect(s); 22 | v->PopState(); 23 | } 24 | -------------------------------------------------------------------------------- /interface_kit/pot/drawutils.h: -------------------------------------------------------------------------------- 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 | #ifndef _drawutils_h 7 | #define _drawutils_h 8 | 9 | void Stroke3DBox(BView* v, BRect r); 10 | 11 | #endif /* _drawutils_h */ 12 | -------------------------------------------------------------------------------- /interface_kit/pot/offscreenview.h: -------------------------------------------------------------------------------- 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 | #ifndef _offscreenview_h 7 | #define _offscreenview_h 8 | 9 | #include 10 | 11 | class OffscreenView : public BView 12 | { 13 | public: 14 | OffscreenView(BRect r); 15 | ~OffscreenView(); 16 | 17 | status_t Begin(); 18 | BBitmap* End(); 19 | 20 | BBitmap* Bitmap() const { return m_pb; } 21 | 22 | void FrameResized(float width, float height); 23 | 24 | private: 25 | BBitmap* m_pb; 26 | }; 27 | 28 | #endif /* _offscreenview_h */ 29 | -------------------------------------------------------------------------------- /interface_kit/pot/pot.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/pot/pot.rsrc -------------------------------------------------------------------------------- /interface_kit/pot/pot_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/pot/pot_ppc.proj -------------------------------------------------------------------------------- /interface_kit/pot/pot_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/pot/pot_x86.proj -------------------------------------------------------------------------------- /interface_kit/pot/potapp.h: -------------------------------------------------------------------------------- 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 | #ifndef _potapp_h 7 | #define _potapp_h 8 | 9 | #include 10 | 11 | class PotApp : public BApplication 12 | { 13 | public: 14 | PotApp(); 15 | 16 | public: 17 | virtual void AboutRequested(); 18 | virtual void ArgvReceived(int32 argc, char** argv); 19 | virtual void MessageReceived(BMessage* message); 20 | virtual bool QuitRequested(); 21 | virtual void ReadyToRun(); 22 | virtual void RefsReceived(BMessage* message); 23 | 24 | private: 25 | void OnOpen(); 26 | bool QuitDudeWinLoop(); 27 | void CloseAllWindows(); 28 | void Open(const entry_ref* ref); 29 | 30 | private: 31 | BFilePanel* m_pOpenPanel; 32 | }; 33 | 34 | #endif /* _potapp_h */ 35 | -------------------------------------------------------------------------------- /interface_kit/pot/potview.h: -------------------------------------------------------------------------------- 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 | #ifndef _potview_h 7 | #define _potview_h 8 | 9 | #include 10 | #include "colorutils.h" 11 | 12 | class BPot; 13 | 14 | class PotView : public BView 15 | { 16 | public: 17 | PotView(BRect frame); 18 | 19 | virtual void AttachedToWindow(); 20 | virtual void MouseDown(BPoint where); 21 | virtual void MessageReceived(BMessage* msg); 22 | 23 | private: 24 | void AddPotAndBox(BRect r, color_channel ch, 25 | rgb_color color, BPot** hPot, const char* name); 26 | void InformMouseDown(BPot* pot, BPoint where); 27 | 28 | BPot *m_red, *m_green, *m_blue, *m_alpha; 29 | }; 30 | 31 | #endif /* _potview_h */ -------------------------------------------------------------------------------- /interface_kit/pot/potwin.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 "potview.h" 7 | #include "potwin.h" 8 | #include 9 | 10 | BLocker PotWin::s_instanceLocker("PotWin instance lock"); 11 | PotWin* PotWin::s_instance = 0; 12 | 13 | PotWin* PotWin::Instance() 14 | { 15 | if (s_instanceLocker.Lock()) { 16 | if (! s_instance) { 17 | s_instance = new PotWin(); 18 | } 19 | s_instanceLocker.Unlock(); 20 | } 21 | return s_instance; 22 | } 23 | 24 | void PotWin::Create() 25 | { 26 | Instance(); 27 | } 28 | 29 | PotWin::PotWin() 30 | : BWindow(BRect(50,275,460,420), "Color Controls", B_FLOATING_WINDOW, 31 | B_NOT_CLOSABLE | B_NOT_ZOOMABLE | B_NOT_RESIZABLE) 32 | { 33 | BRect r = Bounds(); 34 | m_pv = new PotView(r); 35 | AddChild(m_pv); 36 | 37 | Show(); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /interface_kit/pot/potwin.h: -------------------------------------------------------------------------------- 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 | #ifndef _potwin_h 7 | #define _potwin_h 8 | 9 | #include 10 | 11 | class BPot; 12 | class PotView; 13 | 14 | class PotWin : public BWindow 15 | { 16 | public: 17 | static void Create(); 18 | static PotWin* Instance(); 19 | 20 | protected: 21 | PotWin(); 22 | 23 | public: 24 | PotView* GetPotView() const { return m_pv; } 25 | 26 | private: 27 | PotView* m_pv; 28 | 29 | static BLocker s_instanceLocker; 30 | static PotWin* s_instance; 31 | }; 32 | 33 | #endif /* _potwin_h */ -------------------------------------------------------------------------------- /interface_kit/pot/testwin.h: -------------------------------------------------------------------------------- 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 | #ifndef _testwin_h 7 | #define _testwin_h 8 | 9 | #include 10 | class TestView; 11 | 12 | class TestWin : public BWindow 13 | { 14 | public: 15 | static status_t NewWindow(const entry_ref* ref); 16 | static int32 CountWindows(); 17 | 18 | TestWin(const entry_ref* ref, BBitmap* pBitmap); 19 | virtual ~TestWin(); 20 | 21 | virtual void WindowActivated(bool active); 22 | 23 | status_t InitCheck(); 24 | TestView* GetTestView() const { return m_pv; } 25 | void SetRef(const entry_ref* ref); 26 | void UpdateTitle(); 27 | void LoadMenus(BMenuBar* pBar); 28 | 29 | private: 30 | entry_ref* m_pRef; 31 | TestView* m_pv; 32 | 33 | static BLocker s_winListLocker; 34 | static BList s_winList; 35 | }; 36 | 37 | #endif /* _testwin_h */ -------------------------------------------------------------------------------- /interface_kit/scrollbarapp/iview.h: -------------------------------------------------------------------------------- 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 | #ifndef __iview_h 7 | #define __iview_h 1 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | enum { SCALE_NORMAL = 0, SCALE_TOFIT, SCALE_MAX, SCALE_LAST }; 14 | 15 | class TImageView : public BView { 16 | public: 17 | TImageView(BRect frame, const char *name, float nscale, int32 nscale_mode); 18 | virtual void Draw(BRect invalid); 19 | virtual void AttachedToWindow(void); 20 | virtual void FrameResized(float width, float height); 21 | void GetMaxSize(float *maxx, float *maxy); 22 | void SetImageScale(float nscale, int32 nscale_mode); 23 | private: 24 | BBitmap *image; 25 | float scale; 26 | int32 scale_mode; 27 | BPoint skip; 28 | void FixupScrollbars(void); 29 | }; 30 | 31 | #endif // __iview_h 32 | 33 | -------------------------------------------------------------------------------- /interface_kit/scrollbarapp/scrollbarapp.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/scrollbarapp/scrollbarapp.rsrc -------------------------------------------------------------------------------- /interface_kit/scrollbarapp/scrollbarapp_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/scrollbarapp/scrollbarapp_ppc.proj -------------------------------------------------------------------------------- /interface_kit/scrollbarapp/scrollbarapp_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/interface_kit/scrollbarapp/scrollbarapp_x86.proj -------------------------------------------------------------------------------- /intro/BasicButton/BTSButtonApp.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 "BTSButtonApp.h" 7 | #include "BTSButtonWindow.h" 8 | 9 | int main(int, char**) 10 | { 11 | BTSButtonApp* app = new BTSButtonApp(); 12 | app->Run(); 13 | 14 | return(0); 15 | } 16 | 17 | BTSButtonApp::BTSButtonApp() 18 | : BApplication(BUTTON_APP_SIG) 19 | { 20 | } 21 | 22 | void 23 | BTSButtonApp::ReadyToRun() 24 | { 25 | fWindow = new BTSButtonWindow(); 26 | fWindow->Show(); 27 | } -------------------------------------------------------------------------------- /intro/BasicButton/BTSButtonApp.h: -------------------------------------------------------------------------------- 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 | #ifndef _BTSBUTTONAPP_H_ 7 | #define _BTSBUTTONAPP_H_ 8 | 9 | 10 | #include 11 | 12 | #include "BTSButtonWindow.h" 13 | 14 | //#define BUTTON_APP_SIG 'BTAP' 15 | #define BUTTON_APP_SIG "application/x-vnd.Be-BasicButton" 16 | 17 | class BTSButtonApp: public BApplication 18 | { 19 | public: 20 | BTSButtonApp(); 21 | virtual void ReadyToRun(); 22 | private: 23 | BTSButtonWindow* fWindow; 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /intro/BasicButton/BTSButtonWindow.h: -------------------------------------------------------------------------------- 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 | #ifndef _BTSBUTTONWINDOW_H_ 7 | #define _BTSBUTTONWINDOW_H_ 8 | 9 | 10 | #include 11 | #include 12 | 13 | #define BUTTON_MSG 'PRES' 14 | 15 | class BTSButtonWindow : public BWindow 16 | { 17 | public: 18 | BTSButtonWindow(); 19 | virtual bool QuitRequested(); 20 | virtual void MessageReceived(BMessage* message); 21 | private: 22 | BButton* fButton; 23 | }; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /intro/BasicButton/BasicButton_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/BasicButton/BasicButton_ppc.proj -------------------------------------------------------------------------------- /intro/BasicButton/BasicButton_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/BasicButton/BasicButton_x86.proj -------------------------------------------------------------------------------- /intro/BasicButton/README.BasicButton: -------------------------------------------------------------------------------- 1 | Basic Button Project README 2 | =========================== 3 | 4 | This project is intended to show you the basics of using user interface elements in a window. 5 | It creates a window and places a button in the window. Pressing the button updates the 6 | title to reflect the click count. 7 | 8 | Files 9 | ===== 10 | 11 | The archive should contain the following files: 12 | 13 | README.BasicButton -- This file 14 | BasicButton.proj -- Metrowerks project file 15 | 16 | BTSButtonApp.cpp -- Source files 17 | BTSButtonApp.h 18 | BTSButtonWindow.cpp 19 | BTSButtonWindow.h 20 | -------------------------------------------------------------------------------- /intro/ButtonWorld/ButtonView.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | ButtonView.h 4 | 5 | */ 6 | /* 7 | Copyright 1999, Be Incorporated. All Rights Reserved. 8 | This file may be used under the terms of the Be Sample Code License. 9 | */ 10 | 11 | #ifndef _BUTTONVIEW_H_ 12 | #define _BUTTONVIEW_H_ 13 | 14 | 15 | #include 16 | 17 | #define BUTTON_MSG 'btnm' 18 | 19 | class ButtonView : public BStringView 20 | { 21 | public: 22 | ButtonView(BRect frame, const char *name, const char *text); 23 | virtual void MessageReceived(BMessage *message); 24 | virtual void MouseDown(BPoint); 25 | 26 | }; 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /intro/ButtonWorld/ButtonWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | ButtonWindow.h 4 | 5 | */ 6 | /* 7 | Copyright 1999, Be Incorporated. All Rights Reserved. 8 | This file may be used under the terms of the Be Sample Code License. 9 | */ 10 | 11 | #ifndef _BUTTONWINDOW_H_ 12 | #define _BUTTONWINDOW_H_ 13 | 14 | 15 | #include 16 | 17 | // ButtonWindow class 18 | class ButtonWindow : public BWindow 19 | { 20 | public: 21 | ButtonWindow(BRect frame); 22 | virtual bool QuitRequested(); 23 | }; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /intro/ButtonWorld/ButtonWorld.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | ButtonWorld.h 4 | 5 | */ 6 | /* 7 | Copyright 1999, Be Incorporated. All Rights Reserved. 8 | This file may be used under the terms of the Be Sample Code License. 9 | */ 10 | #ifndef _BUTTONWORLD_H_ 11 | #define _BUTTONWORLD_H_ 12 | 13 | 14 | #include 15 | 16 | //ButtonApplication class 17 | class ButtonApplication : public BApplication 18 | { 19 | public: 20 | ButtonApplication(); 21 | virtual void RefsReceived( BMessage *message ); 22 | 23 | private: 24 | BWindow *buttonWindow; 25 | }; 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /intro/ButtonWorld/ButtonWorld.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/ButtonWorld/ButtonWorld.rsrc -------------------------------------------------------------------------------- /intro/ButtonWorld/ButtonWorld_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/ButtonWorld/ButtonWorld_ppc.proj -------------------------------------------------------------------------------- /intro/ButtonWorld/ButtonWorld_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/ButtonWorld/ButtonWorld_x86.proj -------------------------------------------------------------------------------- /intro/ButtonWorld/README.ButtonWorld: -------------------------------------------------------------------------------- 1 | ButtonWorld Project README 2 | ========================= 3 | 4 | ButtonWorld takes DropWorld and extends it further! It adds two buttons to the window that demonstrate different behaviors and making custom buttons 5 | 6 | Files 7 | ===== 8 | 9 | The archive should contain the following files: 10 | 11 | README.ButtonWorld -- This file 12 | ButtonWorld.proj -- Metrowerks project file 13 | ButtonWorld.rsrc -- Application resource file 14 | makefile -- project makefile 15 | 16 | ButtonWorld.cpp -- Source files 17 | ButtonWorld.h 18 | ButtonWindow.cpp 19 | ButtonWindow.h 20 | ButtonView.cpp 21 | ButtonView.h 22 | Blue4x4.h 23 | Blue4x4on.h -------------------------------------------------------------------------------- /intro/DoubleClick/DoubleClick.h: -------------------------------------------------------------------------------- 1 | // DoubleClick.h 2 | 3 | #ifndef DoubleClick_H 4 | #define DoubleClick_H 1 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | class DoubleClickView : public BView 12 | { 13 | public: 14 | DoubleClickView(BRect frame, const char* name, uint32 resizeMask, uint32 flags); 15 | 16 | void Draw(BRect updateRect); 17 | void MouseDown(BPoint where); 18 | 19 | private: 20 | int32 mLastButton; 21 | int32 mClickCount; 22 | BString mText; 23 | }; 24 | 25 | class DoubleClickWin : public BWindow 26 | { 27 | public: 28 | DoubleClickWin(); 29 | void Quit(); 30 | }; 31 | 32 | class DoubleClickApp : public BApplication 33 | { 34 | public: 35 | DoubleClickApp(const char* signature); 36 | void ReadyToRun(); 37 | }; 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /intro/DropWorld/DropView.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | DropView.h 4 | 5 | */ 6 | /* 7 | Copyright 1999, Be Incorporated. All Rights Reserved. 8 | This file may be used under the terms of the Be Sample Code License. 9 | */ 10 | 11 | #ifndef DROP_VIEW_H 12 | #define DROP_VIEW_H 13 | 14 | #ifndef _STRING_VIEW_H 15 | #include 16 | #endif 17 | 18 | class DropView : public BStringView 19 | { 20 | public: 21 | DropView(BRect frame, const char *name, const char *text); 22 | virtual void MessageReceived(BMessage *message); 23 | virtual void MouseDown(BPoint); 24 | 25 | }; 26 | 27 | #endif //DROP_VIEW_H 28 | -------------------------------------------------------------------------------- /intro/DropWorld/DropWindow.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | DropWindow.cpp 4 | 5 | */ 6 | /* 7 | Copyright 1999, Be Incorporated. All Rights Reserved. 8 | This file may be used under the terms of the Be Sample Code License. 9 | */ 10 | 11 | #ifndef _APPLICATION_H 12 | #include 13 | #endif 14 | #ifndef DROP_WINDOW_H 15 | #include "DropWindow.h" 16 | #endif 17 | #ifndef DROP_VIEW_H 18 | #include "DropView.h" 19 | #endif 20 | 21 | DropWindow::DropWindow(BRect frame) 22 | : BWindow(frame, "Drop", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE) 23 | { 24 | DropView *dropView = new DropView( Bounds(), "myView", "Drag a file to me" ); 25 | 26 | // add view to window 27 | AddChild(dropView); 28 | } 29 | 30 | bool DropWindow::QuitRequested() 31 | { 32 | be_app->PostMessage(B_QUIT_REQUESTED); 33 | return(true); 34 | } -------------------------------------------------------------------------------- /intro/DropWorld/DropWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | DropWindow.h 4 | 5 | */ 6 | /* 7 | Copyright 1999, Be Incorporated. All Rights Reserved. 8 | This file may be used under the terms of the Be Sample Code License. 9 | */ 10 | 11 | #ifndef DROP_WINDOW_H 12 | #define DROP_WINDOW_H 13 | 14 | #ifndef _WINDOW_H 15 | #include 16 | #endif 17 | 18 | // DropWindow class 19 | class DropWindow : public BWindow 20 | { 21 | public: 22 | DropWindow(BRect frame); 23 | virtual bool QuitRequested(); 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /intro/DropWorld/DropWorld.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | DropWorld.h 4 | 5 | */ 6 | /* 7 | Copyright 1999, Be Incorporated. All Rights Reserved. 8 | This file may be used under the terms of the Be Sample Code License. 9 | */ 10 | 11 | #ifndef DROP_WORLD_H 12 | #define DROP_WORLD_H 13 | 14 | #include 15 | 16 | //DropApplication class 17 | class DropApplication : public BApplication 18 | { 19 | public: 20 | DropApplication(); 21 | virtual void RefsReceived( BMessage *message ); 22 | 23 | private: 24 | BWindow *dropWindow; 25 | }; 26 | 27 | #endif //DROP_WORLD_H 28 | -------------------------------------------------------------------------------- /intro/DropWorld/DropWorld.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/DropWorld/DropWorld.rsrc -------------------------------------------------------------------------------- /intro/DropWorld/DropWorld_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/DropWorld/DropWorld_ppc.proj -------------------------------------------------------------------------------- /intro/DropWorld/DropWorld_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/DropWorld/DropWorld_x86.proj -------------------------------------------------------------------------------- /intro/DropWorld/README.DropWorld: -------------------------------------------------------------------------------- 1 | DropWorld Project README 2 | ========================= 3 | 4 | DropWorld is a modified Hello World. It displays the name of a file dropped on its icon, or on the window itself. If you launch DropWorld from a terminal you can see some output, too. 5 | 6 | Files 7 | ===== 8 | 9 | The archive should contain the following files: 10 | 11 | README.DropWorld -- This file 12 | DropWorld.proj -- Metrowerks project file 13 | DropWorld.rsrc -- Application resource file 14 | makefile -- project makefile 15 | 16 | DropWorld.cpp -- Source files 17 | DropWorld.h 18 | DropWindow.cpp 19 | DropWindow.h 20 | DropView.cpp 21 | DropView.h 22 | -------------------------------------------------------------------------------- /intro/HelloWorld/HelloView.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | HelloView.cpp 4 | 5 | */ 6 | /* 7 | Copyright 1999, Be Incorporated. All Rights Reserved. 8 | This file may be used under the terms of the Be Sample Code License. 9 | */ 10 | 11 | #ifndef HELLO_VIEW_H 12 | #include "HelloView.h" 13 | #endif 14 | 15 | HelloView::HelloView(BRect rect, const char *name, const char *text) 16 | : BStringView(rect, name, text, B_FOLLOW_ALL, B_WILL_DRAW) 17 | { 18 | SetFont(be_bold_font); 19 | SetFontSize(24); 20 | } -------------------------------------------------------------------------------- /intro/HelloWorld/HelloView.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | HelloView.h 4 | 5 | */ 6 | /* 7 | Copyright 1999, Be Incorporated. All Rights Reserved. 8 | This file may be used under the terms of the Be Sample Code License. 9 | */ 10 | 11 | #ifndef HELLO_VIEW_H 12 | #define HELLO_VIEW_H 13 | 14 | #ifndef _STRING_VIEW_H 15 | #include 16 | #endif 17 | 18 | class HelloView : public BStringView 19 | { 20 | public: 21 | HelloView(BRect frame, const char *name, const char *text); 22 | }; 23 | 24 | #endif //HELLO_VIEW_H 25 | -------------------------------------------------------------------------------- /intro/HelloWorld/HelloWindow.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | HelloWindow.cpp 4 | 5 | */ 6 | /* 7 | Copyright 1999, Be Incorporated. All Rights Reserved. 8 | This file may be used under the terms of the Be Sample Code License. 9 | */ 10 | 11 | #ifndef _APPLICATION_H 12 | #include 13 | #endif 14 | #ifndef HELLO_WINDOW_H 15 | #include "HelloWindow.h" 16 | #endif 17 | #ifndef HELLO_VIEW_H 18 | #include "HelloView.h" 19 | #endif 20 | 21 | HelloWindow::HelloWindow(BRect frame) 22 | : BWindow(frame, "Hello", B_TITLED_WINDOW, B_NOT_RESIZABLE | B_NOT_ZOOMABLE ) 23 | { 24 | HelloView *aView; 25 | // set up a rectangle and instantiate a new view 26 | BRect aRect( Bounds() ); 27 | aView = new HelloView(aRect, "HelloView", "Hello World!"); 28 | // add view to window 29 | AddChild(aView); 30 | } 31 | 32 | bool HelloWindow::QuitRequested() 33 | { 34 | be_app->PostMessage(B_QUIT_REQUESTED); 35 | return(true); 36 | } 37 | -------------------------------------------------------------------------------- /intro/HelloWorld/HelloWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | HelloWindow.h 4 | 5 | */ 6 | /* 7 | Copyright 1999, Be Incorporated. All Rights Reserved. 8 | This file may be used under the terms of the Be Sample Code License. 9 | */ 10 | 11 | #ifndef HELLO_WINDOW_H 12 | #define HELLO_WINDOW_H 13 | 14 | #ifndef _WINDOW_H 15 | #include 16 | #endif 17 | 18 | class HelloWindow : public BWindow 19 | { 20 | public: 21 | HelloWindow(BRect frame); 22 | virtual bool QuitRequested(); 23 | }; 24 | 25 | #endif //HELLO_WINDOW_H 26 | -------------------------------------------------------------------------------- /intro/HelloWorld/HelloWorld.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | HelloWorld.cpp 4 | 5 | */ 6 | /* 7 | Copyright 1999, Be Incorporated. All Rights Reserved. 8 | This file may be used under the terms of the Be Sample Code License. 9 | */ 10 | 11 | #ifndef HELLO_WINDOW_H 12 | #include "HelloWindow.h" 13 | #endif 14 | #ifndef HELLO_WORLD_H 15 | #include "HelloWorld.h" 16 | #endif 17 | 18 | int main(int, char**) 19 | { 20 | HelloApplication myApplication; 21 | 22 | myApplication.Run(); 23 | 24 | return(0); 25 | } 26 | 27 | HelloApplication::HelloApplication() 28 | : BApplication("application/x-vnd.Be-HelloWorldSample") 29 | { 30 | HelloWindow *aWindow; 31 | BRect aRect; 32 | 33 | // set up a rectangle and instantiate a new window 34 | aRect.Set(100, 80, 260, 120); 35 | aWindow = new HelloWindow(aRect); 36 | 37 | // make window visible 38 | aWindow->Show(); 39 | } 40 | -------------------------------------------------------------------------------- /intro/HelloWorld/HelloWorld.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | HelloWorld.h 4 | 5 | */ 6 | /* 7 | Copyright 1999, Be Incorporated. All Rights Reserved. 8 | This file may be used under the terms of the Be Sample Code License. 9 | */ 10 | 11 | #ifndef HELLO_WORLD_H 12 | #define HELLO_WORLD_H 13 | 14 | #ifndef _APPLICATION_H 15 | #include 16 | #endif 17 | 18 | class HelloApplication : public BApplication 19 | { 20 | public: 21 | HelloApplication(); 22 | }; 23 | 24 | #endif //HELLO_WORLD_H 25 | -------------------------------------------------------------------------------- /intro/HelloWorld/HelloWorld.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/HelloWorld/HelloWorld.rsrc -------------------------------------------------------------------------------- /intro/HelloWorld/HelloWorld_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/HelloWorld/HelloWorld_ppc.proj -------------------------------------------------------------------------------- /intro/HelloWorld/HelloWorld_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/HelloWorld/HelloWorld_x86.proj -------------------------------------------------------------------------------- /intro/HelloWorld/README.HelloWorld: -------------------------------------------------------------------------------- 1 | HelloWorld Project README 2 | ========================= 3 | 4 | This is the classic "Hello World" app, Be style. It puts the text 5 | "Hello World" in a window. 6 | 7 | Files 8 | ===== 9 | 10 | The archive should contain the following files: 11 | 12 | README.HelloWorld -- This file 13 | HelloWorld.proj -- Metrowerks project file 14 | HelloWorld.rsrc -- Application resource file 15 | makefile -- project makefile 16 | 17 | HelloWorld.cpp -- Source files 18 | HelloWorld.h 19 | HelloWindow.cpp 20 | HelloWindow.h 21 | HelloView.cpp 22 | HelloView.h 23 | -------------------------------------------------------------------------------- /intro/QSort/qsort_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/QSort/qsort_ppc.proj -------------------------------------------------------------------------------- /intro/QSort/qsort_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/QSort/qsort_x86.proj -------------------------------------------------------------------------------- /intro/TextEditor/textapp.h: -------------------------------------------------------------------------------- 1 | // 2 | // TextApp class 3 | // 4 | // This class, derived from BApplication, defines the 5 | // Hello World application itself. 6 | // 7 | /* 8 | Copyright 1999, Be Incorporated. All Rights Reserved. 9 | This file may be used under the terms of the Be Sample Code License. 10 | */ 11 | 12 | #ifndef __TEXTAPP_H__ 13 | #define __TEXTAPP_H__ 14 | 15 | extern const char *APP_SIGNATURE; 16 | 17 | class TextApp : public BApplication { 18 | public: 19 | TextApp(); 20 | virtual void MessageReceived(BMessage *message); 21 | virtual void RefsReceived(BMessage *message); 22 | 23 | private: 24 | int32 window_count; 25 | int32 next_untitled_number; 26 | 27 | BFilePanel *openPanel; 28 | }; 29 | #endif -------------------------------------------------------------------------------- /intro/TextEditor/textworld_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/TextEditor/textworld_ppc.proj -------------------------------------------------------------------------------- /intro/TextEditor/textworld_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/TextEditor/textworld_x86.proj -------------------------------------------------------------------------------- /intro/doodle/doodle.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/doodle/doodle.rsrc -------------------------------------------------------------------------------- /intro/doodle/doodle_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/doodle/doodle_ppc.proj -------------------------------------------------------------------------------- /intro/doodle/doodle_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/doodle/doodle_x86.proj -------------------------------------------------------------------------------- /intro/doodle/syncutil.h: -------------------------------------------------------------------------------- 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 | #ifndef _syncutil_h 7 | #define _syncutil_h 8 | 9 | status_t WaitForDelete(sem_id blocker); 10 | 11 | #endif /* _syncutil_h */ -------------------------------------------------------------------------------- /intro/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all introductory sample code 2 | 3 | SUBMAKES = \ 4 | prefs_article 5 | 6 | LEAFDIRS = \ 7 | BasicButton \ 8 | ButtonWorld \ 9 | DoubleClick \ 10 | DropWorld \ 11 | HelloWorld \ 12 | QSort \ 13 | TextEditor \ 14 | doodle \ 15 | messageworld \ 16 | xmas 17 | 18 | default .DEFAULT: 19 | -@for f in $(LEAFDIRS); do \ 20 | $(MAKE) -C $$f $@; \ 21 | done 22 | -@for f in $(SUBMAKES); do \ 23 | $(MAKE) -C $$f -f makefile.all $@; \ 24 | done 25 | -------------------------------------------------------------------------------- /intro/messageworld/messageworld_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/messageworld/messageworld_ppc.proj -------------------------------------------------------------------------------- /intro/messageworld/messageworld_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/messageworld/messageworld_x86.proj -------------------------------------------------------------------------------- /intro/prefs_article/README.txt: -------------------------------------------------------------------------------- 1 | prefs_article: README.txt 2 | Last modified: 11/9/98 3 | 4 | To build and run this code: 5 | 1. Go to the directory prefslib/ and build prefslib.so by either running make from the command line or building one of the BeIDE projects. 6 | 2. Copy libprefs.so to sample/lib. This is the place that the sample application will look for prefslib.so when it builds and launches. 7 | 3. Go to the directory sample/ and build sample, again by either running make from the command line or building one of the BeIDE projects. 8 | 4. Run sample from the command line. 9 | 10 | Note that sample will only find prefslib.so if the application is in the same place as the lib/ directory. -------------------------------------------------------------------------------- /intro/prefs_article/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for the prefslib sample code 2 | 3 | LEAFDIRS = \ 4 | prefslib \ 5 | sample 6 | 7 | default .DEFAULT: 8 | -@for f in $(LEAFDIRS); do \ 9 | $(MAKE) -C $$f $@; \ 10 | done 11 | -------------------------------------------------------------------------------- /intro/prefs_article/prefslib/prefslib_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/prefs_article/prefslib/prefslib_ppc.proj -------------------------------------------------------------------------------- /intro/prefs_article/prefslib/prefslib_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/prefs_article/prefslib/prefslib_x86.proj -------------------------------------------------------------------------------- /intro/prefs_article/sample/sample_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/prefs_article/sample/sample_ppc.proj -------------------------------------------------------------------------------- /intro/prefs_article/sample/sample_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/prefs_article/sample/sample_x86.proj -------------------------------------------------------------------------------- /intro/xmas/newr4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/xmas/newr4.jpg -------------------------------------------------------------------------------- /intro/xmas/time/BitmapView.h: -------------------------------------------------------------------------------- 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 | #ifndef _BitmapView_h 7 | #define _BitmapView_h 8 | 9 | #include 10 | 11 | class BitmapView : public BView 12 | { 13 | public: 14 | BitmapView(BBitmap* bitmap, BRect frame, const char* name, 15 | uint32 resizingMode = B_FOLLOW_LEFT | B_FOLLOW_TOP, 16 | uint32 flags = B_WILL_DRAW); 17 | ~BitmapView(); 18 | 19 | BBitmap* Bitmap(); 20 | void SetBitmap(BBitmap* bitmap); 21 | 22 | void AttachedToWindow(); 23 | void Draw(BRect updateRect); 24 | void ResizeToPreferred(); 25 | void GetPreferredSize(float* width, float* height); 26 | 27 | private: 28 | BBitmap* m_pBitmap; 29 | }; 30 | 31 | #endif /* _BitmapView_h */ -------------------------------------------------------------------------------- /intro/xmas/time/UptimeView.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | UptimeView.h 4 | 5 | */ 6 | 7 | /* 8 | Copyright 1995-1999, Be Incorporated. All Rights Reserved. 9 | This file may be used under the terms of the Be Sample Code License. 10 | */ 11 | 12 | #ifndef HELLO_VIEW_H 13 | #define HELLO_VIEW_H 14 | 15 | #ifndef _VIEW_H 16 | #include 17 | #endif 18 | 19 | #include 20 | 21 | class UptimeView : public BView { 22 | private: 23 | public: 24 | UptimeView(BRect frame, char *name); 25 | int PrevSec; 26 | BString DateString; 27 | int is_leap; 28 | int xmas; 29 | int our_year; 30 | 31 | virtual void update(void); 32 | virtual void Draw(BRect updateRect); 33 | virtual void Pulse(void); 34 | 35 | 36 | 37 | }; 38 | 39 | #endif 40 | 41 | -------------------------------------------------------------------------------- /intro/xmas/time/UptimeWindow.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | UptimeWindow.cpp 4 | 5 | */ 6 | 7 | /* 8 | Copyright 1995-1999, Be Incorporated. All Rights Reserved. 9 | This file may be used under the terms of the Be Sample Code License. 10 | */ 11 | 12 | #ifndef _APPLICATION_H 13 | #include 14 | #endif 15 | 16 | #ifndef HELLO_WINDOW_H 17 | #include "UptimeWindow.h" 18 | #endif 19 | 20 | void set_palette_entry(long i,rgb_color c); 21 | 22 | UptimeWindow::UptimeWindow(BRect frame) : BWindow(frame, "Weihnachten", B_TITLED_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL, B_AVOID_FRONT | B_NOT_RESIZABLE) 23 | { 24 | ; 25 | } 26 | 27 | bool UptimeWindow::QuitRequested() 28 | { 29 | be_app->PostMessage(B_QUIT_REQUESTED); 30 | return(TRUE); 31 | } 32 | 33 | -------------------------------------------------------------------------------- /intro/xmas/time/UptimeWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | UptimeWindow.h 4 | 5 | */ 6 | 7 | /* 8 | Copyright 1995-1999, Be Incorporated. All Rights Reserved. 9 | This file may be used under the terms of the Be Sample Code License. 10 | */ 11 | 12 | #ifndef HELLO_WINDOW_H 13 | #define HELLO_WINDOW_H 14 | 15 | #ifndef _WINDOW_H 16 | #include 17 | #endif 18 | 19 | class UptimeWindow : public BWindow { 20 | 21 | public: 22 | UptimeWindow(BRect frame); 23 | virtual bool QuitRequested(); 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /intro/xmas/xmas.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/xmas/xmas.wav -------------------------------------------------------------------------------- /intro/xmas/xmas_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/xmas/xmas_ppc.proj -------------------------------------------------------------------------------- /intro/xmas/xmas_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/xmas/xmas_x86.proj -------------------------------------------------------------------------------- /intro/xmas/xmas_x86.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/xmas/xmas_x86.rsrc -------------------------------------------------------------------------------- /intro/xmas/xmas_x86_No_bitmap.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/intro/xmas/xmas_x86_No_bitmap.rsrc -------------------------------------------------------------------------------- /kernel_kit/cputime/cputime.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/kernel_kit/cputime/cputime.proj -------------------------------------------------------------------------------- /kernel_kit/cputime/datadefs.h: -------------------------------------------------------------------------------- 1 | // Copyright 2000, Be Incorporated. All Rights Reserved. 2 | // This file may be used under the terms of the Be Sample Code License. 3 | 4 | struct thread_time 5 | { 6 | ulong usertime; 7 | ulong kerntime; 8 | }; 9 | struct thread_data 10 | { 11 | thread_id thread; 12 | char name[B_OS_NAME_LENGTH+1]; 13 | bool displayit; 14 | bigtime_t totaluser; 15 | bigtime_t totalkern; 16 | thread_time *times; 17 | }; 18 | 19 | extern thread_data thread[]; 20 | -------------------------------------------------------------------------------- /kernel_kit/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all Kernel Kit sample code 2 | 3 | LEAFDIRS = \ 4 | cputime 5 | 6 | default .DEFAULT: 7 | -@for f in $(LEAFDIRS); do \ 8 | $(MAKE) -C $$f $@; \ 9 | done 10 | -------------------------------------------------------------------------------- /languages/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all languages sample code 2 | 3 | LEAFDIRS = \ 4 | ObjectOrientedC 5 | 6 | default .DEFAULT: 7 | -@for f in $(LEAFDIRS); do \ 8 | $(MAKE) -C $$f $@; \ 9 | done 10 | -------------------------------------------------------------------------------- /media_kit/CodyCam/codycam.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/media_kit/CodyCam/codycam.rsrc -------------------------------------------------------------------------------- /media_kit/FilmStrip/BitmapView.cpp: -------------------------------------------------------------------------------- 1 | #include "BitmapView.h" 2 | 3 | BitmapView::BitmapView(BRect bounds,BBitmap* image) 4 | : BView(bounds,"BitmapView",B_FOLLOW_ALL,B_WILL_DRAW), 5 | mImage(image) 6 | { 7 | SetViewColor(0,0,0); 8 | } 9 | 10 | BitmapView::~BitmapView(void) 11 | { 12 | } 13 | 14 | void BitmapView::SetImage(BBitmap* image) 15 | { 16 | mImage = image; 17 | if (LockLooper()) { 18 | // LockLooper() is only necessary if SetImage() 19 | // is called from a thread other than the 20 | // parent window's. That's not the case in this 21 | // app right now, but it could be. 22 | if (mImage != NULL) { 23 | Draw(Bounds()); 24 | } 25 | else { 26 | Invalidate(); 27 | } 28 | UnlockLooper(); 29 | } 30 | } 31 | 32 | void BitmapView::Draw(BRect updateRect) 33 | { 34 | if (mImage != NULL) { 35 | DrawBitmap(mImage,updateRect,updateRect); 36 | } 37 | } -------------------------------------------------------------------------------- /media_kit/FilmStrip/BitmapView.h: -------------------------------------------------------------------------------- 1 | #ifndef _BITMAPVIEW_H_ 2 | #define _BITMAPVIEW_H_ 3 | 4 | #include 5 | #include 6 | 7 | class BitmapView : public BView { 8 | public: 9 | BitmapView(BRect bounds,BBitmap* image = NULL); 10 | ~BitmapView(void); 11 | 12 | virtual void Draw(BRect updateRect); 13 | void SetImage(BBitmap* image); 14 | 15 | private: 16 | BBitmap* mImage; 17 | }; 18 | 19 | #endif // #ifndef _BITMAPVIEW_H_ -------------------------------------------------------------------------------- /media_kit/FilmStrip/ControlWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef _CONTROLWINDOW_H_ 2 | #define _CONTROLWINDOW_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | class ControlWindow : public BWindow { 10 | public: 11 | ControlWindow(const BPoint offset,const BWindow* const win); 12 | ~ControlWindow(void); 13 | 14 | void MessageReceived(BMessage* msg); 15 | 16 | private: 17 | BMessenger* mFSWin; 18 | BSlider* mGrabIntvlSlider; 19 | BCheckBox* mDropFramesChkBox; 20 | BSlider* mFrameIntvlSlider; 21 | }; 22 | 23 | #endif // #ifndef _CONTROLWINDOW_H_ -------------------------------------------------------------------------------- /media_kit/FilmStrip/ErrorAlert.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "ErrorAlert.h" 3 | 4 | ErrorAlert::ErrorAlert(const char* msg,const status_t err) 5 | : BAlert("ErrorAlert", 6 | (BString(msg) << " [" << err << "]").String(),"Ok") 7 | { 8 | } 9 | 10 | ErrorAlert::~ErrorAlert(void) 11 | { 12 | } -------------------------------------------------------------------------------- /media_kit/FilmStrip/ErrorAlert.h: -------------------------------------------------------------------------------- 1 | #ifndef _ERRORALERT_H_ 2 | #define _ERRORALERT_H_ 3 | 4 | #include 5 | 6 | class ErrorAlert : public BAlert { 7 | public: 8 | ErrorAlert(const char* message,const status_t err); 9 | virtual ~ErrorAlert(void); 10 | }; 11 | 12 | #endif // #ifndef _ERRORALERT_H_ -------------------------------------------------------------------------------- /media_kit/FilmStrip/FilmStrip.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/media_kit/FilmStrip/FilmStrip.rsrc -------------------------------------------------------------------------------- /media_kit/FilmStrip/FilmStripApp.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "FilmStripApp.h" 3 | #include "MessageVals.h" 4 | 5 | FilmStripApp::FilmStripApp(void) 6 | : BApplication("application/x-vnd.BeDTS-FilmStrip"), 7 | mFSWindow(NULL) 8 | { 9 | } 10 | 11 | FilmStripApp::~FilmStripApp(void) 12 | { 13 | } 14 | 15 | void FilmStripApp::RefsReceived(BMessage* msg) 16 | { 17 | entry_ref ref; 18 | 19 | if (msg->FindRef("refs",&ref) == B_OK) { 20 | mFSWindow = new FilmStripWindow(&ref); 21 | mFSWindow->Show(); 22 | } 23 | } 24 | 25 | void FilmStripApp::ReadyToRun(void) 26 | { 27 | if (CountWindows() == 0) { 28 | mFSWindow = new FilmStripWindow(); 29 | mFSWindow->Show(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /media_kit/FilmStrip/FilmStripApp.h: -------------------------------------------------------------------------------- 1 | #ifndef _FILMSTRIPAPP_H_ 2 | #define _FILMSTRIPAPP_H_ 3 | 4 | #include 5 | #include "FilmStripWindow.h" 6 | 7 | class FilmStripApp : public BApplication { 8 | public: 9 | FilmStripApp(void); 10 | virtual ~FilmStripApp(void); 11 | 12 | virtual void RefsReceived(BMessage* msg); 13 | virtual void ReadyToRun(void); 14 | 15 | private: 16 | FilmStripWindow* mFSWindow; 17 | }; 18 | 19 | #endif // #ifndef _FILMSTRIPAPP_H_ -------------------------------------------------------------------------------- /media_kit/FilmStrip/FilmStripWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef _FILMSTRIPWINDOW_H_ 2 | #define _FILMSTRIPWINDOW_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "FilmStrip.h" 9 | #include "BitmapView.h" 10 | 11 | class FilmStripWindow : public BWindow { 12 | public: 13 | FilmStripWindow(const entry_ref* ref = NULL); 14 | virtual ~FilmStripWindow(void); 15 | 16 | virtual bool QuitRequested(void); 17 | virtual void MessageReceived(BMessage* msg); 18 | 19 | private: 20 | void Prepare(const entry_ref& ref); 21 | 22 | FilmStrip* mStrip; 23 | BitmapView* mView; 24 | BMessageRunner* mSwitcher; 25 | BMessenger* mCWin; 26 | entry_ref mRef; 27 | }; 28 | 29 | #endif // #ifndef _FILMSTRIPWINDOW_H_ -------------------------------------------------------------------------------- /media_kit/FilmStrip/FilmStrip_PPC.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/media_kit/FilmStrip/FilmStrip_PPC.proj -------------------------------------------------------------------------------- /media_kit/FilmStrip/FilmStrip_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/media_kit/FilmStrip/FilmStrip_x86.proj -------------------------------------------------------------------------------- /media_kit/FilmStrip/MessageVals.h: -------------------------------------------------------------------------------- 1 | #ifndef _MESSAGEVALS_H_ 2 | #define _MESSAGEVALS_H_ 3 | 4 | const uint32 kShowNextFrame = 'snxf'; 5 | const uint32 kGrabIntvlChg = 'gich'; 6 | const uint32 kDrawIntvlChg = 'dich'; 7 | const uint32 kModeChg = 'mdch'; 8 | const uint32 kNewFilmStrip = 'nwfs'; 9 | 10 | #endif // #ifndef _MESSAGEVALS_H_ -------------------------------------------------------------------------------- /media_kit/FilmStrip/main.cpp: -------------------------------------------------------------------------------- 1 | #include "FilmStripApp.h" 2 | 3 | int main(void) 4 | { 5 | FilmStripApp app; 6 | 7 | return app.Run(); 8 | } -------------------------------------------------------------------------------- /media_kit/LoggingConsumerApp/.dependencies: -------------------------------------------------------------------------------- 1 | $(OBJ_DIR)/LoggingConsumerApp.o: LoggingConsumerApp.cpp NodeHarnessApp.h 2 | $(OBJ_DIR)/NodeHarnessApp.o: NodeHarnessApp.cpp NodeHarnessApp.h NodeHarnessWin.h 3 | $(OBJ_DIR)/NodeHarnessWin.o: NodeHarnessWin.cpp NodeHarnessWin.h \ 4 | LoggingConsumer.h LogWriter.h 5 | $(OBJ_DIR)/LogWriter.o: LogWriter.cpp LogWriter.h 6 | $(OBJ_DIR)/LoggingConsumer.o: LoggingConsumer.cpp LoggingConsumer.h LogWriter.h 7 | -------------------------------------------------------------------------------- /media_kit/LoggingConsumerApp/LoggingConsumerApp.cpp: -------------------------------------------------------------------------------- 1 | // LoggingConsumerApp.cpp 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 | #include "NodeHarnessApp.h" 8 | 9 | int main(int, char**) 10 | { 11 | NodeHarnessApp app("application/x-vnd.Be.LoggingConsumerApp"); 12 | app.Run(); 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /media_kit/LoggingConsumerApp/LoggingConsumerApp_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/media_kit/LoggingConsumerApp/LoggingConsumerApp_x86.proj -------------------------------------------------------------------------------- /media_kit/LoggingConsumerApp/NodeHarnessApp.cpp: -------------------------------------------------------------------------------- 1 | // NodeHarnessApp.cpp 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 | #include "NodeHarnessApp.h" 8 | #include "NodeHarnessWin.h" 9 | 10 | NodeHarnessApp::NodeHarnessApp(const char *signature) 11 | : BApplication(signature) 12 | { 13 | } 14 | 15 | void 16 | NodeHarnessApp::ReadyToRun() 17 | { 18 | BWindow* win = new NodeHarnessWin(BRect(100, 200, 210, 330), "NodeLogger"); 19 | win->Show(); 20 | } 21 | -------------------------------------------------------------------------------- /media_kit/LoggingConsumerApp/NodeHarnessApp.h: -------------------------------------------------------------------------------- 1 | // NodeHarnessApp.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 | #ifndef NodeHarnessApp_H 8 | #define NodeHarnessApp_H 1 9 | 10 | #include 11 | 12 | class NodeHarnessApp : public BApplication 13 | { 14 | public: 15 | NodeHarnessApp(const char* signature); 16 | void ReadyToRun(); 17 | }; 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /media_kit/MediaConverter/MediaConverter_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/media_kit/MediaConverter/MediaConverter_ppc.proj -------------------------------------------------------------------------------- /media_kit/MediaConverter/MediaConverter_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/media_kit/MediaConverter/MediaConverter_x86.proj -------------------------------------------------------------------------------- /media_kit/MediaFile/README: -------------------------------------------------------------------------------- 1 | This directory contains several sample programs 2 | that use the BMediaFile and BMediaTrack API's. 3 | 4 | The programs are: 5 | 6 | • easy - a simple example showing how to 7 | process all the video and audio frames 8 | in a media file. 9 | 10 | • mplay - a very simple media player program 11 | 12 | • transcode - a command line program that will 13 | convert from one file format to another. -------------------------------------------------------------------------------- /media_kit/MediaFile/easy/README: -------------------------------------------------------------------------------- 1 | This is a sample program that shows how to use the BMediaFile and BMediaTrack 2 | objects. 3 | 4 | It is a command line only application. 5 | 6 | 7 | -------------------------------------------------------------------------------- /media_kit/MediaFile/easy/easy-reader.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/media_kit/MediaFile/easy/easy-reader.proj -------------------------------------------------------------------------------- /media_kit/MediaFile/easy/makefile: -------------------------------------------------------------------------------- 1 | # makefile for easy-media-reader 2 | 3 | ifeq ($(BE_HOST_CPU), ppc) 4 | OPTIMIZER = -O7 5 | LFLAGS = -lbe -lmedia -ltracker 6 | else 7 | OPTIMIZER = -O1 -no-fpic 8 | LFLAGS = -lbe -lmedia -ltracker 9 | endif 10 | 11 | CFLAGS += $(OPTIMIZER) 12 | 13 | .PHONY: default 14 | default: easy-media-reader 15 | 16 | easy-media-reader : easy-media-reader.cpp 17 | cc $(CFLAGS) -o easy-media-reader easy-media-reader.cpp $(LFLAGS) 18 | 19 | clean: 20 | rm -f *.o doc *.xSYM *.xMAP 21 | -------------------------------------------------------------------------------- /media_kit/MediaFile/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all Media File sample code 2 | 3 | SUBDIRS = \ 4 | easy \ 5 | mplay \ 6 | transcode \ 7 | transcode_r5 8 | 9 | default .DEFAULT: 10 | -@for f in $(SUBDIRS) ; do \ 11 | $(MAKE) -C $$f $@; \ 12 | done 13 | -------------------------------------------------------------------------------- /media_kit/MediaFile/mplay/DrawingTidbits.h: -------------------------------------------------------------------------------- 1 | #ifndef __DRAWING_TIBITS__ 2 | #define __DRAWING_TIBITS__ 3 | 4 | #include 5 | 6 | rgb_color ShiftColor(rgb_color , float ); 7 | 8 | bool operator==(const rgb_color &, const rgb_color &); 9 | bool operator!=(const rgb_color &, const rgb_color &); 10 | 11 | inline rgb_color 12 | Color(int32 r, int32 g, int32 b, int32 alpha = 255) 13 | { 14 | rgb_color result; 15 | result.red = r; 16 | result.green = g; 17 | result.blue = b; 18 | result.alpha = alpha; 19 | 20 | return result; 21 | } 22 | 23 | const rgb_color kWhite = { 255, 255, 255, 255}; 24 | const rgb_color kBlack = { 0, 0, 0, 255}; 25 | 26 | const float kDarkness = 1.06; 27 | const float kDimLevel = 0.6; 28 | 29 | void ReplaceColor(BBitmap *bitmap, rgb_color from, rgb_color to); 30 | void ReplaceTransparentColor(BBitmap *bitmap, rgb_color with); 31 | 32 | #endif -------------------------------------------------------------------------------- /media_kit/MediaFile/mplay/MediaPlayer.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/media_kit/MediaFile/mplay/MediaPlayer.rsrc -------------------------------------------------------------------------------- /media_kit/MediaFile/mplay/draw.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAW_H 2 | #define DRAW_H 3 | 4 | #include 5 | #include 6 | 7 | 8 | const uint32 msg_WindowClosed = 'Mwcl'; 9 | 10 | 11 | class DrawApp : public BApplication { 12 | public: 13 | DrawApp(); 14 | virtual ~DrawApp(); 15 | 16 | void OpenOpenPanel(); 17 | 18 | virtual void ReadyToRun(); 19 | virtual void ArgvReceived(int32 argc, char **argv); 20 | virtual void MessageReceived(BMessage *message); 21 | virtual void RefsReceived(BMessage *message); 22 | 23 | private: 24 | BFilePanel* fOpenPanel; 25 | 26 | static int32 sNumWindows; 27 | }; 28 | 29 | 30 | #endif //DRAW_H 31 | -------------------------------------------------------------------------------- /media_kit/MediaFile/mplay/draw_window.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | HelloWindow.h 4 | 5 | Copyright 1997 Be Incorporated, All Rights Reserved. 6 | 7 | */ 8 | 9 | #ifndef DRAW_WINDOW_H 10 | #define DRAW_WINDOW_H 11 | 12 | #include 13 | 14 | 15 | class DrawWindow : public BWindow { 16 | public: 17 | DrawWindow(BRect frame, const char *path); 18 | ~DrawWindow(); 19 | }; 20 | 21 | 22 | #endif //DRAW_WINDOW_H 23 | -------------------------------------------------------------------------------- /media_kit/MediaFile/transcode/makefile: -------------------------------------------------------------------------------- 1 | # Makefile for the transcode tools 2 | 3 | INCLUDES := -I. 4 | 5 | ifeq ($(BE_HOST_CPU), ppc) 6 | OPTIMIZER = -O4 7 | LFLAGS = 8 | else 9 | OPTIMIZER = -O1 -no-fpic 10 | LFLAGS = -lbe -lmedia -ltracker 11 | endif 12 | 13 | CFLAGS += $(OPTIMIZER) $(INCLUDES) 14 | 15 | .PHONY: default 16 | default: encode tcode 17 | 18 | encode : encode.cpp 19 | cc $(OPTIMIZER) $(INCLUDES) -o encode encode.cpp $(LFLAGS) -ltranslation 20 | 21 | tcode : tcode.cpp 22 | cc $(OPTIMIZER) $(INCLUDES) -o tcode tcode.cpp $(LFLAGS) 23 | 24 | clean: 25 | rm -f *.o tcode encode *.xSYM *.xMAP 26 | -------------------------------------------------------------------------------- /media_kit/MediaFile/transcode_r5/tcode.proj_x86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/media_kit/MediaFile/transcode_r5/tcode.proj_x86 -------------------------------------------------------------------------------- /media_kit/Mix-A-Lot/Mix-A-Lot/MixALot.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/media_kit/Mix-A-Lot/Mix-A-Lot/MixALot.rsrc -------------------------------------------------------------------------------- /media_kit/Mix-A-Lot/Mix-A-Lot/MixALot_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/media_kit/Mix-A-Lot/Mix-A-Lot/MixALot_ppc.proj -------------------------------------------------------------------------------- /media_kit/Mix-A-Lot/Mix-A-Lot/MixALot_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/media_kit/Mix-A-Lot/Mix-A-Lot/MixALot_x86.proj -------------------------------------------------------------------------------- /media_kit/Mix-A-Lot/Mix-A-Lot/MixApp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | MixApp.cpp 4 | 5 | */ 6 | 7 | /* 8 | Copyright 1999, Be Incorporated. All Rights Reserved. 9 | This file may be used under the terms of the Be Sample Code License. 10 | */ 11 | 12 | #include "MixWin.h" 13 | #include "MixApp.h" 14 | 15 | int main() 16 | { 17 | MixApp myApplication; 18 | myApplication.Run(); 19 | return 0; 20 | } 21 | 22 | MixApp::MixApp() 23 | : BApplication("application/x-vnd.Be-DTS.Mix-A-Lot") 24 | { 25 | } 26 | 27 | void MixApp::ReadyToRun() 28 | { 29 | new MixWin; 30 | } 31 | -------------------------------------------------------------------------------- /media_kit/Mix-A-Lot/Mix-A-Lot/MixApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | MixApp.h 4 | 5 | */ 6 | 7 | /* 8 | Copyright 1999, Be Incorporated. All Rights Reserved. 9 | This file may be used under the terms of the Be Sample Code License. 10 | */ 11 | 12 | #ifndef _MixApp_h 13 | #define _MixApp_h 14 | 15 | #include 16 | 17 | class MixApp : public BApplication 18 | { 19 | public: 20 | MixApp(); 21 | void ReadyToRun(); 22 | }; 23 | 24 | #endif /* _MixApp_h */ 25 | -------------------------------------------------------------------------------- /media_kit/Mix-A-Lot/Mix-A-Lot/SoundDock.h: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | SoundDock.h 4 | 5 | */ 6 | /* 7 | Copyright 1999, Be Incorporated. All Rights Reserved. 8 | This file may be used under the terms of the Be Sample Code License. 9 | */ 10 | 11 | #ifndef _SoundDock_h 12 | #define _SoundDock_h 13 | 14 | #include "FileDock.h" 15 | 16 | class SoundDock : public FileDock 17 | { 18 | public: 19 | SoundDock(const char* name); 20 | 21 | protected: 22 | bool IsValidRef(const entry_ref* ref); 23 | }; 24 | 25 | #endif /* _SoundDock_h */ -------------------------------------------------------------------------------- /media_kit/ParameterSample/EasySampleWin.h: -------------------------------------------------------------------------------- 1 | // EasySampleWin.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 | #ifndef EasySampleWin_H 8 | #define EasySampleWin_H 1 9 | 10 | #include 11 | #include 12 | 13 | class EasySampleWin : public BWindow 14 | { 15 | public: 16 | EasySampleWin(BRect frame); 17 | ~EasySampleWin(); 18 | 19 | bool QuitRequested(); 20 | void MessageReceived(BMessage*); 21 | 22 | private: 23 | BParameterWeb* mParamWeb; 24 | }; 25 | 26 | #endif // #ifndef ParamSampleWin_H 27 | -------------------------------------------------------------------------------- /media_kit/ParameterSample/HarderSampleWin.h: -------------------------------------------------------------------------------- 1 | // HarderSampleWin.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 | #ifndef HarderSampleWin_H 8 | #define HarderSampleWin_H 1 9 | 10 | #include 11 | 12 | class BParameterWeb; 13 | class BContinuousParameter; 14 | class BMultiChannelControl; 15 | 16 | class HarderSampleWin : public BWindow 17 | { 18 | public: 19 | HarderSampleWin(BRect frame); 20 | ~HarderSampleWin(); 21 | 22 | bool QuitRequested(); 23 | void MessageReceived(BMessage*); 24 | 25 | private: 26 | BParameterWeb* mParamWeb; 27 | BMultiChannelControl* mGainControl; 28 | BContinuousParameter* mGainParam; 29 | float mScale, mOffset; 30 | int32 mControlMin; 31 | }; 32 | 33 | #endif // #ifndef ParamSampleWin_H 34 | -------------------------------------------------------------------------------- /media_kit/ParameterSample/MediaParams.cpp: -------------------------------------------------------------------------------- 1 | // MediaParams.cpp 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 | #include "ParamSampleApp.h" 8 | 9 | int main(int, char**) 10 | { 11 | ParamSampleApp app("application/x-vnd.be-ParameterSample"); 12 | app.Run(); 13 | 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /media_kit/ParameterSample/ParamSampleApp.cpp: -------------------------------------------------------------------------------- 1 | // ParamSampleApp.cpp 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 | #include "ParamSampleApp.h" 8 | #include "EasySampleWin.h" 9 | #include "HarderSampleWin.h" 10 | #include 11 | 12 | ParamSampleApp::ParamSampleApp(const char *signature) 13 | : BApplication(signature) 14 | { 15 | } 16 | 17 | 18 | ParamSampleApp::~ParamSampleApp() 19 | { 20 | } 21 | 22 | void 23 | ParamSampleApp::ReadyToRun() 24 | { 25 | (new EasySampleWin(BRect(100, 50, 200, 150)))->Show(); 26 | (new HarderSampleWin(BRect(50, 50, 150, 150)))->Show(); 27 | } 28 | -------------------------------------------------------------------------------- /media_kit/ParameterSample/ParamSampleApp.h: -------------------------------------------------------------------------------- 1 | // ParamSampleApp.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 | #ifndef ParamSampleApp_H 8 | #define ParamSampleApp_H 1 9 | 10 | #include 11 | 12 | class ParamSampleApp : public BApplication 13 | { 14 | public: 15 | ParamSampleApp(const char* signature); 16 | ~ParamSampleApp(); 17 | 18 | void ReadyToRun(); 19 | 20 | private: 21 | }; 22 | 23 | #endif // #ifndef ParamSampleApp_H 24 | -------------------------------------------------------------------------------- /media_kit/ParameterSample/ParamSampleApp_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/media_kit/ParameterSample/ParamSampleApp_x86.proj -------------------------------------------------------------------------------- /media_kit/ParameterSample/ParameterSample.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/media_kit/ParameterSample/ParameterSample.rsrc -------------------------------------------------------------------------------- /media_kit/ToneProducer/.dependencies: -------------------------------------------------------------------------------- 1 | $(OBJ_DIR)/ToneProducer.o: ToneProducer.cpp ToneProducer.h 2 | $(OBJ_DIR)/NodeHarnessApp.o: NodeHarnessApp.cpp NodeHarnessApp.h NodeHarnessWin.h 3 | $(OBJ_DIR)/NodeHarnessWin.o: NodeHarnessWin.cpp NodeHarnessWin.h ToneProducer.h 4 | $(OBJ_DIR)/main.o: main.cpp NodeHarnessApp.h 5 | -------------------------------------------------------------------------------- /media_kit/ToneProducer/NodeHarnessApp.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | NodeHarnessApp.cpp 3 | 4 | Copyright 1999, Be Incorporated. All Rights Reserved. 5 | This file may be used under the terms of the Be Sample Code License. 6 | */ 7 | 8 | #include "NodeHarnessApp.h" 9 | #include "NodeHarnessWin.h" 10 | 11 | NodeHarnessApp::NodeHarnessApp(const char *signature) 12 | : BApplication(signature) 13 | { 14 | } 15 | 16 | void 17 | NodeHarnessApp::ReadyToRun() 18 | { 19 | BWindow* win = new NodeHarnessWin(BRect(100, 200, 210, 330), "ToneProducer"); 20 | win->Show(); 21 | } 22 | -------------------------------------------------------------------------------- /media_kit/ToneProducer/NodeHarnessApp.h: -------------------------------------------------------------------------------- 1 | /* 2 | NodeHarnessApp.h 3 | 4 | Copyright 1999, Be Incorporated. All Rights Reserved. 5 | This file may be used under the terms of the Be Sample Code License. 6 | */ 7 | 8 | #ifndef NodeHarnessApp_H 9 | #define NodeHarnessApp_H 1 10 | 11 | #include 12 | 13 | class NodeHarnessApp : public BApplication 14 | { 15 | public: 16 | NodeHarnessApp(const char* signature); 17 | void ReadyToRun(); 18 | }; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /media_kit/ToneProducer/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | ToneProducerApp main.cpp 3 | 4 | Copyright 1999, Be Incorporated. All Rights Reserved. 5 | This file may be used under the terms of the Be Sample Code License. 6 | */ 7 | 8 | #include "NodeHarnessApp.h" 9 | 10 | int main(int, char**) 11 | { 12 | NodeHarnessApp app("application/x-vnd.Be.ToneProducerApp"); 13 | app.Run(); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /media_kit/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all Media Kit sample code 2 | 3 | SUBMAKES = \ 4 | MediaFile 5 | 6 | LEAFDIRS = \ 7 | BitmapWriter \ 8 | CodyCam \ 9 | FilmStrip \ 10 | LoggingConsumerApp \ 11 | MediaConverter \ 12 | Mix-A-Lot/Mix-A-Lot \ 13 | ParameterSample \ 14 | ToneProducer 15 | 16 | default .DEFAULT: 17 | -@for f in $(SUBMAKES); do \ 18 | $(MAKE) -C $$f -f makefile.all $@; \ 19 | done 20 | -@for f in $(LEAFDIRS); do \ 21 | $(MAKE) -C $$f $@; \ 22 | done 23 | -------------------------------------------------------------------------------- /midi_kit/PatchBay/CountEventConsumer.h: -------------------------------------------------------------------------------- 1 | // CountEventConsumer.h 2 | // -------------------- 3 | // A simple MIDI consumer that counts incoming MIDI events. 4 | // 5 | // Copyright 1999, Be Incorporated. All Rights Reserved. 6 | // This file may be used under the terms of the Be Sample Code License. 7 | 8 | #ifndef _CountEventConsumer_h 9 | #define _CountEventConsumer_h 10 | 11 | #include 12 | #include 13 | 14 | class CountEventConsumer : public BMidiLocalConsumer 15 | { 16 | public: 17 | CountEventConsumer(const char* name) 18 | : BMidiLocalConsumer(name), m_eventCount(0) 19 | {} 20 | void Reset() { m_eventCount = 0; } 21 | int32 CountEvents() { return m_eventCount; } 22 | 23 | void Data(uchar*, size_t, bool, bigtime_t) 24 | { atomic_add(&m_eventCount, 1); } 25 | 26 | private: 27 | int32 m_eventCount; 28 | }; 29 | 30 | #endif /* _CountEventConsumer_h */ 31 | -------------------------------------------------------------------------------- /midi_kit/PatchBay/MidiEventMeter.h: -------------------------------------------------------------------------------- 1 | // MidiEventMeter.h 2 | // ---------------- 3 | // A UI widget that measures the amount of MIDI data generated by a 4 | // consumer. 5 | // 6 | // Copyright 1999, Be Incorporated. All Rights Reserved. 7 | // This file may be used under the terms of the Be Sample Code License. 8 | 9 | #ifndef _MidiEventMeter_h 10 | #define _MidiEventMeter_h 11 | 12 | #include 13 | #include 14 | 15 | class BMidiProducer; 16 | class CountEventConsumer; 17 | class BView; 18 | 19 | class MidiEventMeter 20 | { 21 | public: 22 | MidiEventMeter(int32 producerID); 23 | ~MidiEventMeter(); 24 | 25 | void Pulse(BView* view); 26 | BRect Bounds() const; 27 | void Draw(BView* view); 28 | 29 | private: 30 | int32 CalcMeterLevel(int32 eventCount) const; 31 | 32 | CountEventConsumer* m_counter; 33 | int32 m_meterLevel; 34 | }; 35 | 36 | #endif /* _MidiMeterWidget_h */ 37 | -------------------------------------------------------------------------------- /midi_kit/PatchBay/PatchApp.h: -------------------------------------------------------------------------------- 1 | // PatchApp.h 2 | // ---------- 3 | // The PatchBay application class. 4 | // 5 | // Copyright 1999, Be Incorporated. All Rights Reserved. 6 | // This file may be used under the terms of the Be Sample Code License. 7 | 8 | #ifndef _PatchApp_h 9 | #define _PatchApp_h 10 | 11 | #include 12 | 13 | class TToolTip; 14 | 15 | class PatchApp : public BApplication 16 | { 17 | public: 18 | PatchApp(); 19 | void ReadyToRun(); 20 | void MessageReceived(BMessage* msg); 21 | 22 | private: 23 | TToolTip* m_toolTip; 24 | }; 25 | 26 | #endif /* _PatchApp_h */ 27 | -------------------------------------------------------------------------------- /midi_kit/PatchBay/PatchBay.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/midi_kit/PatchBay/PatchBay.rsrc -------------------------------------------------------------------------------- /midi_kit/PatchBay/PatchBay_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/midi_kit/PatchBay/PatchBay_ppc.proj -------------------------------------------------------------------------------- /midi_kit/PatchBay/PatchBay_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/midi_kit/PatchBay/PatchBay_x86.proj -------------------------------------------------------------------------------- /midi_kit/PatchBay/PatchRow.h: -------------------------------------------------------------------------------- 1 | #ifndef _PatchRow_h 2 | #define _PatchRow_h 3 | 4 | #include 5 | 6 | extern const float ROW_LEFT; 7 | extern const float ROW_TOP; 8 | extern const float ROW_HEIGHT; 9 | extern const float COLUMN_WIDTH; 10 | extern const float METER_PADDING; 11 | extern const uint32 MSG_CONNECT_REQUEST; 12 | 13 | class MidiEventMeter; 14 | 15 | class PatchRow : public BView 16 | { 17 | public: 18 | PatchRow(int32 producerID); 19 | ~PatchRow(); 20 | 21 | int32 ID() const; 22 | 23 | void AttachedToWindow(); 24 | void MessageReceived(BMessage* msg); 25 | void Pulse(); 26 | void Draw(BRect updateRect); 27 | 28 | void AddColumn(int32 consumerID); 29 | void RemoveColumn(int32 consumerID); 30 | void Connect(int32 consumerID); 31 | void Disconnect(int32 consumerID); 32 | 33 | private: 34 | int32 m_producerID; 35 | MidiEventMeter* m_eventMeter; 36 | }; 37 | 38 | #endif /* _PatchRow_h */ 39 | -------------------------------------------------------------------------------- /midi_kit/PatchBay/PatchWin.cpp: -------------------------------------------------------------------------------- 1 | // PatchWin.cpp 2 | // ------------ 3 | // Implements the main PatchBay window class. 4 | // 5 | // Copyright 1999, Be Incorporated. All Rights Reserved. 6 | // This file may be used under the terms of the Be Sample Code License. 7 | 8 | #include 9 | #include "PatchWin.h" 10 | #include "PatchView.h" 11 | 12 | PatchWin::PatchWin() 13 | : BWindow(BRect(50,50,450,450), "Patch Bay", B_TITLED_WINDOW, 0) 14 | { 15 | BRect r = Bounds(); 16 | m_patchView = new PatchView(r); 17 | AddChild(m_patchView); 18 | Show(); 19 | } 20 | 21 | bool PatchWin::QuitRequested() 22 | { 23 | be_app->PostMessage(B_QUIT_REQUESTED); 24 | return true; 25 | } 26 | 27 | -------------------------------------------------------------------------------- /midi_kit/PatchBay/PatchWin.h: -------------------------------------------------------------------------------- 1 | // PatchWin.h 2 | // ---------- 3 | // The main PatchBay window class. 4 | // 5 | // Copyright 1999, Be Incorporated. All Rights Reserved. 6 | // This file may be used under the terms of the Be Sample Code License. 7 | 8 | #ifndef _PatchWin_h 9 | #define _PatchWin_h 10 | 11 | #include 12 | 13 | class PatchView; 14 | 15 | class PatchWin : public BWindow 16 | { 17 | public: 18 | PatchWin(); 19 | bool QuitRequested(); 20 | private: 21 | PatchView* m_patchView; 22 | }; 23 | 24 | #endif /* _PatchWin_h */ 25 | -------------------------------------------------------------------------------- /midi_kit/Transposer/ChannelMaskWin.h: -------------------------------------------------------------------------------- 1 | // ChannelMaskWin.h 2 | // ---------------- 3 | // A panel that allows the user to turn transposition on/off on a 4 | // channel-by-channel basis. Instead of quitting when you click on 5 | // the close box (i.e. when QuitRequested is called), it simply 6 | // hides itself. 7 | // 8 | // Copyright 1999, Be Incorporated. All Rights Reserved. 9 | // This file may be used under the terms of the Be Sample Code License. 10 | 11 | #ifndef _ChannelMaskWin_h 12 | #define _ChannelMaskWin_h 13 | 14 | #include 15 | #include 16 | 17 | class ChannelMaskWin : public BWindow 18 | { 19 | public: 20 | ChannelMaskWin(uint16 startMask); 21 | void MessageReceived(BMessage* msg); 22 | bool QuitRequested(); 23 | 24 | private: 25 | uint16 CurrentMask() const; 26 | BList m_boxes; 27 | }; 28 | 29 | #endif /* _ChannelMaskWin_h */ 30 | -------------------------------------------------------------------------------- /midi_kit/Transposer/MidiUtil.h: -------------------------------------------------------------------------------- 1 | // MidiUtil.h 2 | // ---------- 3 | // Assorted MIDI utility functions. 4 | // 5 | // Copyright 1999, Be Incorporated. All Rights Reserved. 6 | // This file may be used under the terms of the Be Sample Code License. 7 | 8 | #ifndef _MidiUtil_h 9 | #define _MidiUtil_h 10 | 11 | namespace MidiUtil { 12 | // Find MIDI objects by name. (Note: this is not carte blanche 13 | // for hardcoding MIDI object names in your app. :-) 14 | BMidiEndpoint* FindEndpoint(const char* name); 15 | BMidiProducer* FindProducer(const char* name); 16 | BMidiConsumer* FindConsumer(const char* name); 17 | } 18 | 19 | #endif /* _MidiUtil_h */ 20 | -------------------------------------------------------------------------------- /midi_kit/Transposer/Transposer.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/midi_kit/Transposer/Transposer.rsrc -------------------------------------------------------------------------------- /midi_kit/Transposer/TransposerView.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "TransposerApp.h" 3 | #include "TransposerView.h" 4 | 5 | TransposerView::TransposerView(BRect rect, const char* name, uint32 resizingMode, uint32 flags) 6 | : BView(rect, name, resizingMode, flags) 7 | { 8 | SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); 9 | 10 | m_slider = new BSlider(BRect(10, 10, 190, 30), "Transpose", 11 | "Transpose", new BMessage(MSG_CHANGE_TRANSPOSE), -36, 36); 12 | AddChild(m_slider); 13 | } 14 | 15 | void TransposerView::AttachedToWindow() 16 | { 17 | m_slider->SetTarget(be_app); 18 | m_slider->SetLimitLabels("-36", "+36"); 19 | m_slider->SetHashMarks(B_HASH_MARKS_BOTH); 20 | m_slider->SetHashMarkCount(7); 21 | m_slider->MakeFocus(); 22 | } 23 | -------------------------------------------------------------------------------- /midi_kit/Transposer/TransposerView.h: -------------------------------------------------------------------------------- 1 | #ifndef _TransposerView_h 2 | #define _TransposerView_h 3 | 4 | #include 5 | 6 | class BSlider; 7 | 8 | class TransposerView : public BView { 9 | public: 10 | TransposerView(BRect rect, const char* name, uint32 resizingMode, uint32 flags); 11 | 12 | void AttachedToWindow(); 13 | 14 | private: 15 | BSlider* m_slider; 16 | }; 17 | 18 | 19 | #endif /* _TransposerView_h */ 20 | -------------------------------------------------------------------------------- /midi_kit/Transposer/TransposerWin.h: -------------------------------------------------------------------------------- 1 | // TransposerWin.h 2 | // --------------- 3 | // The main window associated with the Transposer object. 4 | // 5 | // Copyright 1999, Be Incorporated. All Rights Reserved. 6 | // This file may be used under the terms of the Be Sample Code License. 7 | 8 | #ifndef _TransposerWin_h 9 | #define _TransposerWin_h 10 | 11 | #include 12 | 13 | class TransposerWin : public BWindow { 14 | public: 15 | TransposerWin(const char* name, int8 transpose); 16 | void Quit(); 17 | }; 18 | 19 | #endif /* _TransposerWin_h */ 20 | -------------------------------------------------------------------------------- /midi_kit/Transposer/Transposer_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/midi_kit/Transposer/Transposer_ppc.proj -------------------------------------------------------------------------------- /midi_kit/Transposer/Transposer_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/midi_kit/Transposer/Transposer_x86.proj -------------------------------------------------------------------------------- /midi_kit/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all MIDI Kit sample code 2 | 3 | LEAFDIRS = \ 4 | PatchBay \ 5 | Transposer 6 | 7 | default .DEFAULT: 8 | -@for f in $(LEAFDIRS); do \ 9 | $(MAKE) -C $$f $@; \ 10 | done 11 | -------------------------------------------------------------------------------- /modules/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all driver sample code 2 | 3 | LEAFDIRS = \ 4 | xyz5038 5 | 6 | default .DEFAULT: 7 | -@for f in $(LEAFDIRS); do \ 8 | $(MAKE) -C $$f $@; \ 9 | done 10 | -------------------------------------------------------------------------------- /modules/xyz5038/xyz5038.h: -------------------------------------------------------------------------------- 1 | /* xyz5038.h 2 | * 3 | * A module for the XYZ Systems Model 5038 Squarepusher chip. 4 | * 5 | * Copyright 1999, Be Incorporated. All Rights Reserved. 6 | * This file may be used under the terms of the Be Sample Code License. 7 | */ 8 | 9 | #ifndef XYZ5038_H 10 | #define XYZ5038_H 11 | 12 | #include 13 | 14 | #define XYZ5038_MODULE_NAME "generic/xyz5038/v1" 15 | 16 | typedef struct { 17 | module_info module; 18 | 19 | int32 (*read_foo)(); 20 | int32 (*read_bar)(); 21 | int32 (*write_foo)(int32 new_value); 22 | int32 (*write_bar)(int32 new_value); 23 | } xyz5038_module_info; 24 | 25 | #endif // XYZ5038_H 26 | 27 | -------------------------------------------------------------------------------- /modules/xyz5038/xyz5038_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/modules/xyz5038/xyz5038_ppc.proj -------------------------------------------------------------------------------- /modules/xyz5038/xyz5038_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/modules/xyz5038/xyz5038_x86.proj -------------------------------------------------------------------------------- /network_kit/FtpClient/FtpClient_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/network_kit/FtpClient/FtpClient_ppc.proj -------------------------------------------------------------------------------- /network_kit/FtpClient/FtpClient_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/network_kit/FtpClient/FtpClient_x86.proj -------------------------------------------------------------------------------- /network_kit/IMAP/MailCrimez_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/network_kit/IMAP/MailCrimez_ppc.proj -------------------------------------------------------------------------------- /network_kit/IMAP/MailCrimez_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/network_kit/IMAP/MailCrimez_x86.proj -------------------------------------------------------------------------------- /network_kit/NetDisc/NetDisc.proj.ppc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/network_kit/NetDisc/NetDisc.proj.ppc -------------------------------------------------------------------------------- /network_kit/NetDisc/NetDisc.proj.x86: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/network_kit/NetDisc/NetDisc.proj.x86 -------------------------------------------------------------------------------- /network_kit/Tank/Tank.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/network_kit/Tank/Tank.rsrc -------------------------------------------------------------------------------- /network_kit/Tank/Tank_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/network_kit/Tank/Tank_ppc.proj -------------------------------------------------------------------------------- /network_kit/Tank/Tank_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/network_kit/Tank/Tank_x86.proj -------------------------------------------------------------------------------- /network_kit/VoteOften/VoteOften.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/network_kit/VoteOften/VoteOften.rsrc -------------------------------------------------------------------------------- /network_kit/VoteOften/VoteOften_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/network_kit/VoteOften/VoteOften_ppc.proj -------------------------------------------------------------------------------- /network_kit/VoteOften/VoteOften_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/network_kit/VoteOften/VoteOften_x86.proj -------------------------------------------------------------------------------- /network_kit/VoteOften/VoterStats.h: -------------------------------------------------------------------------------- 1 | /* VoterStats.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 | #ifndef VOTER_STATS_H 8 | #define VOTER_STATS_H 9 | 10 | #include 11 | 12 | class VoterStats : public BWindow { 13 | public: 14 | VoterStats(const char *request); 15 | virtual ~VoterStats(); 16 | 17 | 18 | void MessageReceived(BMessage *msg); 19 | bool QuitRequested(); 20 | 21 | private: 22 | int32 fState; 23 | }; 24 | 25 | #define CHANGE_ACTIVITY 'actv' 26 | #define UPDATE_VOTECOUNT 'vcnt' 27 | #define STUFF_THE_BALLOT 'stuf' 28 | #define CEASE_AND_DESIST 'cese' 29 | 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /network_kit/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all Network Kit sample code 2 | 3 | LEAFDIRS = \ 4 | FtpClient \ 5 | NetDisc \ 6 | Tank \ 7 | VoteOften 8 | 9 | default .DEFAULT: 10 | -@for f in $(LEAFDIRS); do \ 11 | $(MAKE) -C $$f $@; \ 12 | done 13 | -------------------------------------------------------------------------------- /open_gl/3Dlife-Voodoo/3Dlife_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/open_gl/3Dlife-Voodoo/3Dlife_ppc.proj -------------------------------------------------------------------------------- /open_gl/3Dlife-Voodoo/3Dlife_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/open_gl/3Dlife-Voodoo/3Dlife_x86.proj -------------------------------------------------------------------------------- /open_gl/3Dlife-Voodoo/common.h: -------------------------------------------------------------------------------- 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 | #ifndef _common_h 7 | #define _common_h_ 8 | 9 | const uint32 SINGLE_STEP = 'STEP'; 10 | const uint32 CONTINUOUS = 'CRUN'; 11 | const uint32 FULL_SCREEN = 'FULL'; //voodoo 12 | 13 | const uint32 LIFE_4555 = '4555'; 14 | const uint32 LIFE_5766 = '5766'; 15 | 16 | const uint32 X_SPIN_STOP = 'XSTP'; 17 | const uint32 X_SPIN_POS = 'XPOS'; 18 | const uint32 X_SPIN_NEG = 'XNEG'; 19 | const uint32 Y_SPIN_STOP = 'YSTP'; 20 | const uint32 Y_SPIN_POS = 'YPOS'; 21 | const uint32 Y_SPIN_NEG = 'YNEG'; 22 | const uint32 Z_SPIN_STOP = 'ZSTP'; 23 | const uint32 Z_SPIN_POS = 'ZPOS'; 24 | const uint32 Z_SPIN_NEG = 'ZNEG'; 25 | 26 | 27 | #endif -------------------------------------------------------------------------------- /open_gl/3Dlife-Voodoo/lifeApp.h: -------------------------------------------------------------------------------- 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 "lifeWin.h" 8 | 9 | class lifeApp : public BApplication 10 | { 11 | public: 12 | lifeApp(); 13 | void AboutRequested(); 14 | void MessageReceived(BMessage *msg); //voodoo 15 | private: 16 | lifeWin *mw; 17 | }; 18 | 19 | -------------------------------------------------------------------------------- /open_gl/3Dlife-Voodoo/lifeWin.h: -------------------------------------------------------------------------------- 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 "lifeView.h" 8 | 9 | //vd class lifeWin : public BWindow 10 | class lifeWin : public BDirectWindow 11 | { 12 | public: 13 | lifeWin(); 14 | ~lifeWin(); 15 | bool QuitRequested(); 16 | virtual void DirectConnected(direct_buffer_info *info); //voodoo 17 | private: 18 | lifeView *mv; 19 | }; 20 | -------------------------------------------------------------------------------- /open_gl/3Dlife/3Dlife_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/open_gl/3Dlife/3Dlife_ppc.proj -------------------------------------------------------------------------------- /open_gl/3Dlife/3Dlife_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/open_gl/3Dlife/3Dlife_x86.proj -------------------------------------------------------------------------------- /open_gl/3Dlife/common.h: -------------------------------------------------------------------------------- 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 | #ifndef _common_h 7 | #define _common_h_ 8 | 9 | const uint32 SINGLE_STEP = 'STEP'; 10 | const uint32 CONTINUOUS = 'CRUN'; 11 | 12 | const uint32 LIFE_4555 = '4555'; 13 | const uint32 LIFE_5766 = '5766'; 14 | 15 | const uint32 X_SPIN_STOP = 'XSTP'; 16 | const uint32 X_SPIN_POS = 'XPOS'; 17 | const uint32 X_SPIN_NEG = 'XNEG'; 18 | const uint32 Y_SPIN_STOP = 'YSTP'; 19 | const uint32 Y_SPIN_POS = 'YPOS'; 20 | const uint32 Y_SPIN_NEG = 'YNEG'; 21 | const uint32 Z_SPIN_STOP = 'ZSTP'; 22 | const uint32 Z_SPIN_POS = 'ZPOS'; 23 | const uint32 Z_SPIN_NEG = 'ZNEG'; 24 | 25 | 26 | #endif -------------------------------------------------------------------------------- /open_gl/3Dlife/lifeApp.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 "lifeApp.h" 7 | #include 8 | 9 | lifeApp::lifeApp() 10 | : BApplication("application/x-vnd.Be-3dlife") 11 | { 12 | mw = new lifeWin; 13 | mw->Show(); 14 | } 15 | 16 | void 17 | lifeApp::AboutRequested() 18 | { 19 | (new BAlert("","3D Life -- A Small OpenGL Example", "sweet"))->Go(); 20 | } 21 | 22 | 23 | int main() 24 | { 25 | lifeApp app; 26 | app.Run(); 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /open_gl/3Dlife/lifeApp.h: -------------------------------------------------------------------------------- 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 "lifeWin.h" 8 | 9 | class lifeApp : public BApplication 10 | { 11 | public: 12 | lifeApp(); 13 | void AboutRequested(); 14 | private: 15 | lifeWin *mw; 16 | }; 17 | 18 | -------------------------------------------------------------------------------- /open_gl/3Dlife/lifeWin.h: -------------------------------------------------------------------------------- 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 "lifeView.h" 8 | 9 | class lifeWin : public BWindow 10 | { 11 | public: 12 | lifeWin(); 13 | ~lifeWin(); 14 | bool QuitRequested(); 15 | private: 16 | lifeView *mv; 17 | }; 18 | -------------------------------------------------------------------------------- /open_gl/GLTeapot-Voodoo/FPS.h: -------------------------------------------------------------------------------- 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 | 8 | class FPS 9 | { 10 | public: 11 | FPS(); 12 | ~FPS(); 13 | 14 | static void drawCounter( GLfloat frameRate ); 15 | 16 | private: 17 | static void drawChar( GLfloat x, GLfloat y, GLint number ); 18 | 19 | }; -------------------------------------------------------------------------------- /open_gl/GLTeapot-Voodoo/GLTeapot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/open_gl/GLTeapot-Voodoo/GLTeapot -------------------------------------------------------------------------------- /open_gl/GLTeapot-Voodoo/GLTeapot.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/open_gl/GLTeapot-Voodoo/GLTeapot.rsrc -------------------------------------------------------------------------------- /open_gl/GLTeapot-Voodoo/GLTeapot_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/open_gl/GLTeapot-Voodoo/GLTeapot_ppc.proj -------------------------------------------------------------------------------- /open_gl/GLTeapot-Voodoo/GLTeapot_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/open_gl/GLTeapot-Voodoo/GLTeapot_x86.proj -------------------------------------------------------------------------------- /open_gl/GLTeapot-Voodoo/README.GLTeapot: -------------------------------------------------------------------------------- 1 | GLTeapot Project README 2 | ======================= 3 | 4 | This is a sample application using Be's OpenGL implementation. It uses a 5 | generic object viewer class, ObjectView, to view OpenGL objects created 6 | using a generic OpenGL object class, GLObject. 7 | 8 | Files 9 | ===== 10 | 11 | The archive should contain the following files: 12 | 13 | README.GLTeapot -- This file 14 | GLTeapot.proj -- Metrowerks project file 15 | teapot.data -- Teapot vertex data file 16 | Teapot.rsrc -- Application resource file 17 | 18 | GLObject.cpp -- Source files 19 | GLObject.h 20 | ObjectView.cpp 21 | ObjectView.h 22 | ResScroll.h 23 | error.cpp 24 | error..h 25 | glob.h 26 | teapot_main.cpp 27 | util.h 28 | 29 | -------------------------------------------------------------------------------- /open_gl/GLTeapot-Voodoo/ResScroll.h: -------------------------------------------------------------------------------- 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 | #ifndef ResScroll_h 7 | #define ResScroll_h 8 | 9 | #include 10 | 11 | class ObjectView; 12 | 13 | class ResScroll : public BScrollBar { 14 | public: 15 | ObjectView * objectView; 16 | 17 | ResScroll(BRect r, const char *name, 18 | ObjectView *target, orientation posture); 19 | virtual void ValueChanged(float value); 20 | 21 | }; 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /open_gl/GLTeapot-Voodoo/error.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 "error.h" 7 | 8 | void fatalerror(char *s) 9 | { 10 | printf("FATAL ERROR: %s\n",s); 11 | }; 12 | -------------------------------------------------------------------------------- /open_gl/GLTeapot-Voodoo/error.h: -------------------------------------------------------------------------------- 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 | #ifndef error_h 7 | #define error_h 8 | 9 | #include 10 | 11 | extern void fatalerror(char *); 12 | 13 | #define DEBUGGING 1 14 | 15 | #ifdef DEBUGGING 16 | 17 | #define assert(a) if (!(a)) { \ 18 | printf("%s:%d: Failed assertion `"#a"'\n",__FILE__,__LINE__); \ 19 | fatalerror("Failed assertion!"); }; 20 | 21 | #define checkpoint printf("%s:%d: Checkpoint...\n",__FILE__,__LINE__);\ 22 | fflush(stdout); 23 | 24 | #else //DEBUGGING 25 | 26 | #define assert(a) 27 | #define checkpoint 28 | 29 | #endif //DEBUGGING 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /open_gl/GLTeapot-Voodoo/glob.h: -------------------------------------------------------------------------------- 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 | extern float white[3]; 7 | extern float dimWhite[3]; 8 | extern float black[3]; 9 | extern float foggy[3]; 10 | extern float blue[3]; 11 | extern float dimBlue[3]; 12 | extern float yellow[3]; 13 | extern float dimYellow[3]; 14 | extern float green[3]; 15 | extern float dimGreen[3]; 16 | extern float red[3]; 17 | -------------------------------------------------------------------------------- /open_gl/GLTeapot-Voodoo/teapot.h: -------------------------------------------------------------------------------- 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 "GL/gl.h" 7 | 8 | void auxSolidTeapot(GLdouble scale); 9 | void auxWireTeapot(GLdouble scale); 10 | -------------------------------------------------------------------------------- /open_gl/GLTeapot/FPS.h: -------------------------------------------------------------------------------- 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 | 8 | class FPS 9 | { 10 | public: 11 | FPS(); 12 | ~FPS(); 13 | 14 | static void drawCounter( GLfloat frameRate ); 15 | 16 | private: 17 | static void drawChar( GLfloat x, GLfloat y, GLint number ); 18 | 19 | }; -------------------------------------------------------------------------------- /open_gl/GLTeapot/GLTeapot.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/open_gl/GLTeapot/GLTeapot.rsrc -------------------------------------------------------------------------------- /open_gl/GLTeapot/GLTeapot_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/open_gl/GLTeapot/GLTeapot_ppc.proj -------------------------------------------------------------------------------- /open_gl/GLTeapot/GLTeapot_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/open_gl/GLTeapot/GLTeapot_x86.proj -------------------------------------------------------------------------------- /open_gl/GLTeapot/README.GLTeapot: -------------------------------------------------------------------------------- 1 | GLTeapot Project README 2 | ======================= 3 | 4 | This is a sample application using Be's OpenGL implementation. It uses a 5 | generic object viewer class, ObjectView, to view OpenGL objects created 6 | using a generic OpenGL object class, GLObject. 7 | 8 | Files 9 | ===== 10 | 11 | The archive should contain the following files: 12 | 13 | README.GLTeapot -- This file 14 | GLTeapot.proj -- Metrowerks project file 15 | teapot.data -- Teapot vertex data file 16 | Teapot.rsrc -- Application resource file 17 | 18 | GLObject.cpp -- Source files 19 | GLObject.h 20 | ObjectView.cpp 21 | ObjectView.h 22 | ResScroll.h 23 | error.cpp 24 | error..h 25 | glob.h 26 | teapot_main.cpp 27 | util.h 28 | 29 | -------------------------------------------------------------------------------- /open_gl/GLTeapot/ResScroll.h: -------------------------------------------------------------------------------- 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 | #ifndef ResScroll_h 7 | #define ResScroll_h 8 | 9 | #include 10 | 11 | class ObjectView; 12 | 13 | class ResScroll : public BScrollBar { 14 | public: 15 | ObjectView * objectView; 16 | 17 | ResScroll(BRect r, const char *name, 18 | ObjectView *target, orientation posture); 19 | virtual void ValueChanged(float value); 20 | 21 | }; 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /open_gl/GLTeapot/error.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 "error.h" 7 | 8 | void fatalerror(char *s) 9 | { 10 | printf("FATAL ERROR: %s\n",s); 11 | }; 12 | -------------------------------------------------------------------------------- /open_gl/GLTeapot/error.h: -------------------------------------------------------------------------------- 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 | #ifndef error_h 7 | #define error_h 8 | 9 | #include 10 | 11 | extern void fatalerror(char *); 12 | 13 | #define DEBUGGING 1 14 | 15 | #ifdef DEBUGGING 16 | 17 | #define assert(a) if (!(a)) { \ 18 | printf("%s:%d: Failed assertion `"#a"'\n",__FILE__,__LINE__); \ 19 | fatalerror("Failed assertion!"); }; 20 | 21 | #define checkpoint printf("%s:%d: Checkpoint...\n",__FILE__,__LINE__);\ 22 | fflush(stdout); 23 | 24 | #else //DEBUGGING 25 | 26 | #define assert(a) 27 | #define checkpoint 28 | 29 | #endif //DEBUGGING 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /open_gl/GLTeapot/glob.h: -------------------------------------------------------------------------------- 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 | extern float white[3]; 7 | extern float dimWhite[3]; 8 | extern float black[3]; 9 | extern float foggy[3]; 10 | extern float blue[3]; 11 | extern float dimBlue[3]; 12 | extern float yellow[3]; 13 | extern float dimYellow[3]; 14 | extern float green[3]; 15 | extern float dimGreen[3]; 16 | extern float red[3]; 17 | -------------------------------------------------------------------------------- /open_gl/GLTeapot/teapot.h: -------------------------------------------------------------------------------- 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 "GL/gl.h" 7 | 8 | void auxSolidTeapot(GLdouble scale); 9 | void auxWireTeapot(GLdouble scale); 10 | -------------------------------------------------------------------------------- /open_gl/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all OpenGL sample code 2 | 3 | LEAFDIRS = \ 4 | 3Dlife \ 5 | 3Dlife-Voodoo \ 6 | GLTeapot \ 7 | GLTeapot-Voodoo 8 | 9 | default .DEFAULT: 10 | -@for f in $(LEAFDIRS); do \ 11 | $(MAKE) -C $$f $@; \ 12 | done 13 | -------------------------------------------------------------------------------- /portability/condvar/errors.h: -------------------------------------------------------------------------------- 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 | #ifndef __errors_h 7 | #define __errors_h 1 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #ifdef DEBUG 16 | # define DPRINTF(arg) printf arg 17 | #else 18 | # define DPRINTF(arg) 19 | #endif 20 | 21 | #define err_abort(code, text) do { \ 22 | fprintf(stderr, "%s at \"%s\":%d: %s\n", \ 23 | text, __FILE__, __LINE__, strerror(code)); \ 24 | abort(); \ 25 | } while (0) 26 | 27 | #define errno_abort(text) do { \ 28 | fprintf(stderr, "%s at \"%s\":%d: %s\n", \ 29 | text, __FILE__, __LINE__, strerror(errno)); \ 30 | abort(); \ 31 | } while (0) 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /portability/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all portability sample code 2 | 3 | LEAFDIRS = \ 4 | condvar 5 | 6 | default .DEFAULT: 7 | -@for f in $(LEAFDIRS); do \ 8 | $(MAKE) -C $$f $@; \ 9 | done 10 | -------------------------------------------------------------------------------- /screen_savers/Ball/Ball.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | class BallView; 4 | 5 | // Main module class 6 | class Ball : public BScreenSaver 7 | { 8 | BallView *ball; 9 | 10 | public: 11 | Ball(BMessage *message, image_id image); 12 | 13 | void StartConfig(BView *view); 14 | 15 | status_t StartSaver(BView *v, bool preview); 16 | void StopSaver(); 17 | void DirectConnected(direct_buffer_info *info); 18 | void DirectDraw(int32 frame); 19 | }; 20 | -------------------------------------------------------------------------------- /screen_savers/Ball/Ball_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/screen_savers/Ball/Ball_ppc.proj -------------------------------------------------------------------------------- /screen_savers/Ball/Ball_x86.pld: -------------------------------------------------------------------------------- 1 | NAME=Ball_x86 2 | TARGETNAME=Ball 3 | PLATFORM=R5 4 | SCM=hg 5 | SYSTEMINCLUDE=/boot/develop/headers/be 6 | SYSTEMINCLUDE=/boot/develop/headers/cpp 7 | SYSTEMINCLUDE=/boot/develop/headers/posix 8 | SYSTEMINCLUDE=/boot/develop/lib 9 | SYSTEMINCLUDE=/boot/beos/system/lib 10 | RUNARGS= 11 | CCDEBUG=no 12 | CCPROFILE=no 13 | CCOPSIZE=no 14 | CCOPLEVEL=3 15 | CCTARGETTYPE=0 16 | CCEXTRA=-Woverloaded-virtual -funsigned-bitfields -Wwrite-strings 17 | LDEXTRA= 18 | -------------------------------------------------------------------------------- /screen_savers/Ball/Ball_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/screen_savers/Ball/Ball_x86.proj -------------------------------------------------------------------------------- /screen_savers/Spots/Spots.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | class Spots : public BScreenSaver 4 | { 5 | public: 6 | Spots(BMessage *message, image_id id); 7 | void StartConfig(BView *view); 8 | status_t StartSaver(BView *v, bool preview); 9 | void Draw(BView *v, int32 frame); 10 | }; 11 | -------------------------------------------------------------------------------- /screen_savers/Spots/Spots_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/screen_savers/Spots/Spots_ppc.proj -------------------------------------------------------------------------------- /screen_savers/Spots/Spots_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/screen_savers/Spots/Spots_x86.proj -------------------------------------------------------------------------------- /screen_savers/WhackLoader/WhackLoader_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/screen_savers/WhackLoader/WhackLoader_ppc.proj -------------------------------------------------------------------------------- /screen_savers/WhackLoader/WhackLoader_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/screen_savers/WhackLoader/WhackLoader_x86.proj -------------------------------------------------------------------------------- /screen_savers/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all screen saver sample code 2 | 3 | LEAFDIRS = \ 4 | Ball \ 5 | Spots \ 6 | WhackLoader 7 | 8 | default .DEFAULT: 9 | -@for f in $(LEAFDIRS); do \ 10 | $(MAKE) -C $$f $@; \ 11 | done 12 | -------------------------------------------------------------------------------- /storage_kit/DriveDaemon/DriveDaemon_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/storage_kit/DriveDaemon/DriveDaemon_x86.proj -------------------------------------------------------------------------------- /storage_kit/FolderWatcher/FolderWatcher_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/storage_kit/FolderWatcher/FolderWatcher_ppc.proj -------------------------------------------------------------------------------- /storage_kit/FolderWatcher/FolderWatcher_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/storage_kit/FolderWatcher/FolderWatcher_x86.proj -------------------------------------------------------------------------------- /storage_kit/Indexer/Indexer.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/storage_kit/Indexer/Indexer.rsrc -------------------------------------------------------------------------------- /storage_kit/Indexer/Indexer_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/storage_kit/Indexer/Indexer_ppc.proj -------------------------------------------------------------------------------- /storage_kit/Indexer/Indexer_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/storage_kit/Indexer/Indexer_x86.proj -------------------------------------------------------------------------------- /storage_kit/Indexer/lInfoView.h: -------------------------------------------------------------------------------- 1 | /* lInfoView */ 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 | #ifndef L_INFO_VIEW_H 8 | #define L_INFO_VIEW_H 9 | 10 | #include "Defs.h" 11 | #include 12 | #include 13 | 14 | struct stat; 15 | 16 | class lInfoView : public BView { 17 | public: 18 | lInfoView(entry_ref &ref, struct stat &st); 19 | ~lInfoView(); 20 | 21 | status_t InitCheck(); 22 | 23 | void MessageReceived(BMessage *msg); 24 | void Draw(BRect updateRect); 25 | 26 | char * GetName(); 27 | 28 | private: 29 | status_t fStatus; 30 | entry_ref fRef; 31 | char * fNameStr; 32 | char * fPathStr; 33 | char * fCreateStr; 34 | char * fModStr; 35 | char * fLinkStr; 36 | bool fAbsolute; 37 | 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /storage_kit/LiveQueryApp/LiveQueryApp_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/storage_kit/LiveQueryApp/LiveQueryApp_ppc.proj -------------------------------------------------------------------------------- /storage_kit/LiveQueryApp/LiveQueryApp_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/storage_kit/LiveQueryApp/LiveQueryApp_x86.proj -------------------------------------------------------------------------------- /storage_kit/People/People.rsrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/storage_kit/People/People.rsrc -------------------------------------------------------------------------------- /storage_kit/People/People_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/storage_kit/People/People_ppc.proj -------------------------------------------------------------------------------- /storage_kit/People/People_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/storage_kit/People/People_x86.proj -------------------------------------------------------------------------------- /storage_kit/People/README: -------------------------------------------------------------------------------- 1 | People -- README 2 | 3 | This directory contains the source code for building 4 | the standard People application that ships with BeOS. 5 | You can use this application to create Person records, 6 | which can be dropped into BeMail headers (see the 7 | BeOS User's Guide Chap. 4: Sending Mail) and other 8 | applications. 9 | 10 | Ostensibly, this application reveals how the Person 11 | record is stored, but it also demonstrates how to 12 | use the BeOS file type database in an application. 13 | 14 | Owen Smith 15 | July 1998 -------------------------------------------------------------------------------- /storage_kit/People/TTextControl.h: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------- 2 | // 3 | // TextControl.h 4 | // 5 | // Written by: Robert Polic 6 | // 7 | //-------------------------------------------------------------------- 8 | /* 9 | Copyright 1999, Be Incorporated. All Rights Reserved. 10 | This file may be used under the terms of the Be Sample Code License. 11 | */ 12 | 13 | #ifndef TEXTCONTROL_H 14 | #define TEXTCONTROL_H 15 | 16 | #include 17 | 18 | class TTextControl : public BTextControl { 19 | 20 | private: 21 | 22 | char *fLabel; 23 | char *fOriginal; 24 | int32 fLength; 25 | 26 | public: 27 | 28 | TTextControl(BRect, char*, int32, char*, int32, int32); 29 | ~TTextControl(void); 30 | virtual void AttachedToWindow(void); 31 | bool Changed(void); 32 | void Revert(void); 33 | void Update(void); 34 | }; 35 | 36 | #endif /* TEXTCONTROL_H */ -------------------------------------------------------------------------------- /storage_kit/People/main.cpp: -------------------------------------------------------------------------------- 1 | //-------------------------------------------------------------------- 2 | // 3 | // main.cpp 4 | // 5 | // Written by: Robert Polic 6 | // 7 | //-------------------------------------------------------------------- 8 | /* 9 | Copyright 1999, Be Incorporated. All Rights Reserved. 10 | This file may be used under the terms of the Be Sample Code License. 11 | */ 12 | 13 | #include "PeopleApp.h" 14 | 15 | int main(void) 16 | { 17 | TPeopleApp *app; 18 | 19 | app = new TPeopleApp(); 20 | app->Run(); 21 | 22 | delete app; 23 | return B_NO_ERROR; 24 | } 25 | 26 | 27 | -------------------------------------------------------------------------------- /storage_kit/QueryApp/QueryApp_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/storage_kit/QueryApp/QueryApp_ppc.proj -------------------------------------------------------------------------------- /storage_kit/QueryApp/QueryApp_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/storage_kit/QueryApp/QueryApp_x86.proj -------------------------------------------------------------------------------- /storage_kit/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all Storage Kit sample code 2 | 3 | LEAFDIRS = \ 4 | DriveDaemon \ 5 | FolderWatcher \ 6 | Indexer \ 7 | LiveQueryApp \ 8 | People \ 9 | QueryApp 10 | 11 | default .DEFAULT: 12 | -@for f in $(LEAFDIRS); do \ 13 | $(MAKE) -C $$f $@; \ 14 | done 15 | -------------------------------------------------------------------------------- /support_kit/MultiLock/TestMultiLock_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/support_kit/MultiLock/TestMultiLock_ppc.proj -------------------------------------------------------------------------------- /support_kit/MultiLock/TestMultiLock_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/support_kit/MultiLock/TestMultiLock_x86.proj -------------------------------------------------------------------------------- /support_kit/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all Support Kit sample code 2 | 3 | LEAFDIRS = \ 4 | MultiLock 5 | 6 | default .DEFAULT: 7 | -@for f in $(LEAFDIRS); do \ 8 | $(MAKE) -C $$f $@; \ 9 | done 10 | -------------------------------------------------------------------------------- /translation_kit/TranslatorPanel/Common.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_H 2 | #define COMMON_H 3 | 4 | #define OPEN_IMAGE 'opim' 5 | #define SAVE_IMAGE 'saim' 6 | #define OPEN_FILE_PANEL 'ofpl' 7 | #define RUN_FILTER 'runf' 8 | #define DRAG_TO_TRACKER 'drat' 9 | 10 | #define SAVE_FILE_PANEL 'sfpl' 11 | #define SAVE_FILE_PANEL_FORMAT 'sfpf' 12 | #define SAVE_FILE_PANEL_SETTINGS 'sfps' 13 | 14 | #endif -------------------------------------------------------------------------------- /translation_kit/TranslatorPanel/TestApp.cpp: -------------------------------------------------------------------------------- 1 | #include "TestApp.h" 2 | #include "TestWindow.h" 3 | #include "Common.h" 4 | 5 | int main() { 6 | TestApp *myapp = new TestApp(); 7 | myapp->Run(); 8 | delete myapp; 9 | return 0; 10 | } 11 | 12 | TestApp::TestApp() : BApplication("application/x-vnd.BeDTS-TranslatorPanel") { 13 | BRect rect(100, 100, 500, 400); 14 | TestWindow *testwindow = new TestWindow(rect, "Translator Panel"); 15 | testwindow->Show(); 16 | } 17 | 18 | void TestApp::RefsReceived(BMessage *message) { 19 | message->what = OPEN_FILE_PANEL; 20 | BWindow *window = WindowAt(0); 21 | if (window != NULL) window->PostMessage(message); 22 | } -------------------------------------------------------------------------------- /translation_kit/TranslatorPanel/TestApp.h: -------------------------------------------------------------------------------- 1 | #ifndef TESTAPP_H 2 | #define TESTAPP_H 3 | 4 | #include 5 | 6 | class TestApp : public BApplication { 7 | public: 8 | TestApp(); 9 | void RefsReceived(BMessage *message); 10 | }; 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /translation_kit/TranslatorPanel/TestWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef TESTWINDOW_H 2 | #define TESTWINDOW_H 3 | 4 | #include 5 | #include "TestView.h" 6 | #include "TranslatorSavePanel.h" 7 | 8 | class TestWindow : public BWindow { 9 | public: 10 | TestWindow(BRect rect, const char *name); 11 | ~TestWindow(); 12 | void MessageReceived(BMessage *message); 13 | bool QuitRequested(); 14 | 15 | private: 16 | TranslatorSavePanel *savepanel; 17 | BFilePanel *openpanel; 18 | TestView *testview; 19 | }; 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /translation_kit/TranslatorPanel/TranslatorPanel_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/translation_kit/TranslatorPanel/TranslatorPanel_ppc.proj -------------------------------------------------------------------------------- /translation_kit/TranslatorPanel/TranslatorPanel_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/translation_kit/TranslatorPanel/TranslatorPanel_x86.proj -------------------------------------------------------------------------------- /translation_kit/TranslatorPanel/addons/BlurFilter.h: -------------------------------------------------------------------------------- 1 | #ifndef BLURFILTER_H 2 | #define BLURFILTER_H 3 | 4 | #include "ImageFilter.h" 5 | 6 | class FILTER_SYMBOLS BlurFilter : public ImageFilter { 7 | public: 8 | BlurFilter(); 9 | BBitmap *Run(BBitmap *input); 10 | ~BlurFilter(); 11 | }; 12 | 13 | extern "C" FILTER_SYMBOLS BlurFilter *instantiate_filter(); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /translation_kit/TranslatorPanel/addons/EdgesFilter.h: -------------------------------------------------------------------------------- 1 | #ifndef EDGESFILTER_H 2 | #define EDGESFILTER_H 3 | 4 | #include "ImageFilter.h" 5 | 6 | class FILTER_SYMBOLS EdgesFilter : public ImageFilter { 7 | public: 8 | EdgesFilter(); 9 | BBitmap *Run(BBitmap *input); 10 | ~EdgesFilter(); 11 | }; 12 | 13 | extern "C" FILTER_SYMBOLS EdgesFilter *instantiate_filter(); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /translation_kit/TranslatorPanel/addons/GreyscaleFilter.h: -------------------------------------------------------------------------------- 1 | #ifndef GREYSCALEFILTER_H 2 | #define GREYSCALEFILTER_H 3 | 4 | #include "ImageFilter.h" 5 | 6 | class FILTER_SYMBOLS GreyscaleFilter : public ImageFilter { 7 | public: 8 | GreyscaleFilter(); 9 | BBitmap *Run(BBitmap *input); 10 | ~GreyscaleFilter(); 11 | }; 12 | 13 | extern "C" FILTER_SYMBOLS GreyscaleFilter *instantiate_filter(); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /translation_kit/TranslatorPanel/addons/ImageFilter.h: -------------------------------------------------------------------------------- 1 | #ifndef IMAGEFILTER_H 2 | #define IMAGEFILTER_H 3 | 4 | #include 5 | 6 | #if BUILDING_ADDON 7 | #define FILTER_SYMBOLS _EXPORT 8 | #else 9 | #define FILTER_SYMBOLS _IMPORT 10 | #endif 11 | class FILTER_SYMBOLS ImageFilter; 12 | 13 | class ImageFilter { 14 | protected: 15 | uint32 id; 16 | char name[255]; 17 | 18 | public: 19 | ImageFilter() { 20 | id = 0; 21 | strcpy(name, ""); 22 | next = NULL; 23 | } 24 | virtual BBitmap *Run(BBitmap *input) = 0; 25 | const char *GetName() { return name; } 26 | const uint32 GetId() { return id; } 27 | virtual ~ImageFilter() { } 28 | 29 | ImageFilter *next; 30 | }; 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /translation_kit/TranslatorPanel/addons/buildaddons: -------------------------------------------------------------------------------- 1 | make -f makefile.Greyscale 2 | make -f makefile.Edges 3 | make -f makefile.Blur 4 | # One set of these will fail, but so what? 5 | mv obj.x86/GreyscaleFilter . 6 | mv obj.x86/EdgesFilter . 7 | mv obj.x86/BlurFilter . 8 | mv obj.ppc/GreyscaleFilter . 9 | mv obj.ppc/EdgesFilter . 10 | mv obj.ppc/BlurFilter . 11 | -------------------------------------------------------------------------------- /translation_kit/TranslatorTemplate/TranslatorTemplate.h: -------------------------------------------------------------------------------- 1 | #ifndef TRANSLATOR_TEMPLATE_H 2 | #define TRANSLATOR_TEMPLATE_H 3 | 4 | #include 5 | #include 6 | 7 | class TranslatorWindow : public BWindow { 8 | public: 9 | TranslatorWindow(BRect rect, const char *name); 10 | bool QuitRequested(); 11 | }; 12 | 13 | class TranslatorView : public BView { 14 | public: 15 | TranslatorView(BRect rect, const char *name); 16 | }; 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /translation_kit/TranslatorTemplate/TranslatorTemplate_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/translation_kit/TranslatorTemplate/TranslatorTemplate_ppc.proj -------------------------------------------------------------------------------- /translation_kit/TranslatorTemplate/TranslatorTemplate_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/translation_kit/TranslatorTemplate/TranslatorTemplate_x86.proj -------------------------------------------------------------------------------- /translation_kit/makefile.all: -------------------------------------------------------------------------------- 1 | # makefile for all Translation Kit sample code 2 | 3 | LEAFDIRS = \ 4 | ppm \ 5 | translate \ 6 | TranslatorPanel \ 7 | TranslatorTemplate 8 | 9 | default .DEFAULT: 10 | -@for f in $(LEAFDIRS); do \ 11 | $(MAKE) -C $$f $@; \ 12 | done 13 | -------------------------------------------------------------------------------- /translation_kit/ppm/PPMTranslator_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/translation_kit/ppm/PPMTranslator_ppc.proj -------------------------------------------------------------------------------- /translation_kit/ppm/PPMTranslator_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/translation_kit/ppm/PPMTranslator_x86.proj -------------------------------------------------------------------------------- /translation_kit/ppm/foo.ppm: -------------------------------------------------------------------------------- 1 | P3 4 4 10 2 | 0 0 0 2 2 2 4 4 4 6 6 6 3 | 0 0 2 2 2 4 4 4 6 6 6 8 4 | 0 2 4 2 4 6 4 6 8 6 8 10 5 | 2 4 6 4 6 8 6 8 10 8 10 10 6 | -------------------------------------------------------------------------------- /translation_kit/translate/foo.ppm: -------------------------------------------------------------------------------- 1 | P3 4 4 10 2 | 0 0 0 2 2 2 4 4 4 6 6 6 3 | 0 0 2 2 2 4 4 4 6 6 6 8 4 | 0 2 4 2 4 6 4 6 8 6 8 10 5 | 2 4 6 4 6 8 6 8 10 8 10 10 6 | -------------------------------------------------------------------------------- /translation_kit/translate/translate_ppc.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/translation_kit/translate/translate_ppc.proj -------------------------------------------------------------------------------- /translation_kit/translate/translate_x86.proj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HaikuArchives/BeSampleCode/e9763477fe47e41ac1c46c952f3977a7080e9be6/translation_kit/translate/translate_x86.proj --------------------------------------------------------------------------------