Re: Variable Naming convetions...

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

 



Dnia 01-05-2005, nie o godzinie 20:43 -0700, email@xxxxxxxxxxxxxxxx
napisał:
> Since I'm new to GTK+ programming, I would like to use conventional
> variable naming if at all possible.  I've read that functions are in the
> format..
> 
> some_function_name()
> 
> and objects are...
> 
> ThisIsSomeWidget
> 
> and regular variables are...
> 
> this_variable_is_like_a_function
>
> Is this correct?

If by ThisIsSomeWidget you mean type name, then yes, it's correct. If
this is object instance, however, then you'd rather follow normal
variable naming, like

GtkWidget* main_window;

Also, for enums and macros you use all caps, like 

enum 
{ 
GTK_SOME_ENUM_VALUE
} GTK_SOME_ENUM;

#define GTK_SOME_MACRO

unless the macro is intended to be used like normal function, in which
case you use function naming convention.

Cheers,
Maciej

-- 
Maciej Katafiasz <ml@xxxxxxxxxxxx>

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux