1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module gstreamer.DebugCategory; 26 27 private import glib.Str; 28 private import gstreamerc.gstreamer; 29 public import gstreamerc.gstreamertypes; 30 31 32 /** 33 * This is the struct that describes the categories. Once initialized with 34 * #GST_DEBUG_CATEGORY_INIT, its values can't be changed anymore. 35 */ 36 public class DebugCategory 37 { 38 /** the main Gtk struct */ 39 protected GstDebugCategory* gstDebugCategory; 40 41 /** Get the main Gtk struct */ 42 public GstDebugCategory* getDebugCategoryStruct() 43 { 44 return gstDebugCategory; 45 } 46 47 /** the main Gtk struct as a void* */ 48 protected void* getStruct() 49 { 50 return cast(void*)gstDebugCategory; 51 } 52 53 /** 54 * Sets our main struct and passes it to the parent class. 55 */ 56 public this (GstDebugCategory* gstDebugCategory) 57 { 58 this.gstDebugCategory = gstDebugCategory; 59 } 60 61 62 /** 63 * Removes and frees the category and all associated resources. 64 */ 65 public void free() 66 { 67 gst_debug_category_free(gstDebugCategory); 68 } 69 70 /** 71 * Returns the color of a debug category used when printing output in this 72 * category. 73 * 74 * Return: the color of the category. 75 */ 76 public uint getColor() 77 { 78 return gst_debug_category_get_color(gstDebugCategory); 79 } 80 81 /** 82 * Returns the description of a debug category. 83 * 84 * Return: the description of the category. 85 */ 86 public string getDescription() 87 { 88 return Str.toString(gst_debug_category_get_description(gstDebugCategory)); 89 } 90 91 /** 92 * Returns the name of a debug category. 93 * 94 * Return: the name of the category. 95 */ 96 public string getName() 97 { 98 return Str.toString(gst_debug_category_get_name(gstDebugCategory)); 99 } 100 101 /** 102 * Returns the threshold of a #GstDebugCategory. 103 * 104 * Return: the #GstDebugLevel that is used as threshold. 105 */ 106 public GstDebugLevel getThreshold() 107 { 108 return gst_debug_category_get_threshold(gstDebugCategory); 109 } 110 111 /** 112 * Resets the threshold of the category to the default level. Debug information 113 * will only be output if the threshold is lower or equal to the level of the 114 * debugging message. 115 * Use this function to set the threshold back to where it was after using 116 * gst_debug_category_set_threshold(). 117 */ 118 public void resetThreshold() 119 { 120 gst_debug_category_reset_threshold(gstDebugCategory); 121 } 122 123 /** 124 * Sets the threshold of the category to the given level. Debug information will 125 * only be output if the threshold is lower or equal to the level of the 126 * debugging message. 127 * <note><para> 128 * Do not use this function in production code, because other functions may 129 * change the threshold of categories as side effect. It is however a nice 130 * function to use when debugging (even from gdb). 131 * </para></note> 132 * 133 * Params: 134 * level = the #GstDebugLevel threshold to set. 135 */ 136 public void setThreshold(GstDebugLevel level) 137 { 138 gst_debug_category_set_threshold(gstDebugCategory, level); 139 } 140 }