• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ CLUTTER_NOTE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中CLUTTER_NOTE函数的典型用法代码示例。如果您正苦于以下问题:C++ CLUTTER_NOTE函数的具体用法?C++ CLUTTER_NOTE怎么用?C++ CLUTTER_NOTE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了CLUTTER_NOTE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: clutter_backend_egl_create_stage

static ClutterStageWindow *
clutter_backend_egl_create_stage (ClutterBackend  *backend,
                                  ClutterStage    *wrapper,
                                  GError         **error)
{
  ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (backend);
  ClutterStageX11 *stage_x11;
  ClutterStageWindow *stage;

  CLUTTER_NOTE (BACKEND, "Creating stage of type '%s'",
                g_type_name (CLUTTER_STAGE_TYPE));
  
  stage = g_object_new (CLUTTER_TYPE_STAGE_EGL, NULL);
  
  /* copy backend data into the stage */
  stage_x11 = CLUTTER_STAGE_X11 (stage);
  stage_x11->wrapper = wrapper;
  
  CLUTTER_NOTE (MISC, "EGLX stage created (display:%p, screen:%d, root:%u)",
                backend_x11->xdpy,
                backend_x11->xscreen_num,
                (unsigned int) backend_x11->xwin_root);
  
  return stage;
}
开发者ID:gramozeka,项目名称:GSB-NEW,代码行数:25,代码来源:clutter-backend-egl.c


示例2: clutter_backend_real_get_features

static ClutterFeatureFlags
clutter_backend_real_get_features (ClutterBackend *backend)
{
  ClutterFeatureFlags flags = 0;

  if (cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_MULTIPLE_ONSCREEN))
    {
      CLUTTER_NOTE (BACKEND, "Cogl supports multiple onscreen framebuffers");
      flags |= CLUTTER_FEATURE_STAGE_MULTIPLE;
    }
  else
    {
      CLUTTER_NOTE (BACKEND, "Cogl only supports one onscreen framebuffer");
      flags |= CLUTTER_FEATURE_STAGE_STATIC;
    }

  if (cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_SWAP_THROTTLE))
    {
      CLUTTER_NOTE (BACKEND, "Cogl supports swap buffers throttling");
      flags |= CLUTTER_FEATURE_SYNC_TO_VBLANK;
    }
  else
    CLUTTER_NOTE (BACKEND, "Cogl doesn't support swap buffers throttling");

  if (cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_SWAP_BUFFERS_EVENT))
    {
      CLUTTER_NOTE (BACKEND, "Cogl supports swap buffers complete events");
      flags |= CLUTTER_FEATURE_SWAP_EVENTS;
    }

  return flags;
}
开发者ID:kerrickstaley,项目名称:clutter-vala,代码行数:32,代码来源:clutter-backend.c


示例3: wait_for_vblank

static void
wait_for_vblank (ClutterBackendGLX *backend_glx)
{
  if (backend_glx->vblank_type == CLUTTER_VBLANK_NONE)
    return;

  if (backend_glx->wait_video_sync)
    {
      unsigned int retraceCount;

      CLUTTER_NOTE (BACKEND, "Waiting for vblank (wait_video_sync)");
      backend_glx->get_video_sync (&retraceCount);
      backend_glx->wait_video_sync (2,
                                    (retraceCount + 1) % 2,
                                    &retraceCount);
    }
  else
    {
#ifdef HAVE_DRM
      drm_wait_vblank_t blank;

      CLUTTER_NOTE (BACKEND, "Waiting for vblank (drm)");
      blank.request.type     = _DRM_VBLANK_RELATIVE;
      blank.request.sequence = 1;
      blank.request.signal   = 0;
      drm_wait_vblank (backend_glx->dri_fd, &blank);
#else
      CLUTTER_NOTE (BACKEND, "No vblank mechanism found");
#endif /* HAVE_DRM */
    }
}
开发者ID:rib,项目名称:clutter,代码行数:31,代码来源:clutter-stage-glx.c


示例4: set_foreign_window_callback

static void
set_foreign_window_callback (ClutterActor *actor,
                             void         *data)
{
  ForeignWindowData *fwd = data;

  CLUTTER_NOTE (BACKEND, "Setting foreign window (0x%x)",
                (guint) fwd->hwnd);

  if (fwd->destroy_old_hwnd && fwd->stage_win32->hwnd != NULL)
    {
      CLUTTER_NOTE (BACKEND, "Destroying previous window (0x%x)",
                    (guint) fwd->stage_win32->hwnd);
      DestroyWindow (fwd->stage_win32->hwnd);
    }

  fwd->stage_win32->hwnd = fwd->hwnd;
  fwd->stage_win32->is_foreign_win = TRUE;

  fwd->stage_win32->win_width = fwd->geom.width;
  fwd->stage_win32->win_height = fwd->geom.height;

  clutter_actor_set_size (actor, fwd->geom.width, fwd->geom.height);

  /* calling this with the stage unrealized will unset the stage
   * from the GL context; once the stage is realized the GL context
   * will be set again
   */
  clutter_stage_ensure_current (CLUTTER_STAGE (actor));
}
开发者ID:ChrisCummins,项目名称:clutter,代码行数:30,代码来源:clutter-stage-win32.c


示例5: _clutter_feature_init

gboolean
_clutter_feature_init (GError **error)
{
  ClutterMainContext *context;

  CLUTTER_NOTE (MISC, "checking features");

  if (!__features)
    {
      CLUTTER_NOTE (MISC, "allocating features data");
      __features = g_new0 (ClutterFeatures, 1);
      __features->features_set = FALSE; /* don't rely on zero-ing */
    }

  if (__features->features_set)
    return TRUE;

  context = _clutter_context_get_default ();

  /* makes sure we have a GL context; if we have, this is a no-op */
  if (!_clutter_backend_create_context (context->backend, error))
    return FALSE;

  __features->flags = (clutter_features_from_cogl (cogl_get_features ())
                    | _clutter_backend_get_features (context->backend));

  __features->features_set = TRUE;

  CLUTTER_NOTE (MISC, "features checked");

  return TRUE;
}
开发者ID:collinss,项目名称:muffin,代码行数:32,代码来源:clutter-feature.c


示例6: clutter_device_manager_win32_constructed

static void
clutter_device_manager_win32_constructed (GObject *gobject)
{
  ClutterDeviceManager *manager = CLUTTER_DEVICE_MANAGER (gobject);
  ClutterDeviceManagerWin32 *manager_win32;
  ClutterInputDevice *device;

  device = g_object_new (CLUTTER_TYPE_INPUT_DEVICE,
                         "id", 0,
                         "name", "Core Pointer",
                         "device-type", CLUTTER_POINTER_DEVICE,
                         "device-mode", CLUTTER_INPUT_MODE_MASTER,
                         "has-cursor", TRUE,
                         "enabled", TRUE,
                         NULL);
  CLUTTER_NOTE (BACKEND, "Added core pointer device");
  _clutter_device_manager_add_device (manager, device);

  device = g_object_new (CLUTTER_TYPE_INPUT_DEVICE,
                         "id", 1,
                         "name", "Core Keyboard",
                         "device-type", CLUTTER_KEYBOARD_DEVICE,
                         "device-mode", CLUTTER_INPUT_MODE_MASTER,
                         "enabled", TRUE,
                         NULL);
  CLUTTER_NOTE (BACKEND, "Added core keyboard device");
  _clutter_device_manager_add_device (manager, device);

  manager_win32 = CLUTTER_DEVICE_MANAGER_WIN32 (manager);

  _clutter_input_device_set_associated_device (manager_win32->core_pointer,
                                               manager_win32->core_keyboard);
  _clutter_input_device_set_associated_device (manager_win32->core_keyboard,
                                               manager_win32->core_pointer);
}
开发者ID:ChrisCummins,项目名称:clutter,代码行数:35,代码来源:clutter-device-manager-win32.c


示例7: clutter_backend_win32_get_features

ClutterFeatureFlags
clutter_backend_win32_get_features (ClutterBackend *backend)
{
  ClutterBackendClass *parent_class;
  ClutterFeatureFlags flags;

  parent_class = CLUTTER_BACKEND_CLASS (clutter_backend_win32_parent_class);

  flags = CLUTTER_FEATURE_STAGE_USER_RESIZE | CLUTTER_FEATURE_STAGE_CURSOR;

  if (cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_MULTIPLE_ONSCREEN))
    {
      CLUTTER_NOTE (BACKEND, "Cogl supports multiple onscreen framebuffers");
      flags |= CLUTTER_FEATURE_STAGE_MULTIPLE;
    }
  else
    {
      CLUTTER_NOTE (BACKEND, "Cogl only supports one onscreen framebuffer");
      flags |= CLUTTER_FEATURE_STAGE_STATIC;
    }

  if (cogl_clutter_winsys_has_feature (COGL_WINSYS_FEATURE_SWAP_THROTTLE))
    {
      CLUTTER_NOTE (BACKEND, "Cogl supports swap buffers throttling");
      flags |= CLUTTER_FEATURE_SYNC_TO_VBLANK;
    }
  else
    CLUTTER_NOTE (BACKEND, "Cogl doesn't support swap buffers throttling");

  CLUTTER_NOTE (BACKEND, "backend features checked");

  return flags;
}
开发者ID:spatulasnout,项目名称:clutter,代码行数:33,代码来源:clutter-backend-win32.c


示例8: clutter_backend_win32_dispose

static void
clutter_backend_win32_dispose (GObject *gobject)
{
  ClutterBackend *backend = CLUTTER_BACKEND (gobject);
  ClutterBackendWin32 *backend_win32 = CLUTTER_BACKEND_WIN32 (gobject);
  ClutterStageManager *stage_manager;

  CLUTTER_NOTE (BACKEND, "Disposing the of stages");
  stage_manager = clutter_stage_manager_get_default ();

  g_object_unref (stage_manager);

  CLUTTER_NOTE (BACKEND, "Removing the event source");
  _clutter_backend_win32_events_uninit (CLUTTER_BACKEND (backend_win32));

  /* Unrealize all shaders, since the GL context is going away */
  _clutter_shader_release_all ();

  G_OBJECT_CLASS (clutter_backend_win32_parent_class)->dispose (gobject);

  if (backend->cogl_context)
    {
      cogl_object_unref (backend->cogl_context);
      backend->cogl_context = NULL;
    }
}
开发者ID:spatulasnout,项目名称:clutter,代码行数:26,代码来源:clutter-backend-win32.c


示例9: notify_cb

static void
notify_cb (GObject          *object,
           GParamSpec       *param_spec,
           ClutterBehaviour *behave)
{
  ClutterBehaviourClass *klass;

  klass = CLUTTER_BEHAVIOUR_GET_CLASS (behave);

  CLUTTER_NOTE (BEHAVIOUR, "notify::alpha");

  /* no actors, we can stop right here */
  if (behave->priv->actors == NULL)
    return;

  if (klass->alpha_notify)
    {
      gdouble alpha_value = clutter_alpha_get_alpha (behave->priv->alpha);

      CLUTTER_NOTE (BEHAVIOUR, "calling %s::alpha_notify (%p, %.4f)",
                    g_type_name (G_TYPE_FROM_CLASS (klass)),
                    behave, alpha_value);

      klass->alpha_notify (behave, alpha_value);
    }
}
开发者ID:spatulasnout,项目名称:clutter,代码行数:26,代码来源:clutter-behaviour.c


示例10: _clutter_feature_init

void
_clutter_feature_init (void)
{
  ClutterMainContext *context;

  CLUTTER_NOTE (MISC, "checking features");

  if (!__features)
    {
      CLUTTER_NOTE (MISC, "allocating features data");
      __features = g_new0 (ClutterFeatures, 1);
      __features->features_set = FALSE; /* don't rely on zero-ing */
    }

  if (__features->features_set)
    return;

  context = _clutter_context_get_default ();

  __features->flags = (_clutter_features_from_cogl (cogl_get_features ())
                    | _clutter_backend_get_features (context->backend));

  __features->features_set = TRUE;

  CLUTTER_NOTE (MISC, "features checked");
}
开发者ID:Docworld,项目名称:chromiumos,代码行数:26,代码来源:clutter-feature.c


示例11: clutter_backend_glx_create_stage

static ClutterStageWindow *
clutter_backend_glx_create_stage (ClutterBackend  *backend,
                                  ClutterStage    *wrapper,
                                  GError         **error)
{
  ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (backend);
  ClutterStageWindow *stage_window;
  ClutterStageX11 *stage_x11;

  CLUTTER_NOTE (BACKEND, "Creating stage of type '%s'",
                g_type_name (CLUTTER_STAGE_TYPE));

  stage_window = g_object_new (CLUTTER_TYPE_STAGE_GLX, NULL);

  /* copy backend data into the stage */
  stage_x11 = CLUTTER_STAGE_X11 (stage_window);
  stage_x11->wrapper = wrapper;

  CLUTTER_NOTE (BACKEND,
                "GLX stage created[%p] (dpy:%p, screen:%d, root:%u, wrap:%p)",
                stage_window,
                backend_x11->xdpy,
                backend_x11->xscreen_num,
                (unsigned int) backend_x11->xwin_root,
                wrapper);

  return stage_window;
}
开发者ID:gramozeka,项目名称:GSB-NEW,代码行数:28,代码来源:clutter-backend-glx.c


示例12: clutter_glx_texture_pixmap_update_area

static void
clutter_glx_texture_pixmap_update_area (ClutterX11TexturePixmap *texture,
                                        gint                     x,
                                        gint                     y,
                                        gint                     width,
                                        gint                     height)
{
  ClutterGLXTexturePixmapPrivate       *priv;
  Display                              *dpy;


  CLUTTER_NOTE (TEXTURE, "Updating texture pixmap");

  priv = CLUTTER_GLX_TEXTURE_PIXMAP (texture)->priv;
  dpy = clutter_x11_get_default_display();

  if (!CLUTTER_ACTOR_IS_REALIZED (texture))
    return;

  if (priv->use_fallback)
    {
      CLUTTER_NOTE (TEXTURE, "Falling back to X11");
      parent_class->update_area (texture,
                                 x, y,
                                 width, height);
      return;
    }

  if (priv->glx_pixmap == None)
    return;

  if (texture_bind (CLUTTER_GLX_TEXTURE_PIXMAP(texture)))
    {
      CLUTTER_NOTE (TEXTURE, "Really updating via GLX");

      clutter_x11_trap_x_errors ();

      (_gl_bind_tex_image) (dpy,
                            priv->glx_pixmap,
                            GLX_FRONT_LEFT_EXT,
                            NULL);

      XSync (clutter_x11_get_default_display(), FALSE);

      /* Note above fires X error for non name pixmaps - but
       * things still seem to work - i.e pixmap updated
       */
      if (clutter_x11_untrap_x_errors ())
        CLUTTER_NOTE (TEXTURE, "Update bind_tex_image failed");

      priv->bound = TRUE;
    }
  else
    g_warning ("Failed to bind initial tex");

  if (CLUTTER_ACTOR_IS_VISIBLE (CLUTTER_ACTOR(texture)))
    clutter_actor_queue_redraw (CLUTTER_ACTOR(texture));

}
开发者ID:archlinuxarm-n900,项目名称:clutter08,代码行数:59,代码来源:clutter-glx-texture-pixmap.c


示例13: _clutter_backend_ensure_context

void
_clutter_backend_ensure_context (ClutterBackend *backend,
                                 ClutterStage   *stage)
{
  static ClutterStage *current_context_stage = NULL;
  ClutterBackendClass *klass;

  g_return_if_fail (CLUTTER_IS_BACKEND (backend));
  g_return_if_fail (CLUTTER_IS_STAGE (stage));

  if (current_context_stage != stage || !CLUTTER_ACTOR_IS_REALIZED (stage))
    {
      ClutterStage *new_stage = NULL;

      if (!CLUTTER_ACTOR_IS_REALIZED (stage))
        {
          new_stage = NULL;

          CLUTTER_NOTE (MULTISTAGE,
                        "Stage [%p] is not realized, unsetting the stage",
                        stage);
        }
      else
        {
          new_stage = stage;

          CLUTTER_NOTE (MULTISTAGE,
                        "Setting the new stage [%p]",
                        new_stage);
        }

      klass = CLUTTER_BACKEND_GET_CLASS (backend);
      if (G_LIKELY (klass->ensure_context))
        klass->ensure_context (backend, new_stage);
      
      /* FIXME: With a NULL stage and thus no active context it may make more
       * sense to clean the context but then re call with the default stage 
       * so at least there is some kind of context in place (as to avoid
       * potential issue of GL calls with no context)
       */
      current_context_stage = new_stage;

      /* if the new stage has a different size than the previous one
       * we need to update the viewport; we do it by simply setting the
       * SYNC_MATRICES flag and letting the next redraw cycle take care
       * of calling glViewport()
       */
      if (current_context_stage)
        {
          CLUTTER_SET_PRIVATE_FLAGS (current_context_stage,
                                     CLUTTER_ACTOR_SYNC_MATRICES);
        }
    }
  else
    CLUTTER_NOTE (MULTISTAGE, "Stage is the same");
}
开发者ID:Docworld,项目名称:chromiumos,代码行数:56,代码来源:clutter-backend.c


示例14: clutter_backend_x11_create_device_manager

static void
clutter_backend_x11_create_device_manager (ClutterBackendX11 *backend_x11)
{
  ClutterEventTranslator *translator;
  ClutterBackend *backend;

#ifdef HAVE_XINPUT_2
  if (clutter_enable_xinput)
    {
      int event_base, first_event, first_error;

      if (XQueryExtension (backend_x11->xdpy, "XInputExtension",
                           &event_base,
                           &first_event,
                           &first_error))
        {
          int major = 2;
          int minor = 3;

          if (XIQueryVersion (backend_x11->xdpy, &major, &minor) != BadRequest)
            {
              CLUTTER_NOTE (BACKEND, "Creating XI2 device manager");
              backend_x11->has_xinput = TRUE;
              backend_x11->device_manager =
                g_object_new (CLUTTER_TYPE_DEVICE_MANAGER_XI2,
                              "backend", backend_x11,
                              "opcode", event_base,
                              NULL);

              backend_x11->xi_minor = minor;
            }
        }
    }

  if (backend_x11->device_manager == NULL)
#endif /* HAVE_XINPUT_2 */
    {
      CLUTTER_NOTE (BACKEND, "Creating Core device manager");
      backend_x11->has_xinput = FALSE;
      backend_x11->device_manager =
        g_object_new (CLUTTER_TYPE_DEVICE_MANAGER_X11,
                      "backend", backend_x11,
                      NULL);

      backend_x11->xi_minor = -1;
    }

  backend = CLUTTER_BACKEND (backend_x11);
  backend->device_manager = backend_x11->device_manager;

  translator = CLUTTER_EVENT_TRANSLATOR (backend_x11->device_manager);
  _clutter_backend_add_event_translator (backend, translator);
}
开发者ID:MaximeMorel,项目名称:mutter,代码行数:53,代码来源:clutter-backend-x11.c


示例15: clutter_group_real_paint

static void
clutter_group_real_paint (ClutterActor *actor)
{
  ClutterGroupPrivate *priv = CLUTTER_GROUP (actor)->priv;

  CLUTTER_NOTE (PAINT, "ClutterGroup paint enter '%s'",
                _clutter_actor_get_debug_name (actor));

  g_list_foreach (priv->children, (GFunc) clutter_actor_paint, NULL);

  CLUTTER_NOTE (PAINT, "ClutterGroup paint leave '%s'",
                _clutter_actor_get_debug_name (actor));
}
开发者ID:collinss,项目名称:muffin,代码行数:13,代码来源:clutter-group.c


示例16: clutter_backend_glx_create_context

static gboolean
clutter_backend_glx_create_context (ClutterBackend  *backend,
                                    gboolean         is_offscreen,
                                    GError         **error)
{
  ClutterBackendGLX *backend_glx = CLUTTER_BACKEND_GLX (backend);
  ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (backend);

  if (backend_glx->gl_context == None)
    {
      XVisualInfo *xvisinfo;

      xvisinfo =
        clutter_backend_x11_get_visual_info (backend_x11, is_offscreen);

      CLUTTER_NOTE (GL, "Creating GL Context (display: %p, %s)",
                    backend_x11->xdpy,
                    is_offscreen ? "offscreen" : "onscreen");

      backend_glx->gl_context = glXCreateContext (backend_x11->xdpy,
                                                  xvisinfo,
                                                  0,
                                                  is_offscreen ? False : True);

      XFree (xvisinfo);

      if (backend_glx->gl_context == None)
        {
          g_set_error (error, CLUTTER_INIT_ERROR,
                       CLUTTER_INIT_ERROR_BACKEND,
                       "Unable to create suitable %s GL context",
                       is_offscreen ? "offscreen" : "onscreen");
          return FALSE;
        }

      if (!is_offscreen)
        {
          gboolean is_direct;

          is_direct = glXIsDirect (backend_x11->xdpy,
                                   backend_glx->gl_context);

          CLUTTER_NOTE (GL, "Setting %s context",
                        is_direct ? "direct" : "indirect");
          _cogl_set_indirect_context (!is_direct);
        }
    }

  return TRUE;
}
开发者ID:Docworld,项目名称:chromiumos,代码行数:50,代码来源:clutter-backend-glx.c


示例17: _clutter_input_device_update

/*
 * _clutter_input_device_update:
 * @device: a #ClutterInputDevice
 *
 * Updates the input @device by determining the #ClutterActor underneath the
 * pointer's cursor
 *
 * This function calls _clutter_input_device_set_actor() if needed.
 *
 * This function only works for #ClutterInputDevice of type
 * %CLUTTER_POINTER_DEVICE.
 *
 * Since: 1.2
 */
ClutterActor *
_clutter_input_device_update (ClutterInputDevice *device,
                              gboolean            emit_crossing)
{
  ClutterStage *stage;
  ClutterActor *new_cursor_actor;
  ClutterActor *old_cursor_actor;
  gint x, y;

  if (device->device_type == CLUTTER_KEYBOARD_DEVICE)
    return NULL;

  stage = device->stage;
  if (G_UNLIKELY (stage == NULL))
    {
      CLUTTER_NOTE (EVENT, "No stage defined for device '%s'",
                    clutter_input_device_get_device_name (device));
      return NULL;
    }

  clutter_input_device_get_device_coords (device, &x, &y);

  old_cursor_actor = device->cursor_actor;
  new_cursor_actor = _clutter_do_pick (stage, x, y, CLUTTER_PICK_REACTIVE);

  /* if the pick could not find an actor then we do not update the
   * input device, to avoid ghost enter/leave events; the pick should
   * never fail, except for bugs in the glReadPixels() implementation
   * in which case this is the safest course of action anyway
   */
  if (new_cursor_actor == NULL)
    return NULL;

  CLUTTER_NOTE (EVENT,
                "Actor under cursor (device %d, at %d, %d): %s",
                clutter_input_device_get_device_id (device),
                x, y,
                clutter_actor_get_name (new_cursor_actor) != NULL
                  ? clutter_actor_get_name (new_cursor_actor)
                  : G_OBJECT_TYPE_NAME (new_cursor_actor));

  /* short-circuit here */
  if (new_cursor_actor == old_cursor_actor)
    return old_cursor_actor;

  _clutter_input_device_set_actor (device, new_cursor_actor, emit_crossing);

  return device->cursor_actor;
}
开发者ID:nobled,项目名称:clutter,代码行数:63,代码来源:clutter-input-device.c


示例18: clutter_keymap_x11_translate_event

static ClutterTranslateReturn
clutter_keymap_x11_translate_event (ClutterEventTranslator *translator,
                                    gpointer                native,
                                    ClutterEvent           *event)
{
  ClutterKeymapX11 *keymap_x11 = CLUTTER_KEYMAP_X11 (translator);
  ClutterBackendX11 *backend_x11;
  ClutterTranslateReturn retval;
  XEvent *xevent;

  backend_x11 = CLUTTER_BACKEND_X11 (keymap_x11->backend);
  if (!backend_x11->use_xkb)
    return CLUTTER_TRANSLATE_CONTINUE;

  xevent = native;

  retval = CLUTTER_TRANSLATE_CONTINUE;

#ifdef HAVE_XKB
  if (xevent->type == keymap_x11->xkb_event_base)
    {
      XkbEvent *xkb_event = (XkbEvent *) xevent;

      switch (xkb_event->any.xkb_type)
        {
        case XkbStateNotify:
          CLUTTER_NOTE (EVENT, "Updating keyboard state");
          update_direction (keymap_x11, XkbStateGroup (&xkb_event->state));
          update_locked_mods (keymap_x11, xkb_event->state.locked_mods);
          retval = CLUTTER_TRANSLATE_REMOVE;
          break;

        case XkbNewKeyboardNotify:
        case XkbMapNotify:
          CLUTTER_NOTE (EVENT, "Updating keyboard mapping");
          XkbRefreshKeyboardMapping (&xkb_event->map);
          backend_x11->keymap_serial += 1;
          retval = CLUTTER_TRANSLATE_REMOVE;
          break;

        default:
          break;
        }
    }
#endif /* HAVE_XKB */

  return retval;
}
开发者ID:Distrotech,项目名称:clutter,代码行数:48,代码来源:clutter-keymap-x11.c


示例19: clutter_backend_sdl_post_parse

static gboolean
clutter_backend_sdl_post_parse (ClutterBackend  *backend,
                                GError         **error)
{
  int err;

  if (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0)
    {
      g_set_error (error, CLUTTER_INIT_ERROR,
		   CLUTTER_INIT_ERROR_BACKEND,
		   "Unable to Initialize SDL");
      return FALSE;
    }

#if defined(WIN32)
  err = SDL_GL_LoadLibrary ("opengl32.dll");
#elif defined(__linux__) || defined(__FreeBSD__)
  err = SDL_GL_LoadLibrary ("libGL.so");
#else
#error Your platform is not supported
  err = 1;
#endif

  if (err != 0)
    {
      g_set_error (error, CLUTTER_INIT_ERROR,
		   CLUTTER_INIT_ERROR_BACKEND,
		   SDL_GetError ());
      return FALSE;
    }

  CLUTTER_NOTE (BACKEND, "SDL successfully initialized");

  return TRUE;
}
开发者ID:archlinuxarm-n900,项目名称:clutter08,代码行数:35,代码来源:clutter-backend-sdl.c


示例20: _clutter_input_device_set_associated_device

/*< internal >
 * clutter_input_device_set_associated_device:
 * @device: a #ClutterInputDevice
 * @associated: (allow-none): a #ClutterInputDevice, or %NULL
 *
 * Sets the associated device for @device.
 *
 * This function keeps a reference on the associated device.
 */
void
_clutter_input_device_set_associated_device (ClutterInputDevice *device,
                                             ClutterInputDevice *associated)
{
  if (device->associated == associated)
    return;

  if (device->associated != NULL)
    g_object_unref (device->associated);

  device->associated = associated;
  if (device->associated != NULL)
    g_object_ref (device->associated);

  CLUTTER_NOTE (MISC, "Associating device '%s' to device '%s'",
                clutter_input_device_get_device_name (device),
                device->associated != NULL
                  ? clutter_input_device_get_device_name (device->associated)
                  : "(none)");

  if (device->device_mode != CLUTTER_INPUT_MODE_MASTER)
    {
      if (device->associated != NULL)
        device->device_mode = CLUTTER_INPUT_MODE_SLAVE;
      else
        device->device_mode = CLUTTER_INPUT_MODE_FLOATING;

      g_object_notify_by_pspec (G_OBJECT (device), obj_props[PROP_DEVICE_MODE]);
    }
}
开发者ID:nobled,项目名称:clutter,代码行数:39,代码来源:clutter-input-device.c



注:本文中的CLUTTER_NOTE函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ CLUTTER_STAGE函数代码示例发布时间:2022-05-30
下一篇:
C++ CLUTTER_IS_ACTOR函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap