GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

visual.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2002-2004 The GFC Development Team. 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00023 00024 #ifndef GFC_GDK_VISUAL_HH 00025 #define GFC_GDK_VISUAL_HH 00026 00027 #ifndef GFC_G_OBJECT_HH 00028 #include <gfc/glib/object.hh> 00029 #endif 00030 00031 #ifndef GFC_GDK_TYPES_HH 00032 #include <gfc/gdk/types.hh> 00033 #endif 00034 00035 #ifndef _CPP_VECTOR 00036 #include <vector> 00037 #endif 00038 00039 namespace GFC { 00040 00041 namespace Gdk { 00042 00046 00047 enum VisualType 00048 { 00049 VISUAL_STATIC_GRAY = GDK_VISUAL_STATIC_GRAY, 00051 00052 VISUAL_GRAYSCALE = GDK_VISUAL_GRAYSCALE, 00055 00056 VISUAL_STATIC_COLOR = GDK_VISUAL_STATIC_COLOR, 00059 00060 VISUAL_PSUEDO_COLOR = GDK_VISUAL_PSEUDO_COLOR, 00063 00064 VISUAL_TRUE_COLOR = GDK_VISUAL_TRUE_COLOR, 00068 00069 VISUAL_DIRECT_COLOR = GDK_VISUAL_DIRECT_COLOR 00073 }; 00074 00100 00101 class Visual : public G::Object 00102 { 00103 friend class G::Object; 00104 00105 Visual(const Visual&); 00106 Visual& operator=(const Visual&); 00107 00108 protected: 00111 00112 explicit Visual(GdkVisual *visual, bool owns_reference = true); 00119 00121 00122 public: 00125 00126 virtual ~ Visual(); 00128 00130 00131 static const Visual* get_best(); 00133 00134 static const Visual* get_best(int depth); 00141 00142 static const Visual* get_best(VisualType visual_type); 00148 00149 static const Visual* get_best(int depth, VisualType visual_type); 00155 00156 static const Visual* get_system(); 00159 00162 00163 GdkVisual* gdk_visual() const; 00165 00166 operator GdkVisual* () const; 00168 00169 VisualType type() const; 00171 00172 int depth() const; 00174 00175 ByteOrder byte_order() const; 00177 00178 int colormap_size() const; 00184 00185 int bits_per_rgb() const; 00188 00189 unsigned int red_mask() const; 00192 00193 int red_shift() const; 00208 00209 int red_prec() const; 00211 00212 unsigned int green_mask() const; 00214 00215 int green_shift() const; 00218 00219 int green_prec() const; 00221 00222 unsigned int blue_mask() const; 00224 00225 int blue_shift() const; 00228 00229 int blue_prec() const; 00231 00232 int get_best_depth() const; 00237 00238 VisualType get_best_type() const; 00241 00243 00244 static std::vector<int> query_depths(); 00250 00251 static bool query_visual_types(std::vector<VisualType>& visual_types); 00258 00259 static bool list_visuals(std::vector<const Visual*>& visuals); 00266 }; 00267 00268 } // namespace Gdk 00269 00270 } // namespace GFC 00271 00272 #include <gfc/gdk/inline/visual.inl> 00273 00274 #endif // GFC_GDK_VISUAL_HH 00275

Generated on Tue Aug 24 00:34:32 2004 for GFC-UI by doxygen 1.3.8