bsnes-libretro/hiro/components.hpp
Tim Allen 73b275a7d0 hiro: Remove gtksourceview dependency.
The GTK2 and GTK3 backends for hiro implement a source-code editing widget
based on gtksourceview. gtksourceview2 in particular is quite old and
unmaintained, and Linux distros are keen to drop it, so removing the dependency
helps keep bsnes portable to future platforms -- especially since bsnes doesn't
*use* the source-editing widget anywhere. It's only used by Near's text-editor,
amethyst.

We could just rip out the gtksourceview-related code and be done with it,
but since Near is still around and still working on his own copy of hiro, I
asked him to contribute his implementation so that it will be easier to merge
any future changes too.

This adds two new hiro targets, "gtk2-se" and "gtk3-se" which include the
source-code editing widget and the gtksourceview dependency. Since bsnes
defaults to "gtk2" (without the dependency) we no longer need that package
installed to build bsnes.

Fixes #137.
2021-03-04 20:29:51 +11:00

120 lines
2.8 KiB
C++

/* hiro components
*
* By commenting out lines below, individual components of hiro can be disabled.)
* This can be useful to avoid dependencies (eg GTK+ relies on GtkSourceView for SourceEdit.)
* It's also very useful for porting hiro to new targets; or performing major core changes.
*
* Note that the core classes (Application, Window, Sizable, etc) have circular dependencies.
* Disabling only certain core pieces will result in compilation errors.
* As such, this file is really only meant for disabling individual widgets or menu items.
*/
#define Hiro_Color
#define Hiro_Gradient
#define Hiro_Alignment
#define Hiro_TextCursor
#define Hiro_Position
#define Hiro_Size
#define Hiro_Geometry
#define Hiro_Font
#define Hiro_MouseCursor
#define Hiro_Application
#define Hiro_Desktop
#define Hiro_Monitor
#define Hiro_Keyboard
#define Hiro_Mouse
#define Hiro_BrowserWindow
#define Hiro_MessageWindow
#define Hiro_Attribute
#define Hiro_Object
#define Hiro_Group
#define Hiro_Hotkey
#define Hiro_Timer
#define Hiro_Window
#define Hiro_StatusBar
#define Hiro_MenuBar
#define Hiro_PopupMenu
#define Hiro_Action
#define Hiro_Menu
#define Hiro_MenuSeparator
#define Hiro_MenuItem
#define Hiro_MenuCheckItem
#define Hiro_MenuRadioItem
#define Hiro_Sizable
#define Hiro_Widget
#define Hiro_Button
#define Hiro_Canvas
#define Hiro_CheckButton
#define Hiro_CheckLabel
#define Hiro_ComboButton
#define Hiro_ComboEdit
#define Hiro_Console
#define Hiro_Frame
#define Hiro_HexEdit
#define Hiro_HorizontalScrollBar
#define Hiro_HorizontalSlider
#define Hiro_IconView
#define Hiro_Label
#define Hiro_LineEdit
#define Hiro_ProgressBar
#define Hiro_RadioButton
#define Hiro_RadioLabel
//#define Hiro_SourceEdit //added via GNUmakefile
#define Hiro_TabFrame
#define Hiro_TableView
#define Hiro_TextEdit
#define Hiro_TreeView
#define Hiro_VerticalScrollBar
#define Hiro_VerticalSlider
#define Hiro_Viewport
//platform-specific exclusions
#if defined(HIRO_WINDOWS) || defined(HIRO_COCOA) || defined(HIRO_QT)
#undef Hiro_ComboEdit
#undef Hiro_Console
#undef Hiro_IconView
#undef Hiro_SourceEdit
#undef Hiro_TreeView
#endif
#if defined(HIRO_COCOA)
#undef Hiro_HexEdit
#endif
//extensions
#define Hiro_FixedLayout
#define Hiro_HorizontalLayout
#define Hiro_VerticalLayout
#define Hiro_TableLayout
#if defined(Hiro_Timer) && defined(Hiro_Canvas)
#define Hiro_HorizontalResizeGrip
#define Hiro_VerticalResizeGrip
#endif
#if defined(Hiro_TableView)
#define Hiro_ListView
#endif
#if defined(Hiro_Button) && defined(Hiro_Canvas) && defined(Hiro_Label)
#define Hiro_MessageDialog
#define Hiro_NameDialog
#endif
#if defined(Hiro_Button) && defined(Hiro_ComboButton) && defined(Hiro_LineEdit) && defined(Hiro_ListView) && defined(Hiro_MessageDialog) && defined(Hiro_NameDialog)
#define Hiro_BrowserDialog
#endif
#if defined(Hiro_Canvas) && defined(Hiro_Label)
#define Hiro_AboutDialog
#endif