本文整理汇总了C++中compLogMessage函数的典型用法代码示例。如果您正苦于以下问题:C++ compLogMessage函数的具体用法?C++ compLogMessage怎么用?C++ compLogMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了compLogMessage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: pushPlugin
Bool
pushPlugin (CompPlugin *p)
{
if (findActivePlugin (p->vTable->name))
{
compLogMessage ("core", CompLogLevelWarn,
"Plugin '%s' already active",
p->vTable->name);
return FALSE;
}
p->next = plugins;
plugins = p;
if (!initPlugin (p))
{
compLogMessage ("core", CompLogLevelError,
"Couldn't activate plugin '%s'", p->vTable->name);
plugins = p->next;
return FALSE;
}
return TRUE;
}
开发者ID:noodlylight,项目名称:fusilli,代码行数:26,代码来源:plugin.c
示例2: groupCreateCairoLayer
/*
* groupCreateCairoLayer
*
*/
GroupCairoLayer*
groupCreateCairoLayer (CompScreen *s,
int width,
int height)
{
GroupCairoLayer *layer;
layer = malloc (sizeof (GroupCairoLayer));
if (!layer)
return NULL;
layer->surface = NULL;
layer->cairo = NULL;
layer->buffer = NULL;
layer->pixmap = None;
layer->animationTime = 0;
layer->state = PaintOff;
layer->texWidth = width;
layer->texHeight = height;
initTexture (s, &layer->texture);
layer->buffer = calloc (4 * width * height, sizeof (unsigned char));
if (!layer->buffer)
{
compLogMessage ("group", CompLogLevelError,
"Failed to allocate cairo layer buffer.");
groupDestroyCairoLayer (s, layer);
return NULL;
}
layer->surface = cairo_image_surface_create_for_data (layer->buffer,
CAIRO_FORMAT_ARGB32,
width, height,
4 * width);
if (cairo_surface_status (layer->surface) != CAIRO_STATUS_SUCCESS)
{
compLogMessage ("group", CompLogLevelError,
"Failed to create cairo layer surface.");
groupDestroyCairoLayer (s, layer);
return NULL;
}
layer->cairo = cairo_create (layer->surface);
if (cairo_status (layer->cairo) != CAIRO_STATUS_SUCCESS)
{
compLogMessage ("group", CompLogLevelError,
"Failed to create cairo layer context.");
groupDestroyCairoLayer (s, layer);
return NULL;
}
groupClearCairoLayer (layer);
return layer;
}
开发者ID:compiz-reloaded,项目名称:compiz-plugins-extra,代码行数:63,代码来源:cairo.c
示例3: compLogMessage
bool
StackDebugger::cmpStack (CompWindowList &windows,
CompWindowList &serverWindows,
bool verbose)
{
std::vector <Window> serverSideWindows;
CompWindowList::reverse_iterator lrrit = windows.rbegin ();
CompWindowList::reverse_iterator lsrit = mLastServerWindows.rbegin ();
unsigned int i = 0;
bool err = false;
for (unsigned int n = 0; n < mServerNChildren; n++)
{
if (std::find (mDestroyedFrames.begin (),
mDestroyedFrames.end (), mServerChildren[n])
== mDestroyedFrames.end ())
serverSideWindows.push_back (mServerChildren[n]);
}
if (verbose)
compLogMessage ("core", CompLogLevelDebug, "sent | recv | server |");
for (;(lrrit != windows.rend () ||
lsrit != mLastServerWindows.rend () ||
i != serverSideWindows.size ());)
{
Window lrXid = 0;
Window lsXid = 0;
Window sXid = 0;
if (lrrit != windows.rend ())
lrXid = (*lrrit)->priv->frame ? (*lrrit)->priv->frame : (*lrrit)->id ();
if (lsrit != mLastServerWindows.rend ())
lsXid = (*lsrit)->priv->frame ? (*lsrit)->priv->frame : (*lsrit)->id ();
if (i != serverSideWindows.size ())
sXid = serverSideWindows[serverSideWindows.size () - (i + 1)];
if (verbose)
compLogMessage ("core", CompLogLevelDebug, "id 0x%x id 0x%x id 0x%x %s",
(unsigned int) lsXid, (unsigned int) lrXid,
(unsigned int) sXid, (lrXid != sXid) ? " /!\\ " : "");
if (lrXid != sXid)
err = true;
if (lrrit != windows.rend ())
++lrrit;
if (lsrit != mLastServerWindows.rend())
++lsrit;
if (i != serverSideWindows.size ())
i++;
}
return err;
}
开发者ID:CannedFish,项目名称:deepin-compiz,代码行数:59,代码来源:stackdebugger.cpp
示例4: loadImages
static Bool
loadImages (CompScreen *s)
{
MAG_SCREEN (s);
if (!s->multiTexCoord2f)
return FALSE;
ms->overlay.loaded = readImageToTexture (s, &ms->overlay.tex,
magGetOverlay (s),
&ms->overlay.width,
&ms->overlay.height);
if (!ms->overlay.loaded)
{
compLogMessage ("mag", CompLogLevelWarn,
"Could not load magnifier overlay image \"%s\"!",
magGetOverlay (s));
return FALSE;
}
ms->mask.loaded = readImageToTexture (s, &ms->mask.tex,
magGetMask (s),
&ms->mask.width,
&ms->mask.height);
if (!ms->mask.loaded)
{
compLogMessage ("mag", CompLogLevelWarn,
"Could not load magnifier mask image \"%s\"!",
magGetOverlay (s));
ms->overlay.loaded = FALSE;
finiTexture (s, &ms->overlay.tex);
initTexture (s, &ms->overlay.tex);
return FALSE;
}
if (ms->overlay.width != ms->mask.width ||
ms->overlay.height != ms->mask.height)
{
compLogMessage ("mag", CompLogLevelWarn,
"Image dimensions do not match!");
ms->overlay.loaded = FALSE;
finiTexture (s, &ms->overlay.tex);
initTexture (s, &ms->overlay.tex);
ms->mask.loaded = FALSE;
finiTexture (s, &ms->mask.tex);
initTexture (s, &ms->mask.tex);
return FALSE;
}
return TRUE;
}
开发者ID:bhull2010,项目名称:compizfusion-plugins-main-packages,代码行数:53,代码来源:mag.c
示例5: initPlugin
static Bool
initPlugin (CompPlugin *p)
{
if (strcmp (p->vTable->name, "core") == 0)
return TRUE;
//InitPlugin
if (!(*p->vTable->init) (p))
{
compLogMessage ("core", CompLogLevelError,
"InitPlugin '%s' failed", p->vTable->name);
return FALSE;
}
//InitDisplay
if (p->vTable->initDisplay && !(*p->vTable->initDisplay) (p, &display))
{
compLogMessage ("core", CompLogLevelError,
"InitDisplay '%s' failed", p->vTable->name);
return FALSE;
}
//InitScreen
if (p->vTable->initScreen)
{
CompScreen *s;
for (s = display.screens; s; s = s->next)
{
if (!(*p->vTable->initScreen) (p, s))
{
compLogMessage ("core", CompLogLevelError,
"InitScreen '%s' failed", p->vTable->name);
return FALSE;
}
if (p->vTable->initWindow)
{
CompWindow *w;
for (w = s->windows; w; w = w->next)
{
if (!(*p->vTable->initWindow) (p, w))
{
compLogMessage ("core", CompLogLevelError,
"InitWindow '%s' failed", p->vTable->name);
return FALSE;
}
}
}
}
}
return TRUE;
}
开发者ID:noodlylight,项目名称:fusilli,代码行数:53,代码来源:plugin.c
示例6: initCore
CompBool initCore(void)
{
CompPlugin *corePlugin;
compObjectInit(&core.base, 0, COMP_OBJECT_TYPE_CORE);
core.displays = NULL;
core.tmpRegion = XCreateRegion();
if(!core.tmpRegion)
{
return FALSE;
}
core.outputRegion = XCreateRegion();
if(!core.outputRegion)
{
XDestroyRegion(core.tmpRegion);
return FALSE;
}
core.fileWatch = NULL;
core.lastFileWatchHandle = 1;
core.timeouts = NULL;
core.lastTimeoutHandle = 1;
core.watchFds = NULL;
core.lastWatchFdHandle = 1;
core.watchPollFds = NULL;
core.nWatchFds = 0;
gettimeofday(&core.lastTimeout, 0);
setCoreProcs();
corePlugin = loadPlugin("core");
if(!corePlugin)
{
compLogMessage("core", CompLogLevelFatal, "Couldn't load core plugin");
return FALSE;
}
if(!pushPlugin(corePlugin))
{
compLogMessage("core", CompLogLevelFatal, "Couldn't activate core plugin");
return FALSE;
}
return TRUE;
}
开发者ID:berylline,项目名称:compiz,代码行数:51,代码来源:core.c
示例7: mBuffer
CairoLayer::CairoLayer (const CompSize &size, GroupSelection *g) :
TextureLayer::TextureLayer (size, g),
mBuffer (NULL),
mSurface (NULL),
mCairo (NULL),
mFailed (true)
{
unsigned int bufSize = 4 * width () * height ();
mAnimationTime = 0;
mState = PaintOff;
mBuffer = new unsigned char[bufSize];
if (mBuffer)
{
mSurface = cairo_image_surface_create_for_data (mBuffer,
CAIRO_FORMAT_ARGB32,
width (),
height (),
4 * width ());
if (cairo_surface_status (mSurface) == CAIRO_STATUS_SUCCESS)
{
mCairo = cairo_create (mSurface);
if (cairo_status (mCairo) == CAIRO_STATUS_SUCCESS)
{
clear ();
mFailed = false;
}
else
{
compLogMessage ("group", CompLogLevelError,
"Failed to create cairo layer context.");
cairo_surface_destroy (mSurface);
delete[] mBuffer;
}
}
else
{
compLogMessage ("group", CompLogLevelError,
"Failed to create cairo layer surface");
delete[] mBuffer;
}
}
else
{
compLogMessage ("group", CompLogLevelError,
"Failed to allocate cairo layer buffer.");
}
}
开发者ID:hedmo,项目名称:compiz-plugins-extra,代码行数:51,代码来源:cairo.cpp
示例8: loadPlugin
CompPlugin *
loadPlugin (const char *name)
{
CompPlugin *p;
char *home, *plugindir;
Bool status;
compLogMessage("core", CompLogLevelInfo,
"Loading plugin: %s",
name);
p = malloc (sizeof (CompPlugin));
if (!p)
return 0;
p->next = 0;
p->dlhand = 0;
p->vTable = 0;
home = getenv ("HOME");
if (home)
{
plugindir = malloc (strlen (home) + strlen (HOME_PLUGINDIR) + 3);
if (plugindir)
{
sprintf (plugindir, "%s/%s", home, HOME_PLUGINDIR);
status = dlloaderLoadPlugin (p, plugindir, name);
free (plugindir);
if (status)
return p;
}
}
status = dlloaderLoadPlugin (p, PLUGINDIR, name);
if (status)
return p;
status = dlloaderLoadPlugin (p, NULL, name);
if (status)
return p;
compLogMessage ("core", CompLogLevelError,
"Couldn't load plugin '%s'", name);
free (p);
return 0;
}
开发者ID:noodlylight,项目名称:fusilli,代码行数:49,代码来源:plugin.c
示例9: mWidth
TextSurface::TextSurface () :
mWidth (0),
mHeight (0),
mPixmap (None),
cr (NULL),
surface (NULL),
layout (NULL),
format (NULL),
font (NULL),
scrn (NULL)
{
Display *dpy = screen->dpy ();
scrn = ScreenOfDisplay (dpy, screen->screenNum ());
if (!scrn)
{
compLogMessage ("text", CompLogLevelError,
"Couldn't get screen for %d.", screen->screenNum ());
return;
}
format = XRenderFindStandardFormat (dpy, PictStandardARGB32);
if (!format)
{
compLogMessage ("text", CompLogLevelError, "Couldn't get format.");
return;
}
if (!initCairo (1, 1))
return;
/* init pango */
layout = pango_cairo_create_layout (cr);
if (!layout)
{
compLogMessage ("text", CompLogLevelError,
"Couldn't create pango layout.");
return;
}
font = pango_font_description_new ();
if (!font)
{
compLogMessage ("text", CompLogLevelError,
"Couldn't create font description.");
return;
}
}
开发者ID:CannedFish,项目名称:deepin-compiz,代码行数:49,代码来源:text.cpp
示例10: minInit
static Bool
minInit (CompPlugin *p)
{
if (getCoreABI() != CORE_ABIVERSION)
{
compLogMessage ("minimize", CompLogLevelError,
"ABI mismatch\n"
"\tPlugin was compiled with ABI: %d\n"
"\tFusilli Core was compiled with ABI: %d\n",
CORE_ABIVERSION, getCoreABI());
return FALSE;
}
displayPrivateIndex = allocateDisplayPrivateIndex ();
if (displayPrivateIndex < 0)
return FALSE;
bananaIndex = bananaLoadPlugin ("minimize");
if (bananaIndex == -1)
return FALSE;
bananaAddChangeNotifyCallBack (bananaIndex, minChangeNotify);
return TRUE;
}
开发者ID:jordigh,项目名称:fusilli,代码行数:28,代码来源:minimize.c
示例11: windowInitPlugins
//run InitWindow(w) for every active plugin
Bool
windowInitPlugins (CompWindow *w)
{
CompPlugin *p;
int i, j = 0;
for (p = plugins; p; p = p->next)
j++;
while (j--)
{
i = 0;
for (p = plugins; i < j; p = p->next)
i++;
if (p->vTable->initWindow)
{
if (!(*p->vTable->initWindow) (p, w))
{
compLogMessage ("core", CompLogLevelError,
"InitWindow '%s' failed", p->vTable->name);
return FALSE;
}
}
}
return TRUE;
}
开发者ID:noodlylight,项目名称:fusilli,代码行数:29,代码来源:plugin.c
示例12: loadFragmentProgram
static int
loadFragmentProgram (CompScreen *s,
GLuint *program,
const char *string)
{
GLint errorPos;
/* clear errors */
glGetError ();
if (!*program)
(*s->genPrograms) (1, program);
(*s->bindProgram) (GL_FRAGMENT_PROGRAM_ARB, *program);
(*s->programString) (GL_FRAGMENT_PROGRAM_ARB,
GL_PROGRAM_FORMAT_ASCII_ARB,
strlen (string), string);
glGetIntegerv (GL_PROGRAM_ERROR_POSITION_ARB, &errorPos);
if (glGetError () != GL_NO_ERROR || errorPos != -1)
{
compLogMessage ("water", CompLogLevelError,
"failed to load bump map program");
(*s->deletePrograms) (1, program);
*program = 0;
return 0;
}
return 1;
}
开发者ID:SubwayDesktop,项目名称:compiz-stable,代码行数:32,代码来源:water.c
示例13: compAddMetadataFromFile
Bool
compAddMetadataFromFile (CompMetadata *metadata,
const char *file)
{
char *home;
Bool status = FALSE;
home = getenv ("HOME");
if (home)
{
char *path;
path = malloc (strlen (home) + strlen (HOME_METADATADIR) + 2);
if (path)
{
sprintf (path, "%s/%s", home, HOME_METADATADIR);
status |= addMetadataFromFilename (metadata, path, file);
free (path);
}
}
status |= addMetadataFromFilename (metadata, METADATADIR, file);
if (!status)
{
compLogMessage ("core", CompLogLevelWarn,
"Unable to parse XML metadata from file \"%s%s\"",
file, EXTENSION);
return FALSE;
}
return TRUE;
}
开发者ID:SubwayDesktop,项目名称:compiz-stable,代码行数:33,代码来源:metadata.c
示例14: compLogMessage
GLFramebufferObject *
GLFramebufferObject::bind ()
{
GLFramebufferObject *old = NULL;
if (priv->boundId != 0)
{
std::map<GLuint, GLFramebufferObject *>::iterator it;
it = PrivateGLFramebufferObject::idMap.find (priv->boundId);
if (it != PrivateGLFramebufferObject::idMap.end ())
old = it->second;
else
compLogMessage ("opengl", CompLogLevelError,
"An FBO without GLFramebufferObject cannot be restored");
}
(*GL::bindFramebuffer) (GL::FRAMEBUFFER, priv->fboId);
priv->boundId = priv->fboId;
(*GL::framebufferRenderbuffer) (GL::FRAMEBUFFER, GL::DEPTH_ATTACHMENT, GL::RENDERBUFFER, priv->rbStencilId);
(*GL::framebufferRenderbuffer) (GL::FRAMEBUFFER, GL::STENCIL_ATTACHMENT, GL::RENDERBUFFER, priv->rbStencilId);
return old;
}
开发者ID:CannedFish,项目名称:deepin-compiz,代码行数:25,代码来源:framebufferobject.cpp
示例15: compAddMetadataFromString
Bool
compAddMetadataFromString (CompMetadata *metadata,
const char *string)
{
xmlDoc **d, *doc;
doc = xmlReadMemory (string, strlen (string), NULL, NULL, 0);
if (!doc)
{
compLogMessage ("core", CompLogLevelWarn,
"Unable to parse XML metadata");
return FALSE;
}
d = realloc (metadata->doc, (metadata->nDoc + 1) * sizeof (xmlDoc *));
if (!d)
{
xmlFreeDoc (doc);
return FALSE;
}
d[metadata->nDoc++] = doc;
metadata->doc = d;
return TRUE;
}
开发者ID:SubwayDesktop,项目名称:compiz-stable,代码行数:27,代码来源:metadata.c
示例16: titleinfoInit
static Bool
titleinfoInit (CompPlugin *p)
{
if (getCoreABI() != CORE_ABIVERSION)
{
compLogMessage ("titleinfo", CompLogLevelError,
"ABI mismatch\n"
"\tPlugin was compiled with ABI: %d\n"
"\tFusilli Core was compiled with ABI: %d\n",
CORE_ABIVERSION, getCoreABI());
return FALSE;
}
displayPrivateIndex = allocateDisplayPrivateIndex ();
if (displayPrivateIndex < 0)
return FALSE;
bananaIndex = bananaLoadPlugin ("titleinfo");
if (bananaIndex == -1)
return FALSE;
return TRUE;
}
开发者ID:noodlylight,项目名称:fusilli,代码行数:26,代码来源:titleinfo.c
示例17: wsnamesInit
static Bool
wsnamesInit (CompPlugin *p)
{
if (getCoreABI() != CORE_ABIVERSION)
{
compLogMessage ("wsnames", CompLogLevelError,
"ABI mismatch\n"
"\tPlugin was compiled with ABI: %d\n"
"\tFusilli Core was compiled with ABI: %d\n",
CORE_ABIVERSION, getCoreABI());
return FALSE;
}
displayPrivateIndex = allocateDisplayPrivateIndex ();
if (displayPrivateIndex < 0)
return FALSE;
bananaIndex = bananaLoadPlugin ("wsnames");
if (bananaIndex == -1)
return FALSE;
bananaAddChangeNotifyCallBack (bananaIndex, wsnamesChangeNotify);
if (core.dbusConnection != NULL)
{
dbus_connection_register_object_path (core.dbusConnection,
"/org/fusilli/wsnames",
&wsnamesDbusMessagesVTable, 0);
}
return TRUE;
}
开发者ID:noodlylight,项目名称:fusilli,代码行数:35,代码来源:wsnames.c
示例18: compAddMetadataFromIO
Bool
compAddMetadataFromIO (CompMetadata *metadata,
xmlInputReadCallback ioread,
xmlInputCloseCallback ioclose,
void *ioctx)
{
xmlDoc **d, *doc;
doc = xmlReadIO (ioread, ioclose, ioctx, NULL, NULL, 0);
if (!doc)
{
compLogMessage ("core", CompLogLevelWarn,
"Unable to parse XML metadata");
return FALSE;
}
d = realloc (metadata->doc, (metadata->nDoc + 1) * sizeof (xmlDoc *));
if (!d)
{
xmlFreeDoc (doc);
return FALSE;
}
d[metadata->nDoc++] = doc;
metadata->doc = d;
return TRUE;
}
开发者ID:SubwayDesktop,项目名称:compiz-stable,代码行数:29,代码来源:metadata.c
示例19: dimWindow
/* Dim an (inactive) window. Place it on the passive list and
* update passiveNum. Then change the opacity.
*/
static void
dimWindow (CompWindow *w)
{
OPACIFY_SCREEN (w->screen);
if (os->passiveNum >= MAX_WINDOWS - 1)
{
compLogMessage ("opacify", CompLogLevelWarn,
"Trying to store information "
"about too many windows, or you hit a bug.\nIf "
"you don't have around %d windows blocking the "
"currently targeted window, please report this.",
MAX_WINDOWS);
return;
}
os->passive[os->passiveNum++] = w->id;
const BananaValue *
option_passive_opacity = bananaGetOption (bananaIndex,
"passive_opacity",
w->screen->screenNum);
setOpacity (w, MIN (OPAQUE * option_passive_opacity->i / 100,
w->paint.opacity));
}
开发者ID:jordigh,项目名称:fusilli,代码行数:29,代码来源:opacify.c
示例20: updateOptionSets
void
updateOptionSets (CompScreen *s,
AnimEvent e)
{
ANIM_SCREEN (s);
OptionSets *oss = &as->eventOptionSets[e];
CompListValue *listVal = &as->opt[customOptionOptionIds[e]].value.list;
int n = listVal->nValue;
if (oss->sets)
freeSingleEventOptionSets(oss);
oss->sets = calloc(n, sizeof(OptionSet));
if (!oss->sets)
{
compLogMessage ("animation", CompLogLevelError,
"Not enough memory");
return;
}
oss->nSets = n;
int i;
for (i = 0; i < n; i++)
updateOptionSet(s, &oss->sets[i], listVal->value[i].s);
}
开发者ID:bhull2010,项目名称:compizfusion-plugins-main-packages,代码行数:26,代码来源:options.c
注:本文中的compLogMessage函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论