> There's not much point to a structure that only contains a void pointer.
>
> The pattern I'd expect is:
>
> // *.h
> typedef struct CCSContext CCSContext;
> CCSContext* ccsContextCreate();
> CCSPluginList ccsContextGetPlugins(CCSContext*);
> ...
> void ccsContextDestroy(CCSContext*);
>
> // *.cpp
> struct CCSContext
> {
> CCSBackend *backend;
> CCSPluginList plugins; /* list of plugins settings were loaded for */
> CCSPluginCategory *categories; /* list of plugin categories */
> void *privatePtr; /* private pointer that can be used by the caller */
> char *profile;
> Bool deIntegration;
> Bool pluginListAutoSort;
>
> unsigned int configWatchId;
>
> CCSSettingList changedSettings; /* list of settings changed since last
> settings write */
>
> unsigned int screenNum; /* screen number this context is assigned to */
> const CCSInterfaceTable *object_interfaces;
> const CCSContextInterface *interface;
> } CCSContextPrivate;
Cut&past error - that should be "> };"
> ...
> CCSPluginList
> ccsContextGetPluginsDefault (CCSContext* context)
> {
> return context->plugins;
> }
> ...
>
> Maybe there is a reason for the extra complexity? But it escapes me.
> There's not much point to a structure that only contains a void pointer. ugins(CCSContex t*); oy(CCSContext* );
>
> The pattern I'd expect is:
>
> // *.h
> typedef struct CCSContext CCSContext;
> CCSContext* ccsContextCreate();
> CCSPluginList ccsContextGetPl
> ...
> void ccsContextDestr
>
> // *.cpp
> struct CCSContext
> {
> CCSBackend *backend;
> CCSPluginList plugins; /* list of plugins settings were loaded for */
> CCSPluginCategory *categories; /* list of plugin categories */
> void *privatePtr; /* private pointer that can be used by the caller */
> char *profile;
> Bool deIntegration;
> Bool pluginListAutoSort;
>
> unsigned int configWatchId;
>
> CCSSettingList changedSettings; /* list of settings changed since last
> settings write */
>
> unsigned int screenNum; /* screen number this context is assigned to */
> const CCSInterfaceTable *object_interfaces;
> const CCSContextInterface *interface;
> } CCSContextPrivate;
Cut&past error - that should be "> };"
> ... uginsDefault (CCSContext* context)
> CCSPluginList
> ccsContextGetPl
> {
> return context->plugins;
> }
> ...
>
> Maybe there is a reason for the extra complexity? But it escapes me.