[dia/zbrown/test-build: 7/7] uml: GEnum-ify visibility etc




commit 0fb28daa2d0d3a2747f1e92d03dc8d9e58604233
Author: Zander Brown <zbrown gnome org>
Date:   Mon Sep 27 03:37:49 2021 +0100

    uml: GEnum-ify visibility etc
    
    Should be useful for experimenting with new property system

 objects/UML/association.c             |   6 +-
 objects/UML/class.c                   |  18 ++---
 objects/UML/class_attributes_dialog.c |  10 +--
 objects/UML/class_operations_dialog.c |  36 +++++-----
 objects/UML/meson.build               |   3 +
 objects/UML/uml.c                     |  14 ++--
 objects/UML/uml.h                     | 120 +++++++++++++++++++---------------
 objects/UML/umlattribute.c            |   2 +-
 objects/UML/umloperation.c            |  22 +++----
 objects/UML/umlparameter.c            |  26 ++++----
 objects/meson.build                   |   2 +-
 11 files changed, 137 insertions(+), 122 deletions(-)
---
diff --git a/objects/UML/association.c b/objects/UML/association.c
index 76a640996..6fe95946f 100644
--- a/objects/UML/association.c
+++ b/objects/UML/association.c
@@ -95,7 +95,7 @@ typedef struct _AssociationEnd {
   double multi_ascent;
   double multi_descent;
   DiaAlignment text_align;
-  UMLVisibility visibility;    /* This value is only relevant if role is not null */
+  DiaUmlVisibility visibility; /* This value is only relevant if role is not null */
 
   int arrow;
   AggregateType aggregate; /* Note: Can only be != NONE on ONE side! */
@@ -111,7 +111,7 @@ struct _AssociationState {
   struct {
     char *role;
     char *multiplicity;
-    UMLVisibility visibility;  /* This value is only relevant if role is not null */
+    DiaUmlVisibility visibility;       /* This value is only relevant if role is not null */
 
     int arrow;
     AggregateType aggregate;
@@ -853,7 +853,7 @@ association_create (Point   *startpoint,
     assoc->end[i].arrow = FALSE;
     assoc->end[i].aggregate = AGGREGATE_NONE;
     assoc->end[i].text_width = 0.0;
-    assoc->end[i].visibility = UML_IMPLEMENTATION;
+    assoc->end[i].visibility = DIA_UML_IMPLEMENTATION;
   }
 
   assoc->text_width = 0.0;
diff --git a/objects/UML/class.c b/objects/UML/class.c
index 95a42b8bb..f29bf2359 100644
--- a/objects/UML/class.c
+++ b/objects/UML/class.c
@@ -1068,15 +1068,15 @@ umlclass_draw_operationbox (UMLClass    *umlclass,
       real ascent;
 
       switch (op->inheritance_type) {
-        case UML_ABSTRACT:
+        case DIA_UML_ABSTRACT:
           font = umlclass->abstract_font;
           font_height = umlclass->abstract_font_height;
           break;
-        case UML_POLYMORPHIC:
+        case DIA_UML_POLYMORPHIC:
           font = umlclass->polymorphic_font;
           font_height = umlclass->polymorphic_font_height;
           break;
-        case UML_LEAF:
+        case DIA_UML_LEAF:
         default:
           font = umlclass->normal_font;
           font_height = umlclass->font_height;
@@ -1629,15 +1629,15 @@ umlclass_calculate_operation_data(UMLClass *umlclass)
 
       switch(op->inheritance_type)
       {
-         case UML_ABSTRACT:
+         case DIA_UML_ABSTRACT:
            Font       =  umlclass->abstract_font;
            FontHeight =  umlclass->abstract_font_height;
            break;
-         case UML_POLYMORPHIC:
+         case DIA_UML_POLYMORPHIC:
            Font       =  umlclass->polymorphic_font;
            FontHeight =  umlclass->polymorphic_font_height;
            break;
-         case UML_LEAF:
+         case DIA_UML_LEAF:
          default:
            Font       = umlclass->normal_font;
            FontHeight = umlclass->font_height;
@@ -1715,15 +1715,15 @@ umlclass_calculate_operation_data(UMLClass *umlclass)
       if (!(umlclass->wrap_operations && length > umlclass->wrap_after_char)) {
         switch(op->inheritance_type)
         {
-        case UML_ABSTRACT:
+        case DIA_UML_ABSTRACT:
           Font       =  umlclass->abstract_font;
           FontHeight =  umlclass->abstract_font_height;
           break;
-        case UML_POLYMORPHIC:
+        case DIA_UML_POLYMORPHIC:
           Font       =  umlclass->polymorphic_font;
           FontHeight =  umlclass->polymorphic_font_height;
           break;
-        case UML_LEAF:
+        case DIA_UML_LEAF:
         default:
           Font       = umlclass->normal_font;
           FontHeight = umlclass->font_height;
diff --git a/objects/UML/class_attributes_dialog.c b/objects/UML/class_attributes_dialog.c
index 322e7b65a..15f313861 100644
--- a/objects/UML/class_attributes_dialog.c
+++ b/objects/UML/class_attributes_dialog.c
@@ -345,7 +345,7 @@ visibility_changed (DiaOptionMenu *selector, UMLClass *umlclass)
   prop_dialog = umlclass->properties_dialog;
 
   if (get_current_attribute (prop_dialog, &attr, &iter)) {
-    attr->visibility = (UMLVisibility) dia_option_menu_get_active (selector);
+    attr->visibility = (DiaUmlVisibility) dia_option_menu_get_active (selector);
 
     update_attribute (prop_dialog, attr, &iter);
 
@@ -740,10 +740,10 @@ _attributes_create_page (GtkNotebook *notebook, UMLClass *umlclass)
                     "changed",
                     G_CALLBACK (visibility_changed),
                     umlclass);
-  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Public"), UML_PUBLIC);
-  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Private"), UML_PRIVATE);
-  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Protected"), UML_PROTECTED);
-  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Implementation"), UML_IMPLEMENTATION);
+  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Public"), DIA_UML_PUBLIC);
+  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Private"), DIA_UML_PRIVATE);
+  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Protected"), DIA_UML_PROTECTED);
+  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Implementation"), DIA_UML_IMPLEMENTATION);
   gtk_table_attach (GTK_TABLE (table), label, 0,1,4,5, GTK_FILL,0, 0,3);
   gtk_widget_show (label);
   gtk_widget_show (omenu);
diff --git a/objects/UML/class_operations_dialog.c b/objects/UML/class_operations_dialog.c
index 65e63e31b..16c574850 100644
--- a/objects/UML/class_operations_dialog.c
+++ b/objects/UML/class_operations_dialog.c
@@ -83,9 +83,9 @@ update_operation (UMLClassDialog *dialog,
   char *title;
 
   underline = op->class_scope ? PANGO_UNDERLINE_SINGLE : PANGO_UNDERLINE_NONE;
-  if (op->inheritance_type != UML_LEAF) {
+  if (op->inheritance_type != DIA_UML_LEAF) {
     italic = PANGO_STYLE_ITALIC;
-    if (op->inheritance_type == UML_ABSTRACT) {
+    if (op->inheritance_type == DIA_UML_ABSTRACT) {
       weight = 800;
     }
   }
@@ -194,7 +194,7 @@ parameters_clear_values (UMLClassDialog *prop_dialog)
   gtk_entry_set_text (prop_dialog->param_value, "");
   gtk_text_buffer_set_text (prop_dialog->param_comment_buffer, "", -1);
   dia_option_menu_set_active (DIA_OPTION_MENU (prop_dialog->param_kind),
-                              UML_UNDEF_KIND);
+                              DIA_UML_UNDEF_KIND);
 }
 
 
@@ -763,7 +763,7 @@ oper_visible_changed (DiaOptionMenu *selector, UMLClass *umlclass)
   prop_dialog = umlclass->properties_dialog;
 
   if (get_current_operation (prop_dialog, &op, &iter)) {
-    op->visibility = (UMLVisibility) dia_option_menu_get_active (selector);
+    op->visibility = (DiaUmlVisibility) dia_option_menu_get_active (selector);
 
     update_operation (prop_dialog, op, &iter);
 
@@ -782,7 +782,7 @@ oper_inheritance_changed (DiaOptionMenu *selector, UMLClass *umlclass)
   prop_dialog = umlclass->properties_dialog;
 
   if (get_current_operation (prop_dialog, &op, &iter)) {
-    op->inheritance_type = (UMLInheritanceType) dia_option_menu_get_active (selector);
+    op->inheritance_type = (DiaUmlInheritanceType) dia_option_menu_get_active (selector);
 
     update_operation (prop_dialog, op, &iter);
 
@@ -912,10 +912,10 @@ operations_data_create_hbox (UMLClass *umlclass)
                     "changed",
                     G_CALLBACK (oper_visible_changed),
                     umlclass);
-  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Public"), UML_PUBLIC);
-  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Private"), UML_PRIVATE);
-  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Protected"), UML_PROTECTED);
-  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Implementation"), UML_IMPLEMENTATION);
+  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Public"), DIA_UML_PUBLIC);
+  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Private"), DIA_UML_PRIVATE);
+  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Protected"), DIA_UML_PROTECTED);
+  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Implementation"), DIA_UML_IMPLEMENTATION);
 
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
                                        /* left, right, top, bottom */
@@ -930,9 +930,9 @@ operations_data_create_hbox (UMLClass *umlclass)
                     "changed",
                     G_CALLBACK (oper_inheritance_changed),
                     umlclass);
-  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Abstract"), UML_ABSTRACT);
-  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Polymorphic (virtual)"), UML_POLYMORPHIC);
-  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Leaf (final)"), UML_LEAF);
+  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Abstract"), DIA_UML_ABSTRACT);
+  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Polymorphic (virtual)"), DIA_UML_POLYMORPHIC);
+  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Leaf (final)"), DIA_UML_LEAF);
 
   gtk_table_attach (GTK_TABLE (table), label, 2,3,1,2, GTK_FILL,0, 0,0);
   gtk_table_attach (GTK_TABLE (table), omenu, 3,4,1,2, GTK_FILL | GTK_EXPAND,0, 0,2);
@@ -1236,7 +1236,7 @@ param_kind_changed (DiaOptionMenu *selector, UMLClass *umlclass)
   prop_dialog = umlclass->properties_dialog;
 
   if (get_current_parameter (prop_dialog, &param, &iter)) {
-    param->kind = (UMLParameterKind) dia_option_menu_get_active (selector);
+    param->kind = (DiaUmlParameterKind) dia_option_menu_get_active (selector);
 
     update_parameter (prop_dialog, param, &iter);
 
@@ -1337,11 +1337,11 @@ operations_parameters_data_create_vbox (UMLClass *umlclass)
                     "changed",
                     G_CALLBACK (param_kind_changed),
                     umlclass);
-  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Undefined"), UML_UNDEF_KIND);
-  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("In"), UML_IN);
-  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Out"), UML_OUT);
-  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("In & Out"), UML_INOUT);
-  dia_option_menu_set_active (DIA_OPTION_MENU (omenu), UML_UNDEF_KIND);
+  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Undefined"), DIA_UML_UNDEF_KIND);
+  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("In"), DIA_UML_IN);
+  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("Out"), DIA_UML_OUT);
+  dia_option_menu_add_item (DIA_OPTION_MENU (omenu), _("In & Out"), DIA_UML_INOUT);
+  dia_option_menu_set_active (DIA_OPTION_MENU (omenu), DIA_UML_UNDEF_KIND);
   gtk_table_attach (GTK_TABLE (table), omenu, 3,4,0,1, GTK_FILL, 0, 0,3);
 
   return vbox2;
diff --git a/objects/UML/meson.build b/objects/UML/meson.build
index 1ce9cb329..b8752c0c0 100644
--- a/objects/UML/meson.build
+++ b/objects/UML/meson.build
@@ -40,7 +40,10 @@ sources += gnome.compile_resources('dia-uml-resources', 'dia-uml.gresource.xml',
                                    source_dir : '.',
                                    c_name : 'dia_uml')
 
+sources += gnome.mkenums_simple('dia-uml-enums', sources: ['uml.h'])
+
 dia_object_desc += {
     'name': 'uml_objects',
     'sources': sources,
+    'inc': include_directories('.'),
 }
diff --git a/objects/UML/uml.c b/objects/UML/uml.c
index 089cf4423..aa65cf00c 100644
--- a/objects/UML/uml.c
+++ b/objects/UML/uml.c
@@ -98,17 +98,17 @@ dia_plugin_init(PluginInfo *info)
 
 
 PropEnumData _uml_visibilities[] = {
-  { N_("Public"), UML_PUBLIC },
-  { N_("Private"), UML_PRIVATE },
-  { N_("Protected"), UML_PROTECTED },
-  { N_("Implementation"), UML_IMPLEMENTATION },
+  { N_("Public"), DIA_UML_PUBLIC },
+  { N_("Private"), DIA_UML_PRIVATE },
+  { N_("Protected"), DIA_UML_PROTECTED },
+  { N_("Implementation"), DIA_UML_IMPLEMENTATION },
   { NULL, 0 }
 };
 
 PropEnumData _uml_inheritances[] = {
-  { N_("Abstract"), UML_ABSTRACT },
-  { N_("Polymorphic (virtual)"), UML_POLYMORPHIC },
-  { N_("Leaf (final)"), UML_LEAF },
+  { N_("Abstract"), DIA_UML_ABSTRACT },
+  { N_("Polymorphic (virtual)"), DIA_UML_POLYMORPHIC },
+  { N_("Leaf (final)"), DIA_UML_LEAF },
   { NULL, 0 }
 };
 
diff --git a/objects/UML/uml.h b/objects/UML/uml.h
index ecd9bdcc5..7da3e323d 100644
--- a/objects/UML/uml.h
+++ b/objects/UML/uml.h
@@ -18,74 +18,82 @@
 
 /** \file objects/UML/uml.h  Objects contained  in 'UML - Class' type also and helper functions */
 
-#ifndef UML_H
-#define UML_H
+#pragma once
 
 #include <glib.h>
 #include "intl.h"
 #include "connectionpoint.h"
 #include "dia_xml.h"
 
+G_BEGIN_DECLS
+
 typedef struct _UMLAttribute UMLAttribute;
 typedef struct _UMLOperation UMLOperation;
 typedef struct _UMLParameter UMLParameter;
 typedef struct _UMLFormalParameter UMLFormalParameter;
 
 /** the visibility (allowed acces) of (to) various UML sub elements */
-typedef enum _UMLVisibility {
-  UML_PUBLIC, /**< everyone can use it */
-  UML_PRIVATE, /**< only accessible inside the class itself */
-  UML_PROTECTED, /**< the class and its inheritants ca use this */
-  UML_IMPLEMENTATION /**< ?What's this? Means implementation decision */
-} UMLVisibility;
+typedef enum /*< enum >*/ {
+  DIA_UML_PUBLIC, /**< everyone can use it */
+  DIA_UML_PRIVATE, /**< only accessible inside the class itself */
+  DIA_UML_PROTECTED, /**< the class and its inheritants ca use this */
+  DIA_UML_IMPLEMENTATION /**< ?What's this? Means implementation decision */
+} DiaUmlVisibility;
 
 /** In some languages there are different kinds of class inheritances */
-typedef enum _UMLInheritanceType {
-  UML_ABSTRACT, /**< Pure virtual method: an object of this class cannot be instanciated */
-  UML_POLYMORPHIC, /**< Virtual method : could be reimplemented in derivated classes */
-  UML_LEAF /**< Final method: can't be redefined in subclasses */
-} UMLInheritanceType;
+typedef enum /*< enum >*/ {
+  DIA_UML_ABSTRACT, /**< Pure virtual method: an object of this class cannot be instanciated */
+  DIA_UML_POLYMORPHIC, /**< Virtual method : could be reimplemented in derivated classes */
+  DIA_UML_LEAF /**< Final method: can't be redefined in subclasses */
+} DiaUmlInheritanceType;
 
 /** describes the data flow between caller and callee */
-typedef enum _UMLParameterKind {
-  UML_UNDEF_KIND, /**< not defined */
-  UML_IN, /**< by value */
-  UML_OUT, /**< by ref, can be passed in uninitialized */
-  UML_INOUT /**< by ref */
-} UMLParameterKind;
+typedef enum /*< enum >*/ {
+  DIA_UML_UNDEF_KIND, /**< not defined */
+  DIA_UML_IN, /**< by value */
+  DIA_UML_OUT, /**< by ref, can be passed in uninitialized */
+  DIA_UML_INOUT /**< by ref */
+} DiaUmlParameterKind;
 
-typedef gchar * UMLStereotype;
+typedef char * UMLStereotype;
 
-/** \brief A list of UMLAttribute is contained in UMLClass
+/**
+ * UMLAttribute:
+ *
+ * A list of #UMLAttribute is contained in #UMLClass
  * Some would call them member variables ;)
  */
 struct _UMLAttribute {
-  gint internal_id; /**< Arbitrary integer to recognize attributes after
-                    * the user has shuffled them in the dialog. */
-  gchar *name; /**< the member variables name */
-  gchar *type; /**< the return value */
-  gchar *value; /**< default parameter : Can be NULL => No default value */
-  gchar *comment; /**< comment */
-  UMLVisibility visibility; /**< attributes visibility */
+  int internal_id; /**< Arbitrary integer to recognize attributes after
+                    * the user has shuffled them in the dialog. */
+  char *name; /**< the member variables name */
+  char *type; /**< the return value */
+  char *value; /**< default parameter : Can be NULL => No default value */
+  char *comment; /**< comment */
+  DiaUmlVisibility visibility; /**< attributes visibility */
   int abstract; /**< not sure if this applicable */
   int class_scope; /**< in C++ : static member */
 
-  ConnectionPoint* left_connection; /**< left */
-  ConnectionPoint* right_connection; /**< right */
+  ConnectionPoint *left_connection; /**< left */
+  ConnectionPoint *right_connection; /**< right */
 };
 
-/** \brief A list of UMLOperation is contained in UMLClass
+
+/**
+ * UMLOperation:
+ *
+ * A list of #UMLOperation is contained in #UMLClass
  * Some would call them member functions ;)
  */
 struct _UMLOperation {
-  gint internal_id; /**< Arbitrary integer to recognize operations after
-                    * the user has shuffled them in the dialog. */
-  gchar *name; /**< the function name */
-  gchar *type; /**< Return type, NULL => No return type */
-  gchar *comment; /**< comment */
+  int internal_id; /**< Arbitrary integer to recognize operations after
+                     * the user has shuffled them in the dialog. */
+  char *name; /**< the function name */
+  char *type; /**< Return type, NULL => No return type */
+  char *comment; /**< comment */
   UMLStereotype stereotype; /**< just some string */
-  UMLVisibility visibility; /**< allowed access */
-  UMLInheritanceType inheritance_type;
+  DiaUmlVisibility visibility; /**< allowed access */
+  DiaUmlInheritanceType inheritance_type;
   int query; /**< Do not modify the object, in C++ this is a const function */
   int class_scope;
   GList *parameters; /**< List of UMLParameter */
@@ -94,29 +102,36 @@ struct _UMLOperation {
   ConnectionPoint* right_connection; /**< right */
 
   gboolean needs_wrapping; /** Whether this operation needs wrapping */
-  gint wrap_indent; /** The amount of indentation in chars */
+  int wrap_indent; /** The amount of indentation in chars */
   GList *wrappos; /** Absolute wrapping positions */
-  real ascent; /** The ascent amount used for line distance in wrapping */
+  double ascent; /** The ascent amount used for line distance in wrapping */
 };
 
 
-/** \brief A list of UMLParameter is contained in UMLOperation
+/**
+ * UMLParameter:
+ *
+ * A list of #UMLParameter is contained in #UMLOperation
  * Some would call them functions parameters ;)
  */
 struct _UMLParameter {
-  gchar *name; /**<  name*/
-  gchar *type; /**< return value */
-  gchar *value; /**< Initialization,  can be NULL => No default value */
-  gchar *comment; /**< comment */
-  UMLParameterKind kind; /**< Not currently used */
+  char *name; /**<  name*/
+  char *type; /**< return value */
+  char *value; /**< Initialization,  can be NULL => No default value */
+  char *comment; /**< comment */
+  DiaUmlParameterKind kind; /**< Not currently used */
 };
 
-/** \brief A list of UMLFormalParameter is contained in UMLOperation
+
+/**
+ * UMLFormalParameter:
+ *
+ * A list of #UMLFormalParameter is contained in #UMLOperation
  * Some would call them template parameters ;)
  */
 struct _UMLFormalParameter {
-  gchar *name; /**< name */
-  gchar *type; /**< Can be NULL => Type parameter */
+  char *name; /**< name */
+  char *type; /**< Can be NULL => Type parameter */
 };
 
 /* Characters used to start/end stereotypes: */
@@ -188,9 +203,6 @@ void                uml_formal_parameter_write             (AttributeNode
                                                             UMLFormalParameter *param,
                                                             DiaContext         *ctx);
 /** calculated the 'formated' representation */
-gchar              *uml_formal_parameter_get_string        (UMLFormalParameter *parameter);
-
-
-
-#endif /* UML_H */
+char               *uml_formal_parameter_get_string        (UMLFormalParameter *parameter);
 
+G_END_DECLS
diff --git a/objects/UML/umlattribute.c b/objects/UML/umlattribute.c
index 212b6d1f7..229349438 100644
--- a/objects/UML/umlattribute.c
+++ b/objects/UML/umlattribute.c
@@ -83,7 +83,7 @@ uml_attribute_new (void)
   attr->type = NULL;
   attr->value = NULL;
   attr->comment = NULL;
-  attr->visibility = UML_PUBLIC;
+  attr->visibility = DIA_UML_PUBLIC;
   attr->abstract = FALSE;
   attr->class_scope = FALSE;
 #if 0 /* setup elsewhere */
diff --git a/objects/UML/umloperation.c b/objects/UML/umloperation.c
index daa5dc448..ba7c23a65 100644
--- a/objects/UML/umloperation.c
+++ b/objects/UML/umloperation.c
@@ -112,8 +112,8 @@ uml_operation_new (void)
   op->name = g_strdup ("");
   op->type = g_strdup ("");
   op->comment = g_strdup ("");
-  op->visibility = UML_PUBLIC;
-  op->inheritance_type = UML_LEAF;
+  op->visibility = DIA_UML_PUBLIC;
+  op->inheritance_type = DIA_UML_LEAF;
 
 #if 0 /* setup elsewhere */
   op->left_connection = g_new0(ConnectionPoint, 1);
@@ -248,7 +248,7 @@ uml_operation_write(AttributeNode attr_node, UMLOperation *op, DiaContext *ctx)
                  op->comment, ctx);
   /* Backward compatibility */
   data_add_boolean(composite_add_attribute(composite, "abstract"),
-                  op->inheritance_type == UML_ABSTRACT, ctx);
+                  op->inheritance_type == DIA_UML_ABSTRACT, ctx);
   data_add_enum(composite_add_attribute(composite, "inheritance_type"),
                op->inheritance_type, ctx);
   data_add_boolean(composite_add_attribute(composite, "query"),
@@ -300,16 +300,16 @@ uml_get_operation_string (UMLOperation *operation)
     list = g_list_next (list);
 
     switch (param->kind) {
-      case UML_IN:
+      case DIA_UML_IN:
         len += 3;
         break;
-      case UML_OUT:
+      case DIA_UML_OUT:
         len += 4;
         break;
-      case UML_INOUT:
+      case DIA_UML_INOUT:
         len += 6;
         break;
-      case UML_UNDEF_KIND:
+      case DIA_UML_UNDEF_KIND:
       default:
         break;
       }
@@ -359,16 +359,16 @@ uml_get_operation_string (UMLOperation *operation)
     list = g_list_next (list);
 
     switch (param->kind) {
-      case UML_IN:
+      case DIA_UML_IN:
         strcat (str, "in ");
         break;
-      case UML_OUT:
+      case DIA_UML_OUT:
         strcat (str, "out ");
         break;
-      case UML_INOUT:
+      case DIA_UML_INOUT:
         strcat (str, "inout ");
         break;
-      case UML_UNDEF_KIND:
+      case DIA_UML_UNDEF_KIND:
       default:
         break;
     }
diff --git a/objects/UML/umlparameter.c b/objects/UML/umlparameter.c
index 7525001b9..63e1893b8 100644
--- a/objects/UML/umlparameter.c
+++ b/objects/UML/umlparameter.c
@@ -29,10 +29,10 @@
 #include "properties.h"
 
 static PropEnumData _uml_parameter_kinds[] = {
-  { N_("Undefined"), UML_UNDEF_KIND} ,
-  { N_("In"), UML_IN },
-  { N_("Out"), UML_OUT },
-  { N_("In & Out"), UML_INOUT },
+  { N_("Undefined"), DIA_UML_UNDEF_KIND} ,
+  { N_("In"), DIA_UML_IN },
+  { N_("Out"), DIA_UML_OUT },
+  { N_("In & Out"), DIA_UML_INOUT },
   { NULL, 0 }
 };
 
@@ -79,7 +79,7 @@ uml_parameter_new (void)
   param->type = g_strdup ("");
   param->value = g_strdup ("");
   param->comment = g_strdup ("");
-  param->kind = UML_UNDEF_KIND;
+  param->kind = DIA_UML_UNDEF_KIND;
 
   return param;
 }
@@ -154,15 +154,15 @@ uml_parameter_get_string (UMLParameter *param)
   }
 
   switch (param->kind) {
-    case UML_UNDEF_KIND:
+    case DIA_UML_UNDEF_KIND:
       break;
-    case UML_IN:
+    case DIA_UML_IN:
       len += 3;
       break;
-    case UML_OUT:
+    case DIA_UML_OUT:
       len += 4;
       break;
-    case UML_INOUT:
+    case DIA_UML_INOUT:
       len += 6;
       break;
     default:
@@ -175,15 +175,15 @@ uml_parameter_get_string (UMLParameter *param)
   strcpy (str, "");
 
   switch (param->kind) {
-    case UML_UNDEF_KIND:
+    case DIA_UML_UNDEF_KIND:
       break;
-    case UML_IN:
+    case DIA_UML_IN:
       strcat (str, "in ");
       break;
-    case UML_OUT:
+    case DIA_UML_OUT:
       strcat (str, "out ");
       break;
-    case UML_INOUT:
+    case DIA_UML_INOUT:
       strcat (str, "inout ");
       break;
     default:
diff --git a/objects/meson.build b/objects/meson.build
index 05e83880c..90e38c85b 100644
--- a/objects/meson.build
+++ b/objects/meson.build
@@ -22,7 +22,7 @@ foreach o : dia_object_desc
     library(o.get('name'),
         o.get('sources') + [config_h],
         dependencies: [libc_dep, libgtk_dep, libxml_dep, libm_dep, libdia_dep] + o.get('extra_deps', []),
-        include_directories: [configuration_inc],
+        include_directories: [configuration_inc, o.get('inc', [])],
         install: true,
         install_dir: dialibdir,
         name_suffix: g_module_suffix,


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