/gpump/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/gpump/trunk

« back to all changes in this revision

Viewing changes to HACKING

  • Committer: Gustav Hartvigsson
  • Date: 2014-02-09 20:43:06 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20140209204306-fbt250fjvipiyr44
* Added on alternative version of the post container widget
 This version has a pane to show more or less of the comments or the post.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
                           THE HACKING DOCUMENT
 
2
                    What to know when hacking on GPump
 
3
 
 
4
1) It is written in C/GLib
 
5
 
 
6
2) Use "1TBS" brace stryle.
 
7
 
 
8
3) Use two spaces for indentation
 
9
 
 
10
4) Use a spacious coding style. Put room between things as much as you can.
 
11
 
 
12
Examples:
 
13
 
 
14
Naming:
 
15
Files should be capitalised if, and only if they represent a type and or class.
 
16
files that only contain helper functions should not be capitalised.
 
17
 
 
18
Types should be capitalised but not variable or function names, this is to
 
19
comply with other GLib/GObject/GTK+ project naming conventions.
 
20
 
 
21
Pointers:
 
22
 
 
23
MyType * my_valiable;
 
24
MyType * my_function ();
 
25
 
 
26
Code example:
 
27
 
 
28
typedef struct Foo Foo;
 
29
 
 
30
struct Foo {
 
31
  gint some_int;
 
32
  GString * some_gstring;
 
33
  GIOStream * some_io_stream;
 
34
};
 
35
 
 
36
Foo * foo_new () {
 
37
  /* code goes here */
 
38
}
 
39