aboutsummaryrefslogtreecommitdiff
path: root/liblogdiag
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-10-25 16:49:23 +0200
committerPřemysl Eric Janouch <p@janouch.name>2021-10-25 18:06:50 +0200
commitbc8ceebef7530b767e9e454f3c5cd6e1749675bd (patch)
treeae63f86facb3bc0dd0223b570131bae5542fb716 /liblogdiag
parentda0a5c43dc53a48a70f4f1a15bce081b87bbe85f (diff)
downloadlogdiag-bc8ceebef7530b767e9e454f3c5cd6e1749675bd.tar.gz
logdiag-bc8ceebef7530b767e9e454f3c5cd6e1749675bd.tar.xz
logdiag-bc8ceebef7530b767e9e454f3c5cd6e1749675bd.zip
Add clang-format configuration, clean up
Diffstat (limited to 'liblogdiag')
-rw-r--r--liblogdiag/ld-category-symbol-view.c6
-rw-r--r--liblogdiag/ld-category-symbol-view.h26
-rw-r--r--liblogdiag/ld-category-tree-view.h26
-rw-r--r--liblogdiag/ld-category-view.c3
-rw-r--r--liblogdiag/ld-category-view.h17
-rw-r--r--liblogdiag/ld-category.c1
-rw-r--r--liblogdiag/ld-category.h21
-rw-r--r--liblogdiag/ld-diagram-connection.c1
-rw-r--r--liblogdiag/ld-diagram-connection.h27
-rw-r--r--liblogdiag/ld-diagram-object.h25
-rw-r--r--liblogdiag/ld-diagram-symbol.h25
-rw-r--r--liblogdiag/ld-diagram-view.c4
-rw-r--r--liblogdiag/ld-diagram-view.h22
-rw-r--r--liblogdiag/ld-diagram.h20
-rw-r--r--liblogdiag/ld-library.c1
-rw-r--r--liblogdiag/ld-library.h20
-rw-r--r--liblogdiag/ld-lua-private.h1
-rw-r--r--liblogdiag/ld-lua-symbol-private.h1
-rw-r--r--liblogdiag/ld-lua-symbol.c1
-rw-r--r--liblogdiag/ld-lua-symbol.h21
-rw-r--r--liblogdiag/ld-lua.c7
-rw-r--r--liblogdiag/ld-lua.h19
-rw-r--r--liblogdiag/ld-symbol.h20
-rw-r--r--liblogdiag/ld-types.c3
-rw-r--r--liblogdiag/ld-types.h5
-rw-r--r--liblogdiag/ld-undo-action.c5
-rw-r--r--liblogdiag/ld-undo-action.h21
27 files changed, 176 insertions, 173 deletions
diff --git a/liblogdiag/ld-category-symbol-view.c b/liblogdiag/ld-category-symbol-view.c
index ca8e4f2..f070a0f 100644
--- a/liblogdiag/ld-category-symbol-view.c
+++ b/liblogdiag/ld-category-symbol-view.c
@@ -456,9 +456,9 @@ on_leave_notify (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
}
static void
-on_drag_data_get
-(GtkWidget *widget, GdkDragContext *ctx, GtkSelectionData *selection_data,
- guint target_type, guint time, gpointer user_data)
+on_drag_data_get (GtkWidget *widget, GdkDragContext *ctx,
+ GtkSelectionData *selection_data, guint target_type, guint time,
+ gpointer user_data)
{
LdCategorySymbolView *self;
diff --git a/liblogdiag/ld-category-symbol-view.h b/liblogdiag/ld-category-symbol-view.h
index ca014c7..c5e1b47 100644
--- a/liblogdiag/ld-category-symbol-view.h
+++ b/liblogdiag/ld-category-symbol-view.h
@@ -15,16 +15,22 @@ G_BEGIN_DECLS
#define LD_TYPE_CATEGORY_SYMBOL_VIEW (ld_category_symbol_view_get_type ())
-#define LD_CATEGORY_SYMBOL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), LD_TYPE_CATEGORY_SYMBOL_VIEW, LdCategorySymbolView))
-#define LD_CATEGORY_SYMBOL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
- ((klass), LD_TYPE_CATEGORY_SYMBOL_VIEW, LdCategorySymbolViewClass))
-#define LD_IS_CATEGORY_SYMBOL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), LD_TYPE_CATEGORY_SYMBOL_VIEW))
-#define LD_IS_CATEGORY_SYMBOL_VIEW_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((klass), LD_TYPE_CATEGORY_SYMBOL_VIEW))
-#define LD_CATEGORY_SYMBOL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), LD_CATEGORY_SYMBOL_VIEW, LdCategorySymbolViewClass))
+#define LD_CATEGORY_SYMBOL_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+ LD_TYPE_CATEGORY_SYMBOL_VIEW, \
+ LdCategorySymbolView))
+#define LD_CATEGORY_SYMBOL_VIEW_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), \
+ LD_TYPE_CATEGORY_SYMBOL_VIEW, \
+ LdCategorySymbolViewClass))
+#define LD_IS_CATEGORY_SYMBOL_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_CATEGORY_SYMBOL_VIEW))
+#define LD_IS_CATEGORY_SYMBOL_VIEW_CLASS(klass) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_CATEGORY_SYMBOL_VIEW))
+#define LD_CATEGORY_SYMBOL_VIEW_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+ LD_CATEGORY_SYMBOL_VIEW, \
+ LdCategorySymbolViewClass))
typedef struct _LdCategorySymbolView LdCategorySymbolView;
typedef struct _LdCategorySymbolViewPrivate LdCategorySymbolViewPrivate;
diff --git a/liblogdiag/ld-category-tree-view.h b/liblogdiag/ld-category-tree-view.h
index ae51ee4..d4f3d53 100644
--- a/liblogdiag/ld-category-tree-view.h
+++ b/liblogdiag/ld-category-tree-view.h
@@ -15,16 +15,22 @@ G_BEGIN_DECLS
#define LD_TYPE_CATEGORY_TREE_VIEW (ld_category_tree_view_get_type ())
-#define LD_CATEGORY_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), LD_TYPE_CATEGORY_TREE_VIEW, LdCategoryTreeView))
-#define LD_CATEGORY_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
- ((klass), LD_TYPE_CATEGORY_TREE_VIEW, LdCategoryTreeViewClass))
-#define LD_IS_CATEGORY_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), LD_TYPE_CATEGORY_TREE_VIEW))
-#define LD_IS_CATEGORY_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((klass), LD_TYPE_CATEGORY_TREE_VIEW))
-#define LD_CATEGORY_TREE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), LD_CATEGORY_TREE_VIEW, LdCategoryTreeViewClass))
+#define LD_CATEGORY_TREE_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+ LD_TYPE_CATEGORY_TREE_VIEW, \
+ LdCategoryTreeView))
+#define LD_CATEGORY_TREE_VIEW_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), \
+ LD_TYPE_CATEGORY_TREE_VIEW, \
+ LdCategoryTreeViewClass))
+#define LD_IS_CATEGORY_TREE_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_CATEGORY_TREE_VIEW))
+#define LD_IS_CATEGORY_TREE_VIEW_CLASS(klass) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_CATEGORY_TREE_VIEW))
+#define LD_CATEGORY_TREE_VIEW_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+ LD_CATEGORY_TREE_VIEW, \
+ LdCategoryTreeViewClass))
typedef struct _LdCategoryTreeView LdCategoryTreeView;
typedef struct _LdCategoryTreeViewPrivate LdCategoryTreeViewPrivate;
diff --git a/liblogdiag/ld-category-view.c b/liblogdiag/ld-category-view.c
index 37b3937..9ec06c4 100644
--- a/liblogdiag/ld-category-view.c
+++ b/liblogdiag/ld-category-view.c
@@ -77,8 +77,7 @@ ld_category_view_default_init (LdCategoryViewInterface *iface)
* Assign an #LdCategory object to the view.
*/
void
-ld_category_view_set_category (LdCategoryView *self,
- LdCategory *category)
+ld_category_view_set_category (LdCategoryView *self, LdCategory *category)
{
g_return_if_fail (LD_IS_CATEGORY_VIEW (self));
LD_CATEGORY_VIEW_GET_INTERFACE (self)->set_category (self, category);
diff --git a/liblogdiag/ld-category-view.h b/liblogdiag/ld-category-view.h
index 17e5189..cf54740 100644
--- a/liblogdiag/ld-category-view.h
+++ b/liblogdiag/ld-category-view.h
@@ -15,12 +15,14 @@ G_BEGIN_DECLS
#define LD_TYPE_CATEGORY_VIEW (ld_category_view_get_type ())
-#define LD_CATEGORY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), LD_TYPE_CATEGORY_VIEW, LdCategoryView))
-#define LD_IS_CATEGORY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), LD_TYPE_CATEGORY_VIEW))
-#define LD_CATEGORY_VIEW_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE \
- ((inst), LD_TYPE_CATEGORY_VIEW, LdCategoryViewInterface))
+#define LD_CATEGORY_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_CATEGORY_VIEW, LdCategoryView))
+#define LD_IS_CATEGORY_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_CATEGORY_VIEW))
+#define LD_CATEGORY_VIEW_GET_INTERFACE(inst) \
+ (G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
+ LD_TYPE_CATEGORY_VIEW, \
+ LdCategoryViewInterface))
typedef struct _LdCategoryView LdCategoryView;
typedef struct _LdCategoryViewInterface LdCategoryViewInterface;
@@ -48,8 +50,7 @@ struct _LdCategoryViewInterface
GType ld_category_view_get_type (void) G_GNUC_CONST;
-void ld_category_view_set_category (LdCategoryView *self,
- LdCategory *category);
+void ld_category_view_set_category (LdCategoryView *self, LdCategory *category);
LdCategory *ld_category_view_get_category (LdCategoryView *self);
diff --git a/liblogdiag/ld-category.c b/liblogdiag/ld-category.c
index 71383a7..083cb5a 100644
--- a/liblogdiag/ld-category.c
+++ b/liblogdiag/ld-category.c
@@ -561,4 +561,3 @@ ld_category_get_children (LdCategory *self)
g_return_val_if_fail (LD_IS_CATEGORY (self), NULL);
return self->priv->subcategories;
}
-
diff --git a/liblogdiag/ld-category.h b/liblogdiag/ld-category.h
index 2ce609c..8f121a2 100644
--- a/liblogdiag/ld-category.h
+++ b/liblogdiag/ld-category.h
@@ -15,16 +15,16 @@ G_BEGIN_DECLS
#define LD_TYPE_CATEGORY (ld_category_get_type ())
-#define LD_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), LD_TYPE_CATEGORY, LdCategory))
-#define LD_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
- ((klass), LD_TYPE_CATEGORY, LdCategoryClass))
-#define LD_IS_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), LD_TYPE_CATEGORY))
-#define LD_IS_CATEGORY_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((klass), LD_TYPE_CATEGORY))
-#define LD_CATEGORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), LD_CATEGORY, LdCategoryClass))
+#define LD_CATEGORY(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_CATEGORY, LdCategory))
+#define LD_CATEGORY_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), LD_TYPE_CATEGORY, LdCategoryClass))
+#define LD_IS_CATEGORY(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_CATEGORY))
+#define LD_IS_CATEGORY_CLASS(klass) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_CATEGORY))
+#define LD_CATEGORY_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), LD_CATEGORY, LdCategoryClass))
typedef struct _LdCategory LdCategory;
typedef struct _LdCategoryPrivate LdCategoryPrivate;
@@ -77,4 +77,3 @@ const GSList *ld_category_get_children (LdCategory *self);
G_END_DECLS
#endif /* ! __LD_CATEGORY_H__ */
-
diff --git a/liblogdiag/ld-diagram-connection.c b/liblogdiag/ld-diagram-connection.c
index ed0d64f..57fe149 100644
--- a/liblogdiag/ld-diagram-connection.c
+++ b/liblogdiag/ld-diagram-connection.c
@@ -332,4 +332,3 @@ on_set_points_destroy (gpointer user_data)
json_node_free (data->new_node);
g_slice_free (SetPointsActionData, data);
}
-
diff --git a/liblogdiag/ld-diagram-connection.h b/liblogdiag/ld-diagram-connection.h
index e33fee9..4915c61 100644
--- a/liblogdiag/ld-diagram-connection.h
+++ b/liblogdiag/ld-diagram-connection.h
@@ -15,16 +15,22 @@ G_BEGIN_DECLS
#define LD_TYPE_DIAGRAM_CONNECTION (ld_diagram_connection_get_type ())
-#define LD_DIAGRAM_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), LD_TYPE_DIAGRAM_CONNECTION, LdDiagramConnection))
-#define LD_DIAGRAM_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
- ((klass), LD_TYPE_DIAGRAM_CONNECTION, LdDiagramConnectionClass))
-#define LD_IS_DIAGRAM_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), LD_TYPE_DIAGRAM_CONNECTION))
-#define LD_IS_DIAGRAM_CONNECTION_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((klass), LD_TYPE_DIAGRAM_CONNECTION))
-#define LD_DIAGRAM_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), LD_DIAGRAM_CONNECTION, LdDiagramConnectionClass))
+#define LD_DIAGRAM_CONNECTION(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+ LD_TYPE_DIAGRAM_CONNECTION, \
+ LdDiagramConnection))
+#define LD_DIAGRAM_CONNECTION_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), \
+ LD_TYPE_DIAGRAM_CONNECTION, \
+ LdDiagramConnectionClass))
+#define LD_IS_DIAGRAM_CONNECTION(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_DIAGRAM_CONNECTION))
+#define LD_IS_DIAGRAM_CONNECTION_CLASS(klass) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_DIAGRAM_CONNECTION))
+#define LD_DIAGRAM_CONNECTION_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+ LD_DIAGRAM_CONNECTION, \
+ LdDiagramConnectionClass))
typedef struct _LdDiagramConnection LdDiagramConnection;
typedef struct _LdDiagramConnectionPrivate LdDiagramConnectionPrivate;
@@ -61,4 +67,3 @@ void ld_diagram_connection_set_points (LdDiagramConnection *self,
G_END_DECLS
#endif /* ! __LD_DIAGRAM_CONNECTION_H__ */
-
diff --git a/liblogdiag/ld-diagram-object.h b/liblogdiag/ld-diagram-object.h
index a853567..b330462 100644
--- a/liblogdiag/ld-diagram-object.h
+++ b/liblogdiag/ld-diagram-object.h
@@ -15,16 +15,20 @@ G_BEGIN_DECLS
#define LD_TYPE_DIAGRAM_OBJECT (ld_diagram_object_get_type ())
-#define LD_DIAGRAM_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), LD_TYPE_DIAGRAM_OBJECT, LdDiagramObject))
-#define LD_DIAGRAM_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
- ((klass), LD_TYPE_DIAGRAM_OBJECT, LdDiagramObjectClass))
-#define LD_IS_DIAGRAM_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), LD_TYPE_DIAGRAM_OBJECT))
-#define LD_IS_DIAGRAM_OBJECT_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((klass), LD_TYPE_DIAGRAM_OBJECT))
-#define LD_DIAGRAM_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), LD_DIAGRAM_OBJECT, LdDiagramObjectClass))
+#define LD_DIAGRAM_OBJECT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+ LD_TYPE_DIAGRAM_OBJECT, \
+ LdDiagramObject))
+#define LD_DIAGRAM_OBJECT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), \
+ LD_TYPE_DIAGRAM_OBJECT, \
+ LdDiagramObjectClass))
+#define LD_IS_DIAGRAM_OBJECT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_DIAGRAM_OBJECT))
+#define LD_IS_DIAGRAM_OBJECT_CLASS(klass) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_DIAGRAM_OBJECT))
+#define LD_DIAGRAM_OBJECT_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), LD_DIAGRAM_OBJECT, LdDiagramObjectClass))
typedef struct _LdDiagramObject LdDiagramObject;
typedef struct _LdDiagramObjectPrivate LdDiagramObjectPrivate;
@@ -74,4 +78,3 @@ void ld_diagram_object_set_y (LdDiagramObject *self, gdouble y);
G_END_DECLS
#endif /* ! __LD_DIAGRAM_OBJECT_H__ */
-
diff --git a/liblogdiag/ld-diagram-symbol.h b/liblogdiag/ld-diagram-symbol.h
index 9993f75..4d09d5c 100644
--- a/liblogdiag/ld-diagram-symbol.h
+++ b/liblogdiag/ld-diagram-symbol.h
@@ -15,16 +15,20 @@ G_BEGIN_DECLS
#define LD_TYPE_DIAGRAM_SYMBOL (ld_diagram_symbol_get_type ())
-#define LD_DIAGRAM_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), LD_TYPE_DIAGRAM_SYMBOL, LdDiagramSymbol))
-#define LD_DIAGRAM_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
- ((klass), LD_TYPE_DIAGRAM_SYMBOL, LdDiagramSymbolClass))
-#define LD_IS_DIAGRAM_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), LD_TYPE_DIAGRAM_SYMBOL))
-#define LD_IS_DIAGRAM_SYMBOL_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((klass), LD_TYPE_DIAGRAM_SYMBOL))
-#define LD_DIAGRAM_SYMBOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), LD_DIAGRAM_SYMBOL, LdDiagramSymbolClass))
+#define LD_DIAGRAM_SYMBOL(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+ LD_TYPE_DIAGRAM_SYMBOL, \
+ LdDiagramSymbol))
+#define LD_DIAGRAM_SYMBOL_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), \
+ LD_TYPE_DIAGRAM_SYMBOL, \
+ LdDiagramSymbolClass))
+#define LD_IS_DIAGRAM_SYMBOL(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_DIAGRAM_SYMBOL))
+#define LD_IS_DIAGRAM_SYMBOL_CLASS(klass) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_DIAGRAM_SYMBOL))
+#define LD_DIAGRAM_SYMBOL_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), LD_DIAGRAM_SYMBOL, LdDiagramSymbolClass))
typedef struct _LdDiagramSymbol LdDiagramSymbol;
typedef struct _LdDiagramSymbolPrivate LdDiagramSymbolPrivate;
@@ -70,4 +74,3 @@ void ld_diagram_symbol_set_rotation (LdDiagramSymbol *self, gint rotation);
G_END_DECLS
#endif /* ! __LD_DIAGRAM_SYMBOL_H__ */
-
diff --git a/liblogdiag/ld-diagram-view.c b/liblogdiag/ld-diagram-view.c
index d36c005..23cbb4c 100644
--- a/liblogdiag/ld-diagram-view.c
+++ b/liblogdiag/ld-diagram-view.c
@@ -1390,8 +1390,8 @@ move_selection (LdDiagramView *self, gdouble dx, gdouble dy)
static gboolean
is_object_selected (LdDiagramView *self, LdDiagramObject *object)
{
- return g_list_find (ld_diagram_get_selection (self->priv->diagram),
- object) != NULL;
+ return g_list_find (ld_diagram_get_selection (self->priv->diagram), object)
+ != NULL;
}
static void
diff --git a/liblogdiag/ld-diagram-view.h b/liblogdiag/ld-diagram-view.h
index 10e3a12..d107989 100644
--- a/liblogdiag/ld-diagram-view.h
+++ b/liblogdiag/ld-diagram-view.h
@@ -15,16 +15,18 @@ G_BEGIN_DECLS
#define LD_TYPE_DIAGRAM_VIEW (ld_diagram_view_get_type ())
-#define LD_DIAGRAM_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), LD_TYPE_DIAGRAM_VIEW, LdDiagramView))
-#define LD_DIAGRAM_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
- ((klass), LD_TYPE_DIAGRAM_VIEW, LdDiagramViewClass))
-#define LD_IS_DIAGRAM_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), LD_TYPE_DIAGRAM_VIEW))
-#define LD_IS_DIAGRAM_VIEW_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((klass), LD_TYPE_DIAGRAM_VIEW))
-#define LD_DIAGRAM_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), LD_DIAGRAM_VIEW, LdDiagramViewClass))
+#define LD_DIAGRAM_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_DIAGRAM_VIEW, LdDiagramView))
+#define LD_DIAGRAM_VIEW_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), \
+ LD_TYPE_DIAGRAM_VIEW, \
+ LdDiagramViewClass))
+#define LD_IS_DIAGRAM_VIEW(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_DIAGRAM_VIEW))
+#define LD_IS_DIAGRAM_VIEW_CLASS(klass) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_DIAGRAM_VIEW))
+#define LD_DIAGRAM_VIEW_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), LD_DIAGRAM_VIEW, LdDiagramViewClass))
typedef struct _LdDiagramView LdDiagramView;
typedef struct _LdDiagramViewPrivate LdDiagramViewPrivate;
diff --git a/liblogdiag/ld-diagram.h b/liblogdiag/ld-diagram.h
index 2c2c7ef..8c396f8 100644
--- a/liblogdiag/ld-diagram.h
+++ b/liblogdiag/ld-diagram.h
@@ -15,16 +15,15 @@ G_BEGIN_DECLS
#define LD_TYPE_DIAGRAM (ld_diagram_get_type ())
-#define LD_DIAGRAM(obj) (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), LD_TYPE_DIAGRAM, LdDiagram))
-#define LD_DIAGRAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
- ((klass), LD_TYPE_DIAGRAM, LdDiagramClass))
-#define LD_IS_DIAGRAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), LD_TYPE_DIAGRAM))
-#define LD_IS_DIAGRAM_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((klass), LD_TYPE_DIAGRAM))
-#define LD_DIAGRAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), LD_DIAGRAM, LdDiagramClass))
+#define LD_DIAGRAM(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_DIAGRAM, LdDiagram))
+#define LD_DIAGRAM_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), LD_TYPE_DIAGRAM, LdDiagramClass))
+#define LD_IS_DIAGRAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_DIAGRAM))
+#define LD_IS_DIAGRAM_CLASS(klass) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_DIAGRAM))
+#define LD_DIAGRAM_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), LD_DIAGRAM, LdDiagramClass))
typedef struct _LdDiagram LdDiagram;
typedef struct _LdDiagramClass LdDiagramClass;
@@ -114,4 +113,3 @@ void ld_diagram_unselect_all (LdDiagram *self);
G_END_DECLS
#endif /* ! __LD_DIAGRAM_H__ */
-
diff --git a/liblogdiag/ld-library.c b/liblogdiag/ld-library.c
index c580631..756dca4 100644
--- a/liblogdiag/ld-library.c
+++ b/liblogdiag/ld-library.c
@@ -427,4 +427,3 @@ ld_library_get_root (LdLibrary *self)
g_return_val_if_fail (LD_IS_LIBRARY (self), NULL);
return self->priv->root;
}
-
diff --git a/liblogdiag/ld-library.h b/liblogdiag/ld-library.h
index 46bed68..e52001e 100644
--- a/liblogdiag/ld-library.h
+++ b/liblogdiag/ld-library.h
@@ -15,16 +15,15 @@ G_BEGIN_DECLS
#define LD_TYPE_LIBRARY (ld_library_get_type ())
-#define LD_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), LD_TYPE_LIBRARY, LdLibrary))
-#define LD_LIBRARY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
- ((klass), LD_TYPE_LIBRARY, LdLibraryClass))
-#define LD_IS_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), LD_TYPE_LIBRARY))
-#define LD_IS_LIBRARY_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((klass), LD_TYPE_LIBRARY))
-#define LD_LIBRARY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), LD_LIBRARY, LdLibraryClass))
+#define LD_LIBRARY(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_LIBRARY, LdLibrary))
+#define LD_LIBRARY_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), LD_TYPE_LIBRARY, LdLibraryClass))
+#define LD_IS_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_LIBRARY))
+#define LD_IS_LIBRARY_CLASS(klass) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_LIBRARY))
+#define LD_LIBRARY_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), LD_LIBRARY, LdLibraryClass))
typedef struct _LdLibrary LdLibrary;
typedef struct _LdLibraryPrivate LdLibraryPrivate;
@@ -66,4 +65,3 @@ LdCategory *ld_library_get_root (LdLibrary *self);
G_END_DECLS
#endif /* ! __LD_LIBRARY_H__ */
-
diff --git a/liblogdiag/ld-lua-private.h b/liblogdiag/ld-lua-private.h
index 3d07f0b..f4ed7f3 100644
--- a/liblogdiag/ld-lua-private.h
+++ b/liblogdiag/ld-lua-private.h
@@ -23,4 +23,3 @@ void ld_lua_private_draw (LdLua *self, LdLuaSymbol *symbol, cairo_t *cr);
G_END_DECLS
#endif /* ! __LD_LUA_PRIVATE_H__ */
-
diff --git a/liblogdiag/ld-lua-symbol-private.h b/liblogdiag/ld-lua-symbol-private.h
index 01a949f..17a666b 100644
--- a/liblogdiag/ld-lua-symbol-private.h
+++ b/liblogdiag/ld-lua-symbol-private.h
@@ -37,4 +37,3 @@ struct _LdLuaSymbolPrivate
G_END_DECLS
#endif /* ! __LD_LUA_SYMBOL_PRIVATE_H__ */
-
diff --git a/liblogdiag/ld-lua-symbol.c b/liblogdiag/ld-lua-symbol.c
index a578f4c..deee9e8 100644
--- a/liblogdiag/ld-lua-symbol.c
+++ b/liblogdiag/ld-lua-symbol.c
@@ -135,4 +135,3 @@ ld_lua_symbol_real_draw (LdSymbol *symbol, cairo_t *cr)
ld_lua_private_draw (self->priv->lua, self, cr);
cairo_restore (cr);
}
-
diff --git a/liblogdiag/ld-lua-symbol.h b/liblogdiag/ld-lua-symbol.h
index d2a0500..557cdc1 100644
--- a/liblogdiag/ld-lua-symbol.h
+++ b/liblogdiag/ld-lua-symbol.h
@@ -15,16 +15,16 @@ G_BEGIN_DECLS
#define LD_TYPE_LUA_SYMBOL (ld_lua_symbol_get_type ())
-#define LD_LUA_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), LD_TYPE_LUA_SYMBOL, LdLuaSymbol))
-#define LD_LUA_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
- ((klass), LD_TYPE_LUA_SYMBOL, LdLuaSymbolClass))
-#define LD_IS_LUA_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), LD_TYPE_LUA_SYMBOL))
-#define LD_IS_LUA_SYMBOL_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((klass), LD_TYPE_LUA_SYMBOL))
-#define LD_LUA_SYMBOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), LD_LUA_SYMBOL, LdLuaSymbolClass))
+#define LD_LUA_SYMBOL(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_LUA_SYMBOL, LdLuaSymbol))
+#define LD_LUA_SYMBOL_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), LD_TYPE_LUA_SYMBOL, LdLuaSymbolClass))
+#define LD_IS_LUA_SYMBOL(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_LUA_SYMBOL))
+#define LD_IS_LUA_SYMBOL_CLASS(klass) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_LUA_SYMBOL))
+#define LD_LUA_SYMBOL_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), LD_LUA_SYMBOL, LdLuaSymbolClass))
typedef struct _LdLuaSymbol LdLuaSymbol;
typedef struct _LdLuaSymbolPrivate LdLuaSymbolPrivate;
@@ -57,4 +57,3 @@ GType ld_lua_symbol_get_type (void) G_GNUC_CONST;
G_END_DECLS
#endif /* ! __LD_LUA_SYMBOL_H__ */
-
diff --git a/liblogdiag/ld-lua.c b/liblogdiag/ld-lua.c
index c9c7e0c..32c641b 100644
--- a/liblogdiag/ld-lua.c
+++ b/liblogdiag/ld-lua.c
@@ -187,8 +187,7 @@ ld_lua_init (LdLua *self)
lua_State *L;
LdLuaData *ud;
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE
- (self, LD_TYPE_LUA, LdLuaPrivate);
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, LD_TYPE_LUA, LdLuaPrivate);
L = self->priv->L = lua_newstate (ld_lua_alloc, NULL);
g_return_if_fail (L != NULL);
@@ -465,8 +464,7 @@ ld_lua_logdiag_register (lua_State *L)
lua_insert (L, -2);
lua_concat (L, 2);
- g_warning ("Lua symbol registration failed: %s",
- lua_tostring (L, -1));
+ g_warning ("Lua symbol registration failed: %s", lua_tostring (L, -1));
lua_pushboolean (L, FALSE);
}
else
@@ -861,4 +859,3 @@ LD_LUA_CAIRO_BEGIN (show_text)
g_object_unref (layout);
LD_LUA_CAIRO_END (0)
-
diff --git a/liblogdiag/ld-lua.h b/liblogdiag/ld-lua.h
index 206036a..29a7f69 100644
--- a/liblogdiag/ld-lua.h
+++ b/liblogdiag/ld-lua.h
@@ -15,16 +15,14 @@ G_BEGIN_DECLS
#define LD_TYPE_LUA (ld_lua_get_type ())
-#define LD_LUA(obj) (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), LD_TYPE_LUA, LdLua))
-#define LD_LUA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
- ((klass), LD_TYPE_LUA, LdLuaClass))
-#define LD_IS_LUA(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), LD_TYPE_LUA))
-#define LD_IS_LUA_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((klass), LD_TYPE_LUA))
-#define LD_LUA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), LD_LUA, LdLuaClass))
+#define LD_LUA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_LUA, LdLua))
+#define LD_LUA_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), LD_TYPE_LUA, LdLuaClass))
+#define LD_IS_LUA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_LUA))
+#define LD_IS_LUA_CLASS(klass) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_LUA))
+#define LD_LUA_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), LD_LUA, LdLuaClass))
typedef struct _LdLua LdLua;
typedef struct _LdLuaPrivate LdLuaPrivate;
@@ -67,4 +65,3 @@ gboolean ld_lua_load_file (LdLua *self, const gchar *filename,
G_END_DECLS
#endif /* ! __LD_LUA_H__ */
-
diff --git a/liblogdiag/ld-symbol.h b/liblogdiag/ld-symbol.h
index 0ed8a56..99c6d52 100644
--- a/liblogdiag/ld-symbol.h
+++ b/liblogdiag/ld-symbol.h
@@ -15,16 +15,15 @@ G_BEGIN_DECLS
#define LD_TYPE_SYMBOL (ld_symbol_get_type ())
-#define LD_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), LD_TYPE_SYMBOL, LdSymbol))
-#define LD_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
- ((klass), LD_TYPE_SYMBOL, LdSymbolClass))
-#define LD_IS_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), LD_TYPE_SYMBOL))
-#define LD_IS_SYMBOL_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((klass), LD_TYPE_SYMBOL))
-#define LD_SYMBOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), LD_SYMBOL, LdSymbolClass))
+#define LD_SYMBOL(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_SYMBOL, LdSymbol))
+#define LD_SYMBOL_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), LD_TYPE_SYMBOL, LdSymbolClass))
+#define LD_IS_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_SYMBOL))
+#define LD_IS_SYMBOL_CLASS(klass) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_SYMBOL))
+#define LD_SYMBOL_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), LD_SYMBOL, LdSymbolClass))
typedef struct _LdSymbol LdSymbol;
typedef struct _LdSymbolPrivate LdSymbolPrivate;
@@ -72,4 +71,3 @@ void ld_symbol_draw (LdSymbol *self, cairo_t *cr);
G_END_DECLS
#endif /* ! __LD_SYMBOL_H__ */
-
diff --git a/liblogdiag/ld-types.c b/liblogdiag/ld-types.c
index fb2a5ad..8611494 100644
--- a/liblogdiag/ld-types.c
+++ b/liblogdiag/ld-types.c
@@ -256,7 +256,8 @@ ld_point_array_remove (LdPointArray *self, gint pos, guint length)
*
* Change size of the array.
*/
-void ld_point_array_set_size (LdPointArray *self, guint size)
+void
+ld_point_array_set_size (LdPointArray *self, guint size)
{
g_return_if_fail (self != NULL);
diff --git a/liblogdiag/ld-types.h b/liblogdiag/ld-types.h
index 0204c0d..760dcce 100644
--- a/liblogdiag/ld-types.h
+++ b/liblogdiag/ld-types.h
@@ -14,9 +14,9 @@
G_BEGIN_DECLS
-#define LD_TYPE_POINT (ld_point_get_type ())
+#define LD_TYPE_POINT (ld_point_get_type ())
#define LD_TYPE_POINT_ARRAY (ld_point_array_get_type ())
-#define LD_TYPE_RECTANGLE (ld_rectangle_get_type ())
+#define LD_TYPE_RECTANGLE (ld_rectangle_get_type ())
/**
@@ -99,4 +99,3 @@ void ld_rectangle_extend (LdRectangle *self, gdouble border);
G_END_DECLS
#endif /* ! __LD_TYPES_H__ */
-
diff --git a/liblogdiag/ld-undo-action.c b/liblogdiag/ld-undo-action.c
index d1da957..25fed4d 100644
--- a/liblogdiag/ld-undo-action.c
+++ b/liblogdiag/ld-undo-action.c
@@ -84,9 +84,8 @@ ld_undo_action_finalize (GObject *gobject)
* Return value: a new #LdUndoAction object.
*/
LdUndoAction *
-ld_undo_action_new (LdUndoActionFunc undo_func,
- LdUndoActionFunc redo_func, LdUndoActionFunc destroy_func,
- gpointer user_data)
+ld_undo_action_new (LdUndoActionFunc undo_func, LdUndoActionFunc redo_func,
+ LdUndoActionFunc destroy_func, gpointer user_data)
{
LdUndoAction *self;
diff --git a/liblogdiag/ld-undo-action.h b/liblogdiag/ld-undo-action.h
index 4db3169..dbfab81 100644
--- a/liblogdiag/ld-undo-action.h
+++ b/liblogdiag/ld-undo-action.h
@@ -15,16 +15,16 @@ G_BEGIN_DECLS
#define LD_TYPE_UNDO_ACTION (ld_undo_action_get_type ())
-#define LD_UNDO_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), LD_TYPE_UNDO_ACTION, LdUndoAction))
-#define LD_UNDO_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
- ((klass), LD_TYPE_UNDO_ACTION, LdUndoActionClass))
-#define LD_IS_UNDO_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), LD_TYPE_UNDO_ACTION))
-#define LD_IS_UNDO_ACTION_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
- ((klass), LD_TYPE_UNDO_ACTION))
-#define LD_UNDO_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), LD_UNDO_ACTION, LdUndoActionClass))
+#define LD_UNDO_ACTION(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_UNDO_ACTION, LdUndoAction))
+#define LD_UNDO_ACTION_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), LD_TYPE_UNDO_ACTION, LdUndoActionClass))
+#define LD_IS_UNDO_ACTION(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_UNDO_ACTION))
+#define LD_IS_UNDO_ACTION_CLASS(klass) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_UNDO_ACTION))
+#define LD_UNDO_ACTION_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), LD_UNDO_ACTION, LdUndoActionClass))
typedef struct _LdUndoAction LdUndoAction;
typedef struct _LdUndoActionPrivate LdUndoActionPrivate;
@@ -73,4 +73,3 @@ void ld_undo_action_redo (LdUndoAction *self);
G_END_DECLS
#endif /* ! __LD_UNDO_ACTION_H__ */
-