Add clang-format configuration, clean up
This commit is contained in:
parent
da0a5c43dc
commit
bc8ceebef7
|
@ -0,0 +1,37 @@
|
||||||
|
# clang-format is fairly limited, and these rules are approximate:
|
||||||
|
# - array initializers can get terribly mangled with clang-format 12.0,
|
||||||
|
# - sometimes it still aligns with space characters,
|
||||||
|
# - struct name NL { NL ... NL } NL name; is unachievable.
|
||||||
|
BasedOnStyle: GNU
|
||||||
|
ColumnLimit: 80
|
||||||
|
IndentWidth: 4
|
||||||
|
TabWidth: 4
|
||||||
|
UseTab: ForContinuationAndIndentation
|
||||||
|
BreakBeforeBraces: Allman
|
||||||
|
SpaceAfterCStyleCast: true
|
||||||
|
AlignConsecutiveAssignments: true
|
||||||
|
AlignAfterOpenBracket: DontAlign
|
||||||
|
AlignEscapedNewlines: DontAlign
|
||||||
|
AlignOperands: DontAlign
|
||||||
|
AlignConsecutiveMacros: Consecutive
|
||||||
|
AllowAllArgumentsOnNextLine: false
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
|
Cpp11BracedListStyle: true
|
||||||
|
MaxEmptyLinesToKeep: 2
|
||||||
|
|
||||||
|
# IncludeCategories has some potential, but currently it breaks build.
|
||||||
|
# Note that the documentation says the value should be "Never".
|
||||||
|
SortIncludes: false
|
||||||
|
|
||||||
|
# Must be kept synchronized with gi18n.h and make-template.sh.
|
||||||
|
WhitespaceSensitiveMacros: ['_', 'Q_', 'N_', 'C_', 'NC_']
|
||||||
|
|
||||||
|
# This is a compromise, it generally works out aesthetically better.
|
||||||
|
BinPackArguments: false
|
||||||
|
|
||||||
|
# Unfortunately, this doesn't work for block comments, used in logdiag.
|
||||||
|
SpacesBeforeTrailingComments: 2
|
||||||
|
|
||||||
|
# logdiag-specific function body wrappers.
|
||||||
|
MacroBlockBegin: "LD_LUA_CAIRO_BEGIN"
|
||||||
|
MacroBlockEnd: "LD_LUA_CAIRO_END"
|
|
@ -456,9 +456,9 @@ on_leave_notify (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_drag_data_get
|
on_drag_data_get (GtkWidget *widget, GdkDragContext *ctx,
|
||||||
(GtkWidget *widget, GdkDragContext *ctx, GtkSelectionData *selection_data,
|
GtkSelectionData *selection_data, guint target_type, guint time,
|
||||||
guint target_type, guint time, gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
LdCategorySymbolView *self;
|
LdCategorySymbolView *self;
|
||||||
|
|
||||||
|
|
|
@ -15,16 +15,22 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define LD_TYPE_CATEGORY_SYMBOL_VIEW (ld_category_symbol_view_get_type ())
|
#define LD_TYPE_CATEGORY_SYMBOL_VIEW (ld_category_symbol_view_get_type ())
|
||||||
#define LD_CATEGORY_SYMBOL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST \
|
#define LD_CATEGORY_SYMBOL_VIEW(obj) \
|
||||||
((obj), LD_TYPE_CATEGORY_SYMBOL_VIEW, LdCategorySymbolView))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
|
||||||
#define LD_CATEGORY_SYMBOL_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
|
LD_TYPE_CATEGORY_SYMBOL_VIEW, \
|
||||||
((klass), LD_TYPE_CATEGORY_SYMBOL_VIEW, LdCategorySymbolViewClass))
|
LdCategorySymbolView))
|
||||||
#define LD_IS_CATEGORY_SYMBOL_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_CATEGORY_SYMBOL_VIEW_CLASS(klass) \
|
||||||
((obj), LD_TYPE_CATEGORY_SYMBOL_VIEW))
|
(G_TYPE_CHECK_CLASS_CAST ((klass), \
|
||||||
#define LD_IS_CATEGORY_SYMBOL_VIEW_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
|
LD_TYPE_CATEGORY_SYMBOL_VIEW, \
|
||||||
((klass), LD_TYPE_CATEGORY_SYMBOL_VIEW))
|
LdCategorySymbolViewClass))
|
||||||
#define LD_CATEGORY_SYMBOL_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
|
#define LD_IS_CATEGORY_SYMBOL_VIEW(obj) \
|
||||||
((obj), LD_CATEGORY_SYMBOL_VIEW, LdCategorySymbolViewClass))
|
(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 _LdCategorySymbolView LdCategorySymbolView;
|
||||||
typedef struct _LdCategorySymbolViewPrivate LdCategorySymbolViewPrivate;
|
typedef struct _LdCategorySymbolViewPrivate LdCategorySymbolViewPrivate;
|
||||||
|
|
|
@ -15,16 +15,22 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define LD_TYPE_CATEGORY_TREE_VIEW (ld_category_tree_view_get_type ())
|
#define LD_TYPE_CATEGORY_TREE_VIEW (ld_category_tree_view_get_type ())
|
||||||
#define LD_CATEGORY_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST \
|
#define LD_CATEGORY_TREE_VIEW(obj) \
|
||||||
((obj), LD_TYPE_CATEGORY_TREE_VIEW, LdCategoryTreeView))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
|
||||||
#define LD_CATEGORY_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
|
LD_TYPE_CATEGORY_TREE_VIEW, \
|
||||||
((klass), LD_TYPE_CATEGORY_TREE_VIEW, LdCategoryTreeViewClass))
|
LdCategoryTreeView))
|
||||||
#define LD_IS_CATEGORY_TREE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_CATEGORY_TREE_VIEW_CLASS(klass) \
|
||||||
((obj), LD_TYPE_CATEGORY_TREE_VIEW))
|
(G_TYPE_CHECK_CLASS_CAST ((klass), \
|
||||||
#define LD_IS_CATEGORY_TREE_VIEW_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
|
LD_TYPE_CATEGORY_TREE_VIEW, \
|
||||||
((klass), LD_TYPE_CATEGORY_TREE_VIEW))
|
LdCategoryTreeViewClass))
|
||||||
#define LD_CATEGORY_TREE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
|
#define LD_IS_CATEGORY_TREE_VIEW(obj) \
|
||||||
((obj), LD_CATEGORY_TREE_VIEW, LdCategoryTreeViewClass))
|
(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 _LdCategoryTreeView LdCategoryTreeView;
|
||||||
typedef struct _LdCategoryTreeViewPrivate LdCategoryTreeViewPrivate;
|
typedef struct _LdCategoryTreeViewPrivate LdCategoryTreeViewPrivate;
|
||||||
|
|
|
@ -77,8 +77,7 @@ ld_category_view_default_init (LdCategoryViewInterface *iface)
|
||||||
* Assign an #LdCategory object to the view.
|
* Assign an #LdCategory object to the view.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ld_category_view_set_category (LdCategoryView *self,
|
ld_category_view_set_category (LdCategoryView *self, LdCategory *category)
|
||||||
LdCategory *category)
|
|
||||||
{
|
{
|
||||||
g_return_if_fail (LD_IS_CATEGORY_VIEW (self));
|
g_return_if_fail (LD_IS_CATEGORY_VIEW (self));
|
||||||
LD_CATEGORY_VIEW_GET_INTERFACE (self)->set_category (self, category);
|
LD_CATEGORY_VIEW_GET_INTERFACE (self)->set_category (self, category);
|
||||||
|
|
|
@ -15,12 +15,14 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define LD_TYPE_CATEGORY_VIEW (ld_category_view_get_type ())
|
#define LD_TYPE_CATEGORY_VIEW (ld_category_view_get_type ())
|
||||||
#define LD_CATEGORY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST \
|
#define LD_CATEGORY_VIEW(obj) \
|
||||||
((obj), LD_TYPE_CATEGORY_VIEW, LdCategoryView))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_CATEGORY_VIEW, LdCategoryView))
|
||||||
#define LD_IS_CATEGORY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_IS_CATEGORY_VIEW(obj) \
|
||||||
((obj), LD_TYPE_CATEGORY_VIEW))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_CATEGORY_VIEW))
|
||||||
#define LD_CATEGORY_VIEW_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE \
|
#define LD_CATEGORY_VIEW_GET_INTERFACE(inst) \
|
||||||
((inst), LD_TYPE_CATEGORY_VIEW, LdCategoryViewInterface))
|
(G_TYPE_INSTANCE_GET_INTERFACE ((inst), \
|
||||||
|
LD_TYPE_CATEGORY_VIEW, \
|
||||||
|
LdCategoryViewInterface))
|
||||||
|
|
||||||
typedef struct _LdCategoryView LdCategoryView;
|
typedef struct _LdCategoryView LdCategoryView;
|
||||||
typedef struct _LdCategoryViewInterface LdCategoryViewInterface;
|
typedef struct _LdCategoryViewInterface LdCategoryViewInterface;
|
||||||
|
@ -48,8 +50,7 @@ struct _LdCategoryViewInterface
|
||||||
|
|
||||||
GType ld_category_view_get_type (void) G_GNUC_CONST;
|
GType ld_category_view_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
void ld_category_view_set_category (LdCategoryView *self,
|
void ld_category_view_set_category (LdCategoryView *self, LdCategory *category);
|
||||||
LdCategory *category);
|
|
||||||
LdCategory *ld_category_view_get_category (LdCategoryView *self);
|
LdCategory *ld_category_view_get_category (LdCategoryView *self);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -561,4 +561,3 @@ ld_category_get_children (LdCategory *self)
|
||||||
g_return_val_if_fail (LD_IS_CATEGORY (self), NULL);
|
g_return_val_if_fail (LD_IS_CATEGORY (self), NULL);
|
||||||
return self->priv->subcategories;
|
return self->priv->subcategories;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,16 +15,16 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define LD_TYPE_CATEGORY (ld_category_get_type ())
|
#define LD_TYPE_CATEGORY (ld_category_get_type ())
|
||||||
#define LD_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_CAST \
|
#define LD_CATEGORY(obj) \
|
||||||
((obj), LD_TYPE_CATEGORY, LdCategory))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_CATEGORY, LdCategory))
|
||||||
#define LD_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
|
#define LD_CATEGORY_CLASS(klass) \
|
||||||
((klass), LD_TYPE_CATEGORY, LdCategoryClass))
|
(G_TYPE_CHECK_CLASS_CAST ((klass), LD_TYPE_CATEGORY, LdCategoryClass))
|
||||||
#define LD_IS_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_IS_CATEGORY(obj) \
|
||||||
((obj), LD_TYPE_CATEGORY))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_CATEGORY))
|
||||||
#define LD_IS_CATEGORY_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_IS_CATEGORY_CLASS(klass) \
|
||||||
((klass), LD_TYPE_CATEGORY))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_CATEGORY))
|
||||||
#define LD_CATEGORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
|
#define LD_CATEGORY_GET_CLASS(obj) \
|
||||||
((obj), LD_CATEGORY, LdCategoryClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), LD_CATEGORY, LdCategoryClass))
|
||||||
|
|
||||||
typedef struct _LdCategory LdCategory;
|
typedef struct _LdCategory LdCategory;
|
||||||
typedef struct _LdCategoryPrivate LdCategoryPrivate;
|
typedef struct _LdCategoryPrivate LdCategoryPrivate;
|
||||||
|
@ -77,4 +77,3 @@ const GSList *ld_category_get_children (LdCategory *self);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* ! __LD_CATEGORY_H__ */
|
#endif /* ! __LD_CATEGORY_H__ */
|
||||||
|
|
||||||
|
|
|
@ -332,4 +332,3 @@ on_set_points_destroy (gpointer user_data)
|
||||||
json_node_free (data->new_node);
|
json_node_free (data->new_node);
|
||||||
g_slice_free (SetPointsActionData, data);
|
g_slice_free (SetPointsActionData, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,16 +15,22 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define LD_TYPE_DIAGRAM_CONNECTION (ld_diagram_connection_get_type ())
|
#define LD_TYPE_DIAGRAM_CONNECTION (ld_diagram_connection_get_type ())
|
||||||
#define LD_DIAGRAM_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST \
|
#define LD_DIAGRAM_CONNECTION(obj) \
|
||||||
((obj), LD_TYPE_DIAGRAM_CONNECTION, LdDiagramConnection))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
|
||||||
#define LD_DIAGRAM_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
|
LD_TYPE_DIAGRAM_CONNECTION, \
|
||||||
((klass), LD_TYPE_DIAGRAM_CONNECTION, LdDiagramConnectionClass))
|
LdDiagramConnection))
|
||||||
#define LD_IS_DIAGRAM_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_DIAGRAM_CONNECTION_CLASS(klass) \
|
||||||
((obj), LD_TYPE_DIAGRAM_CONNECTION))
|
(G_TYPE_CHECK_CLASS_CAST ((klass), \
|
||||||
#define LD_IS_DIAGRAM_CONNECTION_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
|
LD_TYPE_DIAGRAM_CONNECTION, \
|
||||||
((klass), LD_TYPE_DIAGRAM_CONNECTION))
|
LdDiagramConnectionClass))
|
||||||
#define LD_DIAGRAM_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
|
#define LD_IS_DIAGRAM_CONNECTION(obj) \
|
||||||
((obj), LD_DIAGRAM_CONNECTION, LdDiagramConnectionClass))
|
(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 _LdDiagramConnection LdDiagramConnection;
|
||||||
typedef struct _LdDiagramConnectionPrivate LdDiagramConnectionPrivate;
|
typedef struct _LdDiagramConnectionPrivate LdDiagramConnectionPrivate;
|
||||||
|
@ -61,4 +67,3 @@ void ld_diagram_connection_set_points (LdDiagramConnection *self,
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* ! __LD_DIAGRAM_CONNECTION_H__ */
|
#endif /* ! __LD_DIAGRAM_CONNECTION_H__ */
|
||||||
|
|
||||||
|
|
|
@ -15,16 +15,20 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define LD_TYPE_DIAGRAM_OBJECT (ld_diagram_object_get_type ())
|
#define LD_TYPE_DIAGRAM_OBJECT (ld_diagram_object_get_type ())
|
||||||
#define LD_DIAGRAM_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST \
|
#define LD_DIAGRAM_OBJECT(obj) \
|
||||||
((obj), LD_TYPE_DIAGRAM_OBJECT, LdDiagramObject))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
|
||||||
#define LD_DIAGRAM_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
|
LD_TYPE_DIAGRAM_OBJECT, \
|
||||||
((klass), LD_TYPE_DIAGRAM_OBJECT, LdDiagramObjectClass))
|
LdDiagramObject))
|
||||||
#define LD_IS_DIAGRAM_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_DIAGRAM_OBJECT_CLASS(klass) \
|
||||||
((obj), LD_TYPE_DIAGRAM_OBJECT))
|
(G_TYPE_CHECK_CLASS_CAST ((klass), \
|
||||||
#define LD_IS_DIAGRAM_OBJECT_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
|
LD_TYPE_DIAGRAM_OBJECT, \
|
||||||
((klass), LD_TYPE_DIAGRAM_OBJECT))
|
LdDiagramObjectClass))
|
||||||
#define LD_DIAGRAM_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
|
#define LD_IS_DIAGRAM_OBJECT(obj) \
|
||||||
((obj), LD_DIAGRAM_OBJECT, LdDiagramObjectClass))
|
(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 _LdDiagramObject LdDiagramObject;
|
||||||
typedef struct _LdDiagramObjectPrivate LdDiagramObjectPrivate;
|
typedef struct _LdDiagramObjectPrivate LdDiagramObjectPrivate;
|
||||||
|
@ -74,4 +78,3 @@ void ld_diagram_object_set_y (LdDiagramObject *self, gdouble y);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* ! __LD_DIAGRAM_OBJECT_H__ */
|
#endif /* ! __LD_DIAGRAM_OBJECT_H__ */
|
||||||
|
|
||||||
|
|
|
@ -15,16 +15,20 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define LD_TYPE_DIAGRAM_SYMBOL (ld_diagram_symbol_get_type ())
|
#define LD_TYPE_DIAGRAM_SYMBOL (ld_diagram_symbol_get_type ())
|
||||||
#define LD_DIAGRAM_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_CAST \
|
#define LD_DIAGRAM_SYMBOL(obj) \
|
||||||
((obj), LD_TYPE_DIAGRAM_SYMBOL, LdDiagramSymbol))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
|
||||||
#define LD_DIAGRAM_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
|
LD_TYPE_DIAGRAM_SYMBOL, \
|
||||||
((klass), LD_TYPE_DIAGRAM_SYMBOL, LdDiagramSymbolClass))
|
LdDiagramSymbol))
|
||||||
#define LD_IS_DIAGRAM_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_DIAGRAM_SYMBOL_CLASS(klass) \
|
||||||
((obj), LD_TYPE_DIAGRAM_SYMBOL))
|
(G_TYPE_CHECK_CLASS_CAST ((klass), \
|
||||||
#define LD_IS_DIAGRAM_SYMBOL_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
|
LD_TYPE_DIAGRAM_SYMBOL, \
|
||||||
((klass), LD_TYPE_DIAGRAM_SYMBOL))
|
LdDiagramSymbolClass))
|
||||||
#define LD_DIAGRAM_SYMBOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
|
#define LD_IS_DIAGRAM_SYMBOL(obj) \
|
||||||
((obj), LD_DIAGRAM_SYMBOL, LdDiagramSymbolClass))
|
(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 _LdDiagramSymbol LdDiagramSymbol;
|
||||||
typedef struct _LdDiagramSymbolPrivate LdDiagramSymbolPrivate;
|
typedef struct _LdDiagramSymbolPrivate LdDiagramSymbolPrivate;
|
||||||
|
@ -70,4 +74,3 @@ void ld_diagram_symbol_set_rotation (LdDiagramSymbol *self, gint rotation);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* ! __LD_DIAGRAM_SYMBOL_H__ */
|
#endif /* ! __LD_DIAGRAM_SYMBOL_H__ */
|
||||||
|
|
||||||
|
|
|
@ -1390,8 +1390,8 @@ move_selection (LdDiagramView *self, gdouble dx, gdouble dy)
|
||||||
static gboolean
|
static gboolean
|
||||||
is_object_selected (LdDiagramView *self, LdDiagramObject *object)
|
is_object_selected (LdDiagramView *self, LdDiagramObject *object)
|
||||||
{
|
{
|
||||||
return g_list_find (ld_diagram_get_selection (self->priv->diagram),
|
return g_list_find (ld_diagram_get_selection (self->priv->diagram), object)
|
||||||
object) != NULL;
|
!= NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -15,16 +15,18 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define LD_TYPE_DIAGRAM_VIEW (ld_diagram_view_get_type ())
|
#define LD_TYPE_DIAGRAM_VIEW (ld_diagram_view_get_type ())
|
||||||
#define LD_DIAGRAM_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST \
|
#define LD_DIAGRAM_VIEW(obj) \
|
||||||
((obj), LD_TYPE_DIAGRAM_VIEW, LdDiagramView))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_DIAGRAM_VIEW, LdDiagramView))
|
||||||
#define LD_DIAGRAM_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
|
#define LD_DIAGRAM_VIEW_CLASS(klass) \
|
||||||
((klass), LD_TYPE_DIAGRAM_VIEW, LdDiagramViewClass))
|
(G_TYPE_CHECK_CLASS_CAST ((klass), \
|
||||||
#define LD_IS_DIAGRAM_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
|
LD_TYPE_DIAGRAM_VIEW, \
|
||||||
((obj), LD_TYPE_DIAGRAM_VIEW))
|
LdDiagramViewClass))
|
||||||
#define LD_IS_DIAGRAM_VIEW_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_IS_DIAGRAM_VIEW(obj) \
|
||||||
((klass), LD_TYPE_DIAGRAM_VIEW))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_DIAGRAM_VIEW))
|
||||||
#define LD_DIAGRAM_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
|
#define LD_IS_DIAGRAM_VIEW_CLASS(klass) \
|
||||||
((obj), LD_DIAGRAM_VIEW, LdDiagramViewClass))
|
(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 _LdDiagramView LdDiagramView;
|
||||||
typedef struct _LdDiagramViewPrivate LdDiagramViewPrivate;
|
typedef struct _LdDiagramViewPrivate LdDiagramViewPrivate;
|
||||||
|
|
|
@ -15,16 +15,15 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define LD_TYPE_DIAGRAM (ld_diagram_get_type ())
|
#define LD_TYPE_DIAGRAM (ld_diagram_get_type ())
|
||||||
#define LD_DIAGRAM(obj) (G_TYPE_CHECK_INSTANCE_CAST \
|
#define LD_DIAGRAM(obj) \
|
||||||
((obj), LD_TYPE_DIAGRAM, LdDiagram))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_DIAGRAM, LdDiagram))
|
||||||
#define LD_DIAGRAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
|
#define LD_DIAGRAM_CLASS(klass) \
|
||||||
((klass), LD_TYPE_DIAGRAM, LdDiagramClass))
|
(G_TYPE_CHECK_CLASS_CAST ((klass), LD_TYPE_DIAGRAM, LdDiagramClass))
|
||||||
#define LD_IS_DIAGRAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_IS_DIAGRAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_DIAGRAM))
|
||||||
((obj), LD_TYPE_DIAGRAM))
|
#define LD_IS_DIAGRAM_CLASS(klass) \
|
||||||
#define LD_IS_DIAGRAM_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
|
(G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_DIAGRAM))
|
||||||
((klass), LD_TYPE_DIAGRAM))
|
#define LD_DIAGRAM_GET_CLASS(obj) \
|
||||||
#define LD_DIAGRAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), LD_DIAGRAM, LdDiagramClass))
|
||||||
((obj), LD_DIAGRAM, LdDiagramClass))
|
|
||||||
|
|
||||||
typedef struct _LdDiagram LdDiagram;
|
typedef struct _LdDiagram LdDiagram;
|
||||||
typedef struct _LdDiagramClass LdDiagramClass;
|
typedef struct _LdDiagramClass LdDiagramClass;
|
||||||
|
@ -114,4 +113,3 @@ void ld_diagram_unselect_all (LdDiagram *self);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* ! __LD_DIAGRAM_H__ */
|
#endif /* ! __LD_DIAGRAM_H__ */
|
||||||
|
|
||||||
|
|
|
@ -427,4 +427,3 @@ ld_library_get_root (LdLibrary *self)
|
||||||
g_return_val_if_fail (LD_IS_LIBRARY (self), NULL);
|
g_return_val_if_fail (LD_IS_LIBRARY (self), NULL);
|
||||||
return self->priv->root;
|
return self->priv->root;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,16 +15,15 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define LD_TYPE_LIBRARY (ld_library_get_type ())
|
#define LD_TYPE_LIBRARY (ld_library_get_type ())
|
||||||
#define LD_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_CAST \
|
#define LD_LIBRARY(obj) \
|
||||||
((obj), LD_TYPE_LIBRARY, LdLibrary))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_LIBRARY, LdLibrary))
|
||||||
#define LD_LIBRARY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
|
#define LD_LIBRARY_CLASS(klass) \
|
||||||
((klass), LD_TYPE_LIBRARY, LdLibraryClass))
|
(G_TYPE_CHECK_CLASS_CAST ((klass), LD_TYPE_LIBRARY, LdLibraryClass))
|
||||||
#define LD_IS_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_IS_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_LIBRARY))
|
||||||
((obj), LD_TYPE_LIBRARY))
|
#define LD_IS_LIBRARY_CLASS(klass) \
|
||||||
#define LD_IS_LIBRARY_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
|
(G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_LIBRARY))
|
||||||
((klass), LD_TYPE_LIBRARY))
|
#define LD_LIBRARY_GET_CLASS(obj) \
|
||||||
#define LD_LIBRARY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), LD_LIBRARY, LdLibraryClass))
|
||||||
((obj), LD_LIBRARY, LdLibraryClass))
|
|
||||||
|
|
||||||
typedef struct _LdLibrary LdLibrary;
|
typedef struct _LdLibrary LdLibrary;
|
||||||
typedef struct _LdLibraryPrivate LdLibraryPrivate;
|
typedef struct _LdLibraryPrivate LdLibraryPrivate;
|
||||||
|
@ -66,4 +65,3 @@ LdCategory *ld_library_get_root (LdLibrary *self);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* ! __LD_LIBRARY_H__ */
|
#endif /* ! __LD_LIBRARY_H__ */
|
||||||
|
|
||||||
|
|
|
@ -23,4 +23,3 @@ void ld_lua_private_draw (LdLua *self, LdLuaSymbol *symbol, cairo_t *cr);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* ! __LD_LUA_PRIVATE_H__ */
|
#endif /* ! __LD_LUA_PRIVATE_H__ */
|
||||||
|
|
||||||
|
|
|
@ -37,4 +37,3 @@ struct _LdLuaSymbolPrivate
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* ! __LD_LUA_SYMBOL_PRIVATE_H__ */
|
#endif /* ! __LD_LUA_SYMBOL_PRIVATE_H__ */
|
||||||
|
|
||||||
|
|
|
@ -135,4 +135,3 @@ ld_lua_symbol_real_draw (LdSymbol *symbol, cairo_t *cr)
|
||||||
ld_lua_private_draw (self->priv->lua, self, cr);
|
ld_lua_private_draw (self->priv->lua, self, cr);
|
||||||
cairo_restore (cr);
|
cairo_restore (cr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,16 +15,16 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define LD_TYPE_LUA_SYMBOL (ld_lua_symbol_get_type ())
|
#define LD_TYPE_LUA_SYMBOL (ld_lua_symbol_get_type ())
|
||||||
#define LD_LUA_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_CAST \
|
#define LD_LUA_SYMBOL(obj) \
|
||||||
((obj), LD_TYPE_LUA_SYMBOL, LdLuaSymbol))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_LUA_SYMBOL, LdLuaSymbol))
|
||||||
#define LD_LUA_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
|
#define LD_LUA_SYMBOL_CLASS(klass) \
|
||||||
((klass), LD_TYPE_LUA_SYMBOL, LdLuaSymbolClass))
|
(G_TYPE_CHECK_CLASS_CAST ((klass), LD_TYPE_LUA_SYMBOL, LdLuaSymbolClass))
|
||||||
#define LD_IS_LUA_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_IS_LUA_SYMBOL(obj) \
|
||||||
((obj), LD_TYPE_LUA_SYMBOL))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_LUA_SYMBOL))
|
||||||
#define LD_IS_LUA_SYMBOL_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_IS_LUA_SYMBOL_CLASS(klass) \
|
||||||
((klass), LD_TYPE_LUA_SYMBOL))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_LUA_SYMBOL))
|
||||||
#define LD_LUA_SYMBOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
|
#define LD_LUA_SYMBOL_GET_CLASS(obj) \
|
||||||
((obj), LD_LUA_SYMBOL, LdLuaSymbolClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), LD_LUA_SYMBOL, LdLuaSymbolClass))
|
||||||
|
|
||||||
typedef struct _LdLuaSymbol LdLuaSymbol;
|
typedef struct _LdLuaSymbol LdLuaSymbol;
|
||||||
typedef struct _LdLuaSymbolPrivate LdLuaSymbolPrivate;
|
typedef struct _LdLuaSymbolPrivate LdLuaSymbolPrivate;
|
||||||
|
@ -57,4 +57,3 @@ GType ld_lua_symbol_get_type (void) G_GNUC_CONST;
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* ! __LD_LUA_SYMBOL_H__ */
|
#endif /* ! __LD_LUA_SYMBOL_H__ */
|
||||||
|
|
||||||
|
|
|
@ -187,8 +187,7 @@ ld_lua_init (LdLua *self)
|
||||||
lua_State *L;
|
lua_State *L;
|
||||||
LdLuaData *ud;
|
LdLuaData *ud;
|
||||||
|
|
||||||
self->priv = G_TYPE_INSTANCE_GET_PRIVATE
|
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, LD_TYPE_LUA, LdLuaPrivate);
|
||||||
(self, LD_TYPE_LUA, LdLuaPrivate);
|
|
||||||
|
|
||||||
L = self->priv->L = lua_newstate (ld_lua_alloc, NULL);
|
L = self->priv->L = lua_newstate (ld_lua_alloc, NULL);
|
||||||
g_return_if_fail (L != NULL);
|
g_return_if_fail (L != NULL);
|
||||||
|
@ -465,8 +464,7 @@ ld_lua_logdiag_register (lua_State *L)
|
||||||
lua_insert (L, -2);
|
lua_insert (L, -2);
|
||||||
lua_concat (L, 2);
|
lua_concat (L, 2);
|
||||||
|
|
||||||
g_warning ("Lua symbol registration failed: %s",
|
g_warning ("Lua symbol registration failed: %s", lua_tostring (L, -1));
|
||||||
lua_tostring (L, -1));
|
|
||||||
lua_pushboolean (L, FALSE);
|
lua_pushboolean (L, FALSE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -861,4 +859,3 @@ LD_LUA_CAIRO_BEGIN (show_text)
|
||||||
|
|
||||||
g_object_unref (layout);
|
g_object_unref (layout);
|
||||||
LD_LUA_CAIRO_END (0)
|
LD_LUA_CAIRO_END (0)
|
||||||
|
|
||||||
|
|
|
@ -15,16 +15,14 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define LD_TYPE_LUA (ld_lua_get_type ())
|
#define LD_TYPE_LUA (ld_lua_get_type ())
|
||||||
#define LD_LUA(obj) (G_TYPE_CHECK_INSTANCE_CAST \
|
#define LD_LUA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_LUA, LdLua))
|
||||||
((obj), LD_TYPE_LUA, LdLua))
|
#define LD_LUA_CLASS(klass) \
|
||||||
#define LD_LUA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
|
(G_TYPE_CHECK_CLASS_CAST ((klass), LD_TYPE_LUA, LdLuaClass))
|
||||||
((klass), LD_TYPE_LUA, LdLuaClass))
|
#define LD_IS_LUA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_LUA))
|
||||||
#define LD_IS_LUA(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_IS_LUA_CLASS(klass) \
|
||||||
((obj), LD_TYPE_LUA))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_LUA))
|
||||||
#define LD_IS_LUA_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_LUA_GET_CLASS(obj) \
|
||||||
((klass), LD_TYPE_LUA))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), LD_LUA, LdLuaClass))
|
||||||
#define LD_LUA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
|
|
||||||
((obj), LD_LUA, LdLuaClass))
|
|
||||||
|
|
||||||
typedef struct _LdLua LdLua;
|
typedef struct _LdLua LdLua;
|
||||||
typedef struct _LdLuaPrivate LdLuaPrivate;
|
typedef struct _LdLuaPrivate LdLuaPrivate;
|
||||||
|
@ -67,4 +65,3 @@ gboolean ld_lua_load_file (LdLua *self, const gchar *filename,
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* ! __LD_LUA_H__ */
|
#endif /* ! __LD_LUA_H__ */
|
||||||
|
|
||||||
|
|
|
@ -15,16 +15,15 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define LD_TYPE_SYMBOL (ld_symbol_get_type ())
|
#define LD_TYPE_SYMBOL (ld_symbol_get_type ())
|
||||||
#define LD_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_CAST \
|
#define LD_SYMBOL(obj) \
|
||||||
((obj), LD_TYPE_SYMBOL, LdSymbol))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_SYMBOL, LdSymbol))
|
||||||
#define LD_SYMBOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
|
#define LD_SYMBOL_CLASS(klass) \
|
||||||
((klass), LD_TYPE_SYMBOL, LdSymbolClass))
|
(G_TYPE_CHECK_CLASS_CAST ((klass), LD_TYPE_SYMBOL, LdSymbolClass))
|
||||||
#define LD_IS_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_IS_SYMBOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_SYMBOL))
|
||||||
((obj), LD_TYPE_SYMBOL))
|
#define LD_IS_SYMBOL_CLASS(klass) \
|
||||||
#define LD_IS_SYMBOL_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
|
(G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_SYMBOL))
|
||||||
((klass), LD_TYPE_SYMBOL))
|
#define LD_SYMBOL_GET_CLASS(obj) \
|
||||||
#define LD_SYMBOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), LD_SYMBOL, LdSymbolClass))
|
||||||
((obj), LD_SYMBOL, LdSymbolClass))
|
|
||||||
|
|
||||||
typedef struct _LdSymbol LdSymbol;
|
typedef struct _LdSymbol LdSymbol;
|
||||||
typedef struct _LdSymbolPrivate LdSymbolPrivate;
|
typedef struct _LdSymbolPrivate LdSymbolPrivate;
|
||||||
|
@ -72,4 +71,3 @@ void ld_symbol_draw (LdSymbol *self, cairo_t *cr);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* ! __LD_SYMBOL_H__ */
|
#endif /* ! __LD_SYMBOL_H__ */
|
||||||
|
|
||||||
|
|
|
@ -256,7 +256,8 @@ ld_point_array_remove (LdPointArray *self, gint pos, guint length)
|
||||||
*
|
*
|
||||||
* Change size of the array.
|
* 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);
|
g_return_if_fail (self != NULL);
|
||||||
|
|
||||||
|
|
|
@ -99,4 +99,3 @@ void ld_rectangle_extend (LdRectangle *self, gdouble border);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* ! __LD_TYPES_H__ */
|
#endif /* ! __LD_TYPES_H__ */
|
||||||
|
|
||||||
|
|
|
@ -84,9 +84,8 @@ ld_undo_action_finalize (GObject *gobject)
|
||||||
* Return value: a new #LdUndoAction object.
|
* Return value: a new #LdUndoAction object.
|
||||||
*/
|
*/
|
||||||
LdUndoAction *
|
LdUndoAction *
|
||||||
ld_undo_action_new (LdUndoActionFunc undo_func,
|
ld_undo_action_new (LdUndoActionFunc undo_func, LdUndoActionFunc redo_func,
|
||||||
LdUndoActionFunc redo_func, LdUndoActionFunc destroy_func,
|
LdUndoActionFunc destroy_func, gpointer user_data)
|
||||||
gpointer user_data)
|
|
||||||
{
|
{
|
||||||
LdUndoAction *self;
|
LdUndoAction *self;
|
||||||
|
|
||||||
|
|
|
@ -15,16 +15,16 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define LD_TYPE_UNDO_ACTION (ld_undo_action_get_type ())
|
#define LD_TYPE_UNDO_ACTION (ld_undo_action_get_type ())
|
||||||
#define LD_UNDO_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST \
|
#define LD_UNDO_ACTION(obj) \
|
||||||
((obj), LD_TYPE_UNDO_ACTION, LdUndoAction))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_UNDO_ACTION, LdUndoAction))
|
||||||
#define LD_UNDO_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
|
#define LD_UNDO_ACTION_CLASS(klass) \
|
||||||
((klass), LD_TYPE_UNDO_ACTION, LdUndoActionClass))
|
(G_TYPE_CHECK_CLASS_CAST ((klass), LD_TYPE_UNDO_ACTION, LdUndoActionClass))
|
||||||
#define LD_IS_UNDO_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_IS_UNDO_ACTION(obj) \
|
||||||
((obj), LD_TYPE_UNDO_ACTION))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_UNDO_ACTION))
|
||||||
#define LD_IS_UNDO_ACTION_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_IS_UNDO_ACTION_CLASS(klass) \
|
||||||
((klass), LD_TYPE_UNDO_ACTION))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_UNDO_ACTION))
|
||||||
#define LD_UNDO_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
|
#define LD_UNDO_ACTION_GET_CLASS(obj) \
|
||||||
((obj), LD_UNDO_ACTION, LdUndoActionClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), LD_UNDO_ACTION, LdUndoActionClass))
|
||||||
|
|
||||||
typedef struct _LdUndoAction LdUndoAction;
|
typedef struct _LdUndoAction LdUndoAction;
|
||||||
typedef struct _LdUndoActionPrivate LdUndoActionPrivate;
|
typedef struct _LdUndoActionPrivate LdUndoActionPrivate;
|
||||||
|
@ -73,4 +73,3 @@ void ld_undo_action_redo (LdUndoAction *self);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* ! __LD_UNDO_ACTION_H__ */
|
#endif /* ! __LD_UNDO_ACTION_H__ */
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,7 @@ static GtkActionEntry wm_action_entries[] =
|
||||||
G_CALLBACK (on_action_user_guide)},
|
G_CALLBACK (on_action_user_guide)},
|
||||||
{"About", GTK_STOCK_ABOUT, N_("_About"), NULL,
|
{"About", GTK_STOCK_ABOUT, N_("_About"), NULL,
|
||||||
N_("Show a dialog about this application"),
|
N_("Show a dialog about this application"),
|
||||||
G_CALLBACK (on_action_about)}
|
G_CALLBACK (on_action_about)},
|
||||||
};
|
};
|
||||||
|
|
||||||
static GtkToggleActionEntry wm_toggle_action_entries[] =
|
static GtkToggleActionEntry wm_toggle_action_entries[] =
|
||||||
|
|
|
@ -15,16 +15,16 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define LD_TYPE_WINDOW_MAIN (ld_window_main_get_type ())
|
#define LD_TYPE_WINDOW_MAIN (ld_window_main_get_type ())
|
||||||
#define LD_WINDOW_MAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST \
|
#define LD_WINDOW_MAIN(obj) \
|
||||||
((obj), LD_TYPE_WINDOW_MAIN, LdWindowMain))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), LD_TYPE_WINDOW_MAIN, LdWindowMain))
|
||||||
#define LD_WINDOW_MAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
|
#define LD_WINDOW_MAIN_CLASS(klass) \
|
||||||
((klass), LD_TYPE_WINDOW_MAIN, LdWindowMainClass))
|
(G_TYPE_CHECK_CLASS_CAST ((klass), LD_TYPE_WINDOW_MAIN, LdWindowMainClass))
|
||||||
#define LD_IS_WINDOW_MAIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_IS_WINDOW_MAIN(obj) \
|
||||||
((obj), LD_TYPE_WINDOW_MAIN))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), LD_TYPE_WINDOW_MAIN))
|
||||||
#define LD_IS_WINDOW_MAIN_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
|
#define LD_IS_WINDOW_MAIN_CLASS(klass) \
|
||||||
((klass), LD_TYPE_WINDOW_MAIN))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((klass), LD_TYPE_WINDOW_MAIN))
|
||||||
#define LD_WINDOW_MAIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
|
#define LD_WINDOW_MAIN_GET_CLASS(obj) \
|
||||||
((obj), LD_WINDOW_MAIN, LdWindowMainClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), LD_WINDOW_MAIN, LdWindowMainClass))
|
||||||
|
|
||||||
typedef struct _LdWindowMain LdWindowMain;
|
typedef struct _LdWindowMain LdWindowMain;
|
||||||
typedef struct _LdWindowMainPrivate LdWindowMainPrivate;
|
typedef struct _LdWindowMainPrivate LdWindowMainPrivate;
|
||||||
|
@ -53,4 +53,3 @@ GtkWidget *ld_window_main_new (const gchar *filename);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* ! __LD_WINDOW_MAIN_H__ */
|
#endif /* ! __LD_WINDOW_MAIN_H__ */
|
||||||
|
|
||||||
|
|
|
@ -175,4 +175,3 @@ main (int argc, char *argv[])
|
||||||
gtk_main ();
|
gtk_main ();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue