ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=b2a18b6db77d121a137c6db271d4a5baa2883484

commit b2a18b6db77d121a137c6db271d4a5baa2883484
Author: Andy Williams <a...@andywilliams.me>
Date:   Thu Feb 26 13:54:46 2015 +0000

    elm_code: Move parser callbacks to private.
    
    Don't expose the internal callback mechanics, just the addition of parsers
---
 elm_code/src/lib/elm_code_file.c    |  4 ++--
 elm_code/src/lib/elm_code_parse.c   | 13 ++++++++-----
 elm_code/src/lib/elm_code_parse.h   |  4 ----
 elm_code/src/lib/elm_code_private.h |  6 ++++++
 4 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/elm_code/src/lib/elm_code_file.c b/elm_code/src/lib/elm_code_file.c
index cc24dcd..e5a56ac 100644
--- a/elm_code/src/lib/elm_code_file.c
+++ b/elm_code/src/lib/elm_code_file.c
@@ -44,7 +44,7 @@ static void _elm_code_file_line_append_data(Elm_Code_File 
*file, const char *con
 
    if (file->parent)
      {
-        elm_code_parse_line(file->parent, line);
+        _elm_code_parse_line(file->parent, line);
         elm_code_callback_fire(file->parent, &ELM_CODE_EVENT_LINE_LOAD_DONE, 
line);
 
         // this is called so we can refresh after any styling changes from 
LOAD_DONE
@@ -100,7 +100,7 @@ EAPI Elm_Code_File *elm_code_file_open(Elm_Code *code, 
const char *path)
 
    if (ret->parent)
      {
-        elm_code_parse_file(ret->parent, ret);
+        _elm_code_parse_file(ret->parent, ret);
         elm_code_callback_fire(ret->parent, &ELM_CODE_EVENT_FILE_LOAD_DONE, 
ret);
      }
    return ret;
diff --git a/elm_code/src/lib/elm_code_parse.c 
b/elm_code/src/lib/elm_code_parse.c
index 0503aa0..30ff948 100644
--- a/elm_code/src/lib/elm_code_parse.c
+++ b/elm_code/src/lib/elm_code_parse.c
@@ -6,7 +6,8 @@
 
 #include "elm_code_private.h"
 
-EAPI void elm_code_parse_line(Elm_Code *code, Elm_Code_Line *line)
+void
+_elm_code_parse_line(Elm_Code *code, Elm_Code_Line *line)
 {
    Elm_Code_Parser *parser;
    Eina_List *item;
@@ -17,7 +18,8 @@ EAPI void elm_code_parse_line(Elm_Code *code, Elm_Code_Line 
*line)
      }
 }
 
-EAPI void elm_code_parse_file(Elm_Code *code, Elm_Code_File *file)
+void
+_elm_code_parse_file(Elm_Code *code, Elm_Code_File *file)
 {
    Elm_Code_Parser *parser;
    Eina_List *item;
@@ -28,9 +30,10 @@ EAPI void elm_code_parse_file(Elm_Code *code, Elm_Code_File 
*file)
      }
 }
 
-EAPI void elm_code_parser_add(Elm_Code *code,
-                              void (*parse_line)(Elm_Code_Line *),
-                              void (*parse_file)(Elm_Code_File *))
+EAPI void
+elm_code_parser_add(Elm_Code *code,
+                    void (*parse_line)(Elm_Code_Line *),
+                    void (*parse_file)(Elm_Code_File *))
 {
    Elm_Code_Parser *parser;
 
diff --git a/elm_code/src/lib/elm_code_parse.h 
b/elm_code/src/lib/elm_code_parse.h
index 1c58d27..d52c688 100644
--- a/elm_code/src/lib/elm_code_parse.h
+++ b/elm_code/src/lib/elm_code_parse.h
@@ -30,10 +30,6 @@ typedef struct _Elm_Code_Parser
 EAPI void elm_code_parser_add(Elm_Code *code, void (*parse_line)(Elm_Code_Line 
*),
                               void (*parse_file)(Elm_Code_File *));
 
-EAPI void elm_code_parse_line(Elm_Code *code, Elm_Code_Line *line);
-
-EAPI void elm_code_parse_file(Elm_Code *code, Elm_Code_File *file);
-
 /**
  * @}
  */
diff --git a/elm_code/src/lib/elm_code_private.h 
b/elm_code/src/lib/elm_code_private.h
index 854d4b6..af862dc 100644
--- a/elm_code/src/lib/elm_code_private.h
+++ b/elm_code/src/lib/elm_code_private.h
@@ -38,3 +38,9 @@ typedef struct
    Eina_Bool editable, focussed;
    Eina_Bool show_line_numbers;
 } Elm_Code_Widget_Data;
+
+/* Private parser callbacks */
+
+void _elm_code_parse_line(Elm_Code *code, Elm_Code_Line *line);
+
+void _elm_code_parse_file(Elm_Code *code, Elm_Code_File *file);

-- 


Reply via email to