Merge lp://staging/~smspillaz/compiz-libcompizconfig/refactor-context into lp://staging/~compiz-team/compiz-libcompizconfig/0.9.8
Status: | Superseded |
---|---|
Proposed branch: | lp://staging/~smspillaz/compiz-libcompizconfig/refactor-context |
Merge into: | lp://staging/~compiz-team/compiz-libcompizconfig/0.9.8 |
Prerequisite: | lp://staging/~smspillaz/compiz-libcompizconfig/ccs-object |
Diff against target: |
882 lines (+339/-96) 6 files modified
backend/src/ini.c (+2/-2) include/ccs.h (+52/-12) plugin/ccp/src/ccp.cpp (+6/-9) src/ccs-private.h (+12/-1) src/compiz.cpp (+15/-5) src/main.c (+252/-67) |
To merge this branch: | bzr merge lp://staging/~smspillaz/compiz-libcompizconfig/refactor-context |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alan Griffiths | Pending | ||
Review via email: mp+104469@code.staging.launchpad.net |
This proposal supersedes a proposal from 2012-04-29.
Description of the change
This is all about bug 990690.
!! - It probably isn't a good idea to test this branch in isolation, as it is part of a pipeline to get compiz-
lp:~smspillaz/compiz-libcompizconfig/setting-mock
lp:~smspillaz/compiz-compizconfig-python/compiz-compizconfig-python.setting-api
lp:~smspillaz/compiz-compizconfig-gconf/compiz-compizconfig-gconf.adapt-to-new-interfaces
.. that's all !!
Refactors CCSContext to indirect all variables behind a private ptr
Unmerged revisions
- 442. By Sam Spilsbury
-
Merged ccs-object into refactor-context.
- 441. By Sam Spilsbury
-
Merged ccs-object into refactor-context.
- 440. By Sam Spilsbury
-
Merged ccs-object into refactor-context.
- 439. By Sam Spilsbury
-
Merged ccs-object into refactor-context.
- 438. By Sam Spilsbury
-
Merged ccs-object into refactor-context.
- 437. By Sam Spilsbury
-
Merged ccs-object into refactor-context.
- 436. By Sam Spilsbury
-
Merged ccs-object into refactor-context.
- 435. By Sam Spilsbury
-
Merged ccs-object into refactor-context.
- 434. By Sam Spilsbury
-
Merged ccs-object into refactor-context.
- 433. By Sam Spilsbury
-
Merged ccs-object into refactor-context.
There's not much point to a structure that only contains a void pointer.
The pattern I'd expect is:
// *.h ugins(CCSContex t*); oy(CCSContext* );
typedef struct CCSContext CCSContext;
CCSContext* ccsContextCreate();
CCSPluginList ccsContextGetPl
...
void ccsContextDestr
// *.cpp tegory *categories; /* list of plugin categories */
struct CCSContext
{
CCSBackend *backend;
CCSPluginList plugins; /* list of plugins settings were loaded for */
CCSPluginCa
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 */ uginsDefault (CCSContext* context)
const CCSInterfaceTable *object_interfaces;
const CCSContextInterface *interface;
} CCSContextPrivate;
...
CCSPluginList
ccsContextGetPl
{
return context->plugins;
}
...
Maybe there is a reason for the extra complexity? But it escapes me.