File indexing completed on 2024-05-05 17:40:52
0001 #ifndef oxygenstylewrapper_h 0002 #define oxygenstylewrapper_h 0003 /* 0004 * this file is part of the oxygen gtk engine 0005 * SPDX-FileCopyrightText: 2010 Hugo Pereira Da Costa <hugo.pereira@free.fr> 0006 * 0007 * based on the Null Theme Engine for Gtk+. 0008 * SPDX-FileCopyrightText: 2008 Robert Staudinger <robert.staudinger@gmail.com> 0009 * 0010 * SPDX-License-Identifier: LGPL-2.0-or-later 0011 */ 0012 0013 #include <gtk/gtk.h> 0014 #include "oxygenxulinfo.h" 0015 0016 // oxygen style struct 0017 struct OxygenStyle 0018 { GtkStyle parent; }; 0019 0020 // oxygen style class struct 0021 struct OxygenStyleClass 0022 { GtkStyleClass parent; }; 0023 0024 namespace Oxygen 0025 { 0026 class StyleWrapper 0027 { 0028 0029 public: 0030 0031 //! type registration 0032 static void registerType( GTypeModule* ); 0033 0034 //! version type registration 0035 /*! 0036 it is used to let an external program retrieve 0037 the oxygen-gtk version that it uses, if any 0038 */ 0039 static void registerVersionType( void ); 0040 0041 //! registered type 0042 static GType type( void ); 0043 0044 //! parent class 0045 inline static GtkStyleClass* parentClass( void ) 0046 { return _parentClass; } 0047 0048 //! xul info 0049 inline static XulInfo& xulInfo( void ) 0050 { return _xulInfo; } 0051 0052 protected: 0053 0054 //! instance initialization 0055 static void instanceInit( OxygenStyle* ); 0056 0057 //! class initialization 0058 static void classInit( OxygenStyleClass* ); 0059 0060 private: 0061 0062 //! parent class 0063 static GtkStyleClass* _parentClass; 0064 0065 //! registered type indo 0066 static GTypeInfo _typeInfo; 0067 0068 //! registered type 0069 static GType _type; 0070 0071 //! xul info, needed to properly render focus in checkboxes and radio buttons 0072 static XulInfo _xulInfo; 0073 0074 }; 0075 } 0076 0077 #endif