edi - build with proper symbol export stuff

This commit is contained in:
Carsten Haitzler 2021-12-14 16:04:46 +00:00
parent 108e96685a
commit c4070229ff
2 changed files with 51 additions and 24 deletions

View File

@ -17,6 +17,33 @@
*/ */
#include <Eina.h> #include <Eina.h>
#ifdef EAPI
# undef EAPI
#endif
#ifdef _WIN32
# ifdef EFL_EDI_BUILD
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif /* ! DLL_EXPORT */
# else
# define EAPI __declspec(dllimport)
# endif /* ! EFL_EDI_BUILD */
#else
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else
# define EAPI
# endif
# else
# define EAPI
# endif
#endif /* ! _WIN32 */
#include <stdint.h> #include <stdint.h>
#include <unistd.h> #include <unistd.h>
@ -51,7 +78,7 @@ typedef struct _Edi_Proc_Stats
* *
* @return Pointer to object containing the process information or NULL if non-existent. * @return Pointer to object containing the process information or NULL if non-existent.
*/ */
Edi_Proc_Stats *edi_process_stats_by_pid(int pid); EAPI Edi_Proc_Stats *edi_process_stats_by_pid(int pid);
/** /**

View File

@ -102,7 +102,7 @@ typedef struct _Edi_Scm_Engine
* *
* @ingroup Scm * @ingroup Scm
*/ */
Edi_Scm_Engine *edi_scm_init(); EAPI Edi_Scm_Engine *edi_scm_init();
/** /**
* Init the SCM system for the specified path. * Init the SCM system for the specified path.
@ -118,7 +118,7 @@ EAPI Edi_Scm_Engine *edi_scm_init_path(const char *path);
* *
* @ingroup Scm * @ingroup Scm
*/ */
void edi_scm_shutdown(); EAPI void edi_scm_shutdown();
/** /**
* Set up a new git repository for the current project. * Set up a new git repository for the current project.
@ -160,7 +160,7 @@ EAPI int edi_scm_git_update(const char *dir);
* *
* @ingroup Scm * @ingroup Scm
*/ */
Edi_Scm_Engine *edi_scm_engine_get(void); EAPI Edi_Scm_Engine *edi_scm_engine_get(void);
/** /**
* Stage file for commit with SCM. * Stage file for commit with SCM.
@ -170,7 +170,7 @@ Edi_Scm_Engine *edi_scm_engine_get(void);
* *
* @ingroup Scm * @ingroup Scm
*/ */
int edi_scm_stage(const char *path); EAPI int edi_scm_stage(const char *path);
/** /**
* Unstage file from commit. * Unstage file from commit.
@ -180,7 +180,7 @@ int edi_scm_stage(const char *path);
* *
* @ingroup Scm * @ingroup Scm
*/ */
int edi_scm_unstage(const char *path); EAPI int edi_scm_unstage(const char *path);
/** /**
* Reset file changes to last commit state. * Reset file changes to last commit state.
@ -190,7 +190,7 @@ int edi_scm_unstage(const char *path);
* *
* @ingroup Scm * @ingroup Scm
*/ */
int edi_scm_undo(const char *path); EAPI int edi_scm_undo(const char *path);
/** /**
* Del file from those monitored by SCM. * Del file from those monitored by SCM.
@ -200,7 +200,7 @@ int edi_scm_undo(const char *path);
* *
* @ingroup Scm * @ingroup Scm
*/ */
int edi_scm_del(const char *path); EAPI int edi_scm_del(const char *path);
/** /**
* Set commit message for next commit to SCM. * Set commit message for next commit to SCM.
@ -209,21 +209,21 @@ int edi_scm_del(const char *path);
* *
* @ingroup Scm * @ingroup Scm
*/ */
void edi_scm_commit(const char *message); EAPI void edi_scm_commit(const char *message);
/** /**
* Get status of repository. * Get status of repository.
* *
* @ingroup Scm * @ingroup Scm
*/ */
void edi_scm_status(void); EAPI void edi_scm_status(void);
/** /**
* Get log of repository. * Get log of repository.
* *
* @ingroup Scm * @ingroup Scm
*/ */
Eina_List *edi_scm_log(void); EAPI Eina_List *edi_scm_log(void);
/** /**
* *
@ -234,14 +234,14 @@ Eina_List *edi_scm_log(void);
* *
* @ingroup Scm * @ingroup Scm
*/ */
Edi_Scm_Status_Code edi_scm_file_status(const char *path); EAPI Edi_Scm_Status_Code edi_scm_file_status(const char *path);
/** /**
* Get status of repository. * Get status of repository.
* *
* @return State whether a change was registered (true/false). * @return State whether a change was registered (true/false).
*/ */
Eina_Bool edi_scm_status_get(void); EAPI Eina_Bool edi_scm_status_get(void);
/** /**
* Get diff of changes in repository. * Get diff of changes in repository.
@ -250,7 +250,7 @@ Eina_Bool edi_scm_status_get(void);
* *
* @return diff output as a string. * @return diff output as a string.
*/ */
char *edi_scm_diff(Eina_Bool cached); EAPI char *edi_scm_diff(Eina_Bool cached);
/** /**
* Move from src to dest. * Move from src to dest.
@ -261,7 +261,7 @@ char *edi_scm_diff(Eina_Bool cached);
* @return The status code of command executed. * @return The status code of command executed.
* @ingroup Scm * @ingroup Scm
*/ */
int edi_scm_move(const char *src, const char *dest); EAPI int edi_scm_move(const char *src, const char *dest);
/** /**
* Set user credentials for the SCM system. * Set user credentials for the SCM system.
@ -273,28 +273,28 @@ int edi_scm_move(const char *src, const char *dest);
* *
* @ingroup Scm * @ingroup Scm
*/ */
int edi_scm_credentials_set(const char *user, const char *email); EAPI int edi_scm_credentials_set(const char *user, const char *email);
/** /**
* Push to SCM remote repository. * Push to SCM remote repository.
* *
* @ingroup Scm * @ingroup Scm
*/ */
void edi_scm_push(void); EAPI void edi_scm_push(void);
/** /**
* Pull from SCM remote repository. * Pull from SCM remote repository.
* *
* @ingroup Scm * @ingroup Scm
*/ */
void edi_scm_pull(void); EAPI void edi_scm_pull(void);
/** /**
* Stash local changes. * Stash local changes.
* *
* @ingroup Scm * @ingroup Scm
*/ */
void edi_scm_stash(void); EAPI void edi_scm_stash(void);
/** /**
* Set remote url for SCM. * Set remote url for SCM.
@ -305,7 +305,7 @@ void edi_scm_stash(void);
* *
* @ingroup Scm * @ingroup Scm
*/ */
int edi_scm_remote_add(const char *remote_url); EAPI int edi_scm_remote_add(const char *remote_url);
/** /**
* Test whether SCM is enabled for this project. * Test whether SCM is enabled for this project.
@ -314,7 +314,7 @@ int edi_scm_remote_add(const char *remote_url);
* *
* @ingroup Scm * @ingroup Scm
*/ */
Eina_Bool edi_scm_enabled(void); EAPI Eina_Bool edi_scm_enabled(void);
/** /**
* Test whether SCM has a remote enabled for this project. * Test whether SCM has a remote enabled for this project.
@ -323,7 +323,7 @@ Eina_Bool edi_scm_enabled(void);
* *
* @ingroup Scm * @ingroup Scm
*/ */
Eina_Bool edi_scm_remote_enabled(void); EAPI Eina_Bool edi_scm_remote_enabled(void);
/** /**
* Get the URL to an avatar image for the user (based on email). * Get the URL to an avatar image for the user (based on email).
@ -332,7 +332,7 @@ Eina_Bool edi_scm_remote_enabled(void);
* *
* @ingroup Scm * @ingroup Scm
*/ */
const char *edi_scm_avatar_url_get(const char *email); EAPI const char *edi_scm_avatar_url_get(const char *email);
/** /**
@ -342,7 +342,7 @@ const char *edi_scm_avatar_url_get(const char *email);
* *
* @ingroup Scm * @ingroup Scm
*/ */
const char *edi_scm_root_directory_get(void); EAPI const char *edi_scm_root_directory_get(void);
/** /**
* @} * @}