RE: Combo Boxes




/*
As an alternative you can just declare entry to be a GtkEntry*. Don't
know what you want to do with it. My opinion is to declare the variable
in such a way a minimal number of casts is requiered. This is due to the
fact that each cast instruction costs some CPU time. In C++ cast
checking is done at compile time. Using Gtk, this will be done at
runtime, so it'll slow your program.

--Jeroen Benckhuijsen
*/

  You can turn off run-time type checking with the GTK_NO_CHECK_CASTS
define.

  From gtktypeutils.h:
----------------------------------
/* The debugging versions of the casting macros make sure the cast is "ok"
 *  before proceeding, but they are definately slower than their less
 *  careful counterparts as they involve extra ``is a'' checks.
 */
#ifdef GTK_NO_CHECK_CASTS
#  define GTK_CHECK_CAST(tobj, cast_type, cast)       ((cast*) (tobj))
#  define GTK_CHECK_CLASS_CAST(tclass,cast_type,cast) ((cast*) (tclass))
#else /* !GTK_NO_CHECK_CASTS */
#  define GTK_CHECK_CAST(tobj, cast_type, cast) \
      ((cast*) gtk_type_check_object_cast ((GtkTypeObject*) (tobj),
(cast_type)))
#  define GTK_CHECK_CLASS_CAST(tclass,cast_type,cast) \
      ((cast*) gtk_type_check_class_cast ((GtkTypeClass*) (tclass),
(cast_type)))
#endif /* GTK_NO_CHECK_CASTS */
----------------------------------

  Take care,
    Lion =^_^=






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]