Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pellegrino Prevete
libhandy
Commits
e7812490
Commit
e7812490
authored
Nov 22, 2018
by
Adrien Plazas
Committed by
Guido Gunther
Dec 03, 2018
Browse files
Normalize and document private header guards
parent
52249a12
Changes
5
Hide whitespace changes
Inline
Side-by-side
HACKING.md
View file @
e7812490
...
...
@@ -131,6 +131,17 @@ Header Inclusion Guards
Guard header inclusion with
`#pragma once`
rather than the traditional
`#ifndef`
-
`#define`
-
`#endif`
trio.
Internal headers (for consistency, whether they need to be installed or not)
should contain the following guard to prevent users from directly including
them:
```
c
#if !defined(_HANDY_INSIDE) && !defined(HANDY_COMPILATION)
#error "Only <handy.h> can be included directly."
#endif
```
Only after these should you include headers.
Signals
-------
...
...
src/hdy-column.h
View file @
e7812490
...
...
@@ -6,6 +6,10 @@
#pragma once
#if !defined(_HANDY_INSIDE) && !defined(HANDY_COMPILATION)
#error "Only <handy.h> can be included directly."
#endif
#include <gtk/gtk.h>
G_BEGIN_DECLS
...
...
src/hdy-main-private.h
View file @
e7812490
...
...
@@ -5,12 +5,12 @@
*/
#pragma once
#include "hdy-main.h"
#if !defined(_HANDY_INSIDE) && !defined(HANDY_COMPILATION)
#error "Only <handy.h> can be included directly."
#endif
#include "hdy-main.h"
G_BEGIN_DECLS
/* Initializes the public GObject types, which is needed to ensure they are
...
...
src/hdy-main.h
View file @
e7812490
...
...
@@ -5,12 +5,12 @@
*/
#pragma once
#include <glib.h>
#if !defined(_HANDY_INSIDE) && !defined(HANDY_COMPILATION)
#error "Only <handy.h> can be included directly."
#endif
#include <glib.h>
G_BEGIN_DECLS
gboolean
hdy_init
(
int
*
argc
,
char
***
argv
);
...
...
src/hdy-title-bar.h
View file @
e7812490
...
...
@@ -6,6 +6,10 @@
#pragma once
#if !defined(_HANDY_INSIDE) && !defined(HANDY_COMPILATION)
#error "Only <handy.h> can be included directly."
#endif
#include <gtk/gtk.h>
G_BEGIN_DECLS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment