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

C++ ply_list_get_next_node函数代码示例

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

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



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

示例1: ply_progress_free

void
ply_progress_free (ply_progress_t* progress)
{
  ply_list_node_t *node;
  node = ply_list_get_first_node (progress->current_message_list);

  while (node)
   {
      ply_list_node_t *next_node;
      ply_progress_message_t *message = ply_list_node_get_data (node);
      next_node = ply_list_get_next_node (progress->current_message_list, node);

      free (message->string);
      free (message);
      node = next_node;
    }
  ply_list_free (progress->current_message_list);

  node = ply_list_get_first_node (progress->previous_message_list);

  while (node)
   {
      ply_list_node_t *next_node;
      ply_progress_message_t *message = ply_list_node_get_data (node);
      next_node = ply_list_get_next_node (progress->previous_message_list, node);

      free (message->string);
      free (message);
      node = next_node;
    }
  ply_list_free (progress->previous_message_list);
  free(progress);
  return;
}
开发者ID:AtsKiYsPoYl,项目名称:plymouth,代码行数:34,代码来源:ply-progress.c


示例2: add_pixel_displays

static void
add_pixel_displays (ply_seat_t *seat)
{
        ply_list_t *heads;
        ply_list_node_t *node;

        heads = ply_renderer_get_heads (seat->renderer);

        ply_trace ("Adding displays for %d heads",
                   ply_list_get_length (heads));

        node = ply_list_get_first_node (heads);
        while (node != NULL) {
                ply_list_node_t *next_node;
                ply_renderer_head_t *head;
                ply_pixel_display_t *display;

                head = ply_list_node_get_data (node);
                next_node = ply_list_get_next_node (heads, node);

                display = ply_pixel_display_new (seat->renderer, head);

                ply_list_append_data (seat->pixel_displays, display);

                node = next_node;
        }
}
开发者ID:magcius,项目名称:plymouth,代码行数:27,代码来源:ply-seat.c


示例3: ply_trigger_free

void
ply_trigger_free (ply_trigger_t *trigger)
{
  ply_list_node_t *node;

  if (trigger == NULL)
    return;

  node = ply_list_get_first_node (trigger->closures);
  while (node != NULL)
    {
      ply_list_node_t *next_node;
      ply_trigger_closure_t *closure;

      closure = (ply_trigger_closure_t *) ply_list_node_get_data (node);

      next_node = ply_list_get_next_node (trigger->closures, node);

      free (closure);
      ply_list_remove_node (trigger->closures, node);

      node = next_node;
    }
  ply_list_free (trigger->closures);

  if (trigger->free_address != NULL)
    *trigger->free_address = NULL;

  if (trigger->free_address != NULL)
    *trigger->free_address = NULL;

  free (trigger);
}
开发者ID:AlfredArouna,项目名称:plymouth,代码行数:33,代码来源:ply-trigger.c


示例4: show_password_prompt

static void
show_password_prompt (ply_boot_splash_plugin_t *plugin,
                      const char               *prompt,
                      int                       bullets)
{
        ply_list_node_t *node;
        int i;
        char *entered_text;

        entered_text = calloc (bullets + 1, sizeof(char));

        for (i = 0; i < bullets; i++) {
                entered_text[i] = '*';
        }

        node = ply_list_get_first_node (plugin->views);
        while (node != NULL) {
                ply_list_node_t *next_node;
                view_t *view;

                view = ply_list_node_get_data (node);
                next_node = ply_list_get_next_node (plugin->views, node);

                view_show_prompt (view, prompt, entered_text);

                node = next_node;
        }
        free (entered_text);
}
开发者ID:magcius,项目名称:plymouth,代码行数:29,代码来源:plugin.c


示例5: on_boot_progress

static void
on_boot_progress (ply_boot_splash_plugin_t *plugin,
                  double                    duration,
                  double                    percent_done)
{
  ply_list_node_t *node;
  double total_duration;

  total_duration = duration / percent_done;

  /* Fun made-up smoothing function to make the growth asymptotic:
   * fraction(time,estimate)=1-2^(-(time^1.45)/estimate) */
  percent_done = 1.0 - pow (2.0, -pow (duration, 1.45) / total_duration) * (1.0 - percent_done);

  node = ply_list_get_first_node (plugin->views);

  while (node != NULL)
    {
      ply_list_node_t *next_node;
      view_t *view;

      view = ply_list_node_get_data (node);
      next_node = ply_list_get_next_node (plugin->views, node);

      ply_progress_bar_set_percent_done (view->progress_bar, percent_done);
      ply_progress_bar_draw (view->progress_bar);

      node = next_node;
    }
}
开发者ID:AlfredArouna,项目名称:plymouth,代码行数:30,代码来源:plugin.c


示例6: load_views

static bool
load_views (ply_boot_splash_plugin_t *plugin)
{
  ply_list_node_t *node;
  bool view_loaded;

  view_loaded = false;
  node = ply_list_get_first_node (plugin->views);

  while (node != NULL)
    {
      ply_list_node_t *next_node;
      view_t *view;

      view = ply_list_node_get_data (node);
      next_node = ply_list_get_next_node (plugin->views, node);

      if (view_load (view))
        view_loaded = true;

      node = next_node;
    }

  return view_loaded;
}
开发者ID:AlfredArouna,项目名称:plymouth,代码行数:25,代码来源:plugin.c


示例7: ply_terminal_stop_watching_for_active_vt_change

void
ply_terminal_stop_watching_for_active_vt_change (ply_terminal_t                          *terminal,
        ply_terminal_active_vt_changed_handler_t active_vt_changed_handler,
        void                                    *user_data)
{
    ply_list_node_t *node;

    if (!ply_terminal_is_vt (terminal))
        return;

    node = ply_list_get_first_node (terminal->vt_change_closures);
    while (node != NULL) {
        ply_terminal_active_vt_changed_closure_t *closure;
        ply_list_node_t *next_node;

        closure = ply_list_node_get_data (node);
        next_node = ply_list_get_next_node (terminal->vt_change_closures, node);

        if (closure->handler == active_vt_changed_handler &&
                closure->user_data == user_data) {
            free (closure);
            ply_list_remove_node (terminal->vt_change_closures, node);
        }

        node = next_node;
    }
}
开发者ID:halfline,项目名称:plymouth,代码行数:27,代码来源:ply-terminal.c


示例8: stop_animation

static void
stop_animation (ply_boot_splash_plugin_t *plugin,
                ply_trigger_t            *trigger)
{
  ply_list_node_t *node;

  assert (plugin != NULL);
  assert (plugin->loop != NULL);

  if (!plugin->is_animating)
     return;

  plugin->is_animating = false;

  node = ply_list_get_first_node (plugin->views);
  while (node != NULL)
    {
      ply_list_node_t *next_node;
      view_t *view;

      view = ply_list_node_get_data (node);
      next_node = ply_list_get_next_node (plugin->views, node);

      ply_progress_bar_hide (view->progress_bar);
      if (trigger != NULL)
        ply_trigger_ignore_next_pull (trigger);
      ply_throbber_stop (view->throbber, trigger);

      node = next_node;
    }

  if (trigger != NULL)
    ply_trigger_pull (trigger, NULL);
}
开发者ID:AlfredArouna,项目名称:plymouth,代码行数:34,代码来源:plugin.c


示例9: ply_trigger_pull

void
ply_trigger_pull (ply_trigger_t *trigger,
                  const void    *data)
{
  ply_list_node_t *node;

  assert (trigger != NULL);
  assert (trigger->ignore_count >= 0);

  if (trigger->ignore_count > 0)
    {
      trigger->ignore_count--;
      return;
    }

  node = ply_list_get_first_node (trigger->closures);
  while (node != NULL)
    {
      ply_list_node_t *next_node;
      ply_trigger_closure_t *closure;

      closure = (ply_trigger_closure_t *) ply_list_node_get_data (node);

      next_node = ply_list_get_next_node (trigger->closures, node);

      closure->handler (closure->user_data, data, trigger);

      node = next_node;
    }

  if (trigger->free_address != NULL)
    ply_trigger_free (trigger);
}
开发者ID:AlfredArouna,项目名称:plymouth,代码行数:33,代码来源:ply-trigger.c


示例10: ply_boot_client_cancel_unsent_requests

static void
ply_boot_client_cancel_unsent_requests (ply_boot_client_t *client)
{
  ply_list_node_t *node;

  if (ply_list_get_length (client->requests_to_send) == 0)
      return;

  node = ply_list_get_first_node (client->requests_to_send);
  while (node != NULL)
    {
      ply_list_node_t *next_node;
      ply_boot_client_request_t *request;

      request = (ply_boot_client_request_t *) ply_list_node_get_data (node);
      next_node = ply_list_get_next_node (client->requests_to_send, node);

      ply_boot_client_cancel_request (client, request);
      ply_list_remove_node (client->requests_to_send, node);

      node = next_node;
    }

  if (client->daemon_can_take_request_watch != NULL)
    {
      assert (client->loop != NULL);

      ply_event_loop_stop_watching_fd (client->loop, 
                                       client->daemon_can_take_request_watch);
      client->daemon_can_take_request_watch = NULL;
    }
}
开发者ID:pkt,项目名称:pkt-plymouth,代码行数:32,代码来源:ply-boot-client.c


示例11: start_animation

static void
start_animation (ply_boot_splash_plugin_t *plugin)
{
        ply_list_node_t *node;

        assert (plugin != NULL);
        assert (plugin->loop != NULL);

        redraw_views (plugin);

        if (plugin->message != NULL)
                show_message (plugin);

        if (plugin->is_animating)
                return;

        node = ply_list_get_first_node (plugin->views);
        while (node != NULL) {
                ply_list_node_t *next_node;
                view_t *view;

                view = ply_list_node_get_data (node);
                next_node = ply_list_get_next_node (plugin->views, node);

                view_start_animation (view);

                node = next_node;
        }

        plugin->is_animating = true;
}
开发者ID:magcius,项目名称:plymouth,代码行数:31,代码来源:plugin.c


示例12: activate

static void
activate (ply_renderer_backend_t *backend)
{
  ply_list_node_t *node;

  ply_trace ("taking master and scanning out");
  backend->is_active = true;

  drmSetMaster (backend->device_fd);
  node = ply_list_get_first_node (backend->heads);
  while (node != NULL)
    {
      ply_list_node_t *next_node;
      ply_renderer_head_t *head;

      head = (ply_renderer_head_t *) ply_list_node_get_data (node);
      next_node = ply_list_get_next_node (backend->heads, node);

      if (head->scan_out_buffer_id != 0)
        {
          /* Flush out any pending drawing to the buffer
           */
          flush_head (backend, head);

          /* Then send the buffer to the monitor
           */
          ply_renderer_head_set_scan_out_buffer (backend, head,
                                                 head->scan_out_buffer_id);
        }

      node = next_node;
    }
}
开发者ID:AtsKiYsPoYl,项目名称:plymouth,代码行数:33,代码来源:plugin.c


示例13: map_to_device

static bool
map_to_device (ply_renderer_backend_t *backend)
{
  ply_list_node_t *node;
  bool head_mapped;

  head_mapped = false;
  node = ply_list_get_first_node (backend->heads);
  while (node != NULL)
    {
      ply_list_node_t *next_node;
      ply_renderer_head_t *head;

      head = (ply_renderer_head_t *) ply_list_node_get_data (node);
      next_node = ply_list_get_next_node (backend->heads, node);

      if (ply_renderer_head_map (backend, head))
        head_mapped = true;

      node = next_node;
    }

  if (ply_terminal_is_active (backend->terminal))
    activate (backend);
  else
    ply_terminal_activate_vt (backend->terminal);

  return head_mapped;
}
开发者ID:AtsKiYsPoYl,项目名称:plymouth,代码行数:29,代码来源:plugin.c


示例14: remove_pixel_display

static void
remove_pixel_display (ply_boot_splash_plugin_t *plugin,
                      ply_pixel_display_t      *display)
{
  ply_list_node_t *node;

  node = ply_list_get_first_node (plugin->views);
  while (node != NULL)
    {
      view_t *view;
      ply_list_node_t *next_node;

      view = ply_list_node_get_data (node);
      next_node = ply_list_get_next_node (plugin->views, node);

      if (view->display == display)
        {

          ply_pixel_display_set_draw_handler (view->display, NULL, NULL);
          view_free (view);
          ply_list_remove_node (plugin->views, node);
          return;
        }

      node = next_node;
    }
}
开发者ID:AlfredArouna,项目名称:plymouth,代码行数:27,代码来源:plugin.c


示例15: unmap_from_device

static void
unmap_from_device (ply_renderer_backend_t *backend)
{
  ply_list_node_t *node;
  bool should_set_to_black;

  /* We only copy what's on screen back to the fb console
   * if there's one head (since in multihead set ups the fb console
   * is cloned).
   */
  should_set_to_black = ply_list_get_length (backend->heads) > 1;

  node = ply_list_get_first_node (backend->heads);
  while (node != NULL)
    {
      ply_list_node_t *next_node;
      ply_renderer_head_t *head;

      head = (ply_renderer_head_t *) ply_list_node_get_data (node);
      next_node = ply_list_get_next_node (backend->heads, node);

      if (backend->is_active)
        {
          ply_trace ("scanning out %s directly to console",
                     should_set_to_black? "black" : "splash");
          ply_renderer_head_set_scan_out_buffer_to_console (backend, head,
                                                            should_set_to_black);
        }

      ply_renderer_head_unmap (backend, head);

      node = next_node;
    }
}
开发者ID:AtsKiYsPoYl,项目名称:plymouth,代码行数:34,代码来源:plugin.c


示例16: activate

static void
activate (ply_renderer_backend_t *backend)
{
  ply_list_node_t *node;

  ply_trace ("taking master and scanning out");
  backend->is_active = true;

  drmSetMaster (backend->device_fd);
  node = ply_list_get_first_node (backend->heads);
  while (node != NULL)
    {
      ply_list_node_t *next_node;
      ply_renderer_head_t *head;

      head = (ply_renderer_head_t *) ply_list_node_get_data (node);
      next_node = ply_list_get_next_node (backend->heads, node);

      if (head->scan_out_buffer_id != 0)
        ply_renderer_head_set_scan_out_buffer (backend, head,
                                               head->scan_out_buffer_id);

      node = next_node;
    }
}
开发者ID:pkt,项目名称:pkt-plymouth,代码行数:25,代码来源:plugin.c


示例17: start_animation

static void
start_animation (ply_boot_splash_plugin_t *plugin)
{
        ply_list_node_t *node;

        if (plugin->is_animating)
                return;

        ply_trace ("starting animation");

        node = ply_list_get_first_node (plugin->views);
        while (node != NULL) {
                ply_list_node_t *next_node;
                view_t *view;

                view = ply_list_node_get_data (node);
                next_node = ply_list_get_next_node (plugin->views, node);

                view_start_animation (view);

                node = next_node;
        }

        plugin->is_animating = true;

        if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN)
                plugin->is_idle = true;
}
开发者ID:halfline,项目名称:plymouth,代码行数:28,代码来源:plugin.c


示例18: stop_animation

static void
stop_animation (ply_boot_splash_plugin_t *plugin)
{
        ply_list_node_t *node;

        assert (plugin != NULL);
        assert (plugin->loop != NULL);

        if (!plugin->is_animating)
                return;

        plugin->is_animating = false;

        node = ply_list_get_first_node (plugin->views);
        while (node != NULL) {
                ply_list_node_t *next_node;
                view_t *view;

                view = ply_list_node_get_data (node);
                next_node = ply_list_get_next_node (plugin->views, node);

                ply_text_progress_bar_hide (view->progress_bar);

                node = next_node;
        }
        redraw_views (plugin);
}
开发者ID:magcius,项目名称:plymouth,代码行数:27,代码来源:plugin.c


示例19: ply_trigger_remove_handler

void
ply_trigger_remove_handler (ply_trigger_t         *trigger,
                            ply_trigger_handler_t  handler,
                            void                  *user_data)
{
  ply_list_node_t *node;

  node = ply_list_get_first_node (trigger->closures);
  while (node != NULL)
    {
      ply_list_node_t *next_node;
      ply_trigger_closure_t *closure;

      closure = (ply_trigger_closure_t *) ply_list_node_get_data (node);

      next_node = ply_list_get_next_node (trigger->closures, node);

      if (closure->handler == handler && closure->user_data == user_data)
        {
          free (closure);
          ply_list_remove_node (trigger->closures, node);
          break;
        }

      node = next_node;
    }
}
开发者ID:AlfredArouna,项目名称:plymouth,代码行数:27,代码来源:ply-trigger.c


示例20: view_animate_at_time

static void
view_animate_at_time (view_t *view,
                      double  time)
{
        ply_boot_splash_plugin_t *plugin;
        ply_list_node_t *node;
        double logo_opacity;
        long logo_x, logo_y;
        long logo_width, logo_height;
        unsigned long screen_width, screen_height;
        unsigned long star_width, star_height;

        plugin = view->plugin;

        logo_width = ply_image_get_width (plugin->logo_image);
        logo_height = ply_image_get_height (plugin->logo_image);

        screen_width = ply_pixel_display_get_width (view->display);
        screen_height = ply_pixel_display_get_height (view->display);

        logo_x = (screen_width / 2) - (logo_width / 2);
        logo_y = (screen_height / 2) - (logo_height / 2);

        star_width = ply_image_get_width (plugin->star_image);
        star_height = ply_image_get_height (plugin->star_image);

        node = ply_list_get_first_node (view->stars);
        while (node != NULL) {
                ply_list_node_t *next_node;
                star_t *star;

                star = (star_t *) ply_list_node_get_data (node);
                next_node = ply_list_get_next_node (view->stars, node);

                star->opacity = .5 * sin (((plugin->now - star->start_time) / star->speed) * (2 * M_PI)) + .5;
                star->opacity = CLAMP (star->opacity, 0, 1.0);

                ply_pixel_display_draw_area (view->display,
                                             star->x, star->y,
                                             star_width, star_height);
                node = next_node;
        }

        logo_opacity = .5 * sin ((time / 5) * (2 * M_PI)) + .8;
        logo_opacity = CLAMP (logo_opacity, 0, 1.0);

        if (plugin->mode == PLY_BOOT_SPLASH_MODE_SHUTDOWN)
                logo_opacity = 1.0;

        if (fabs (logo_opacity - view->logo_opacity) <= DBL_MIN)
                return;

        view->logo_opacity = logo_opacity;

        ply_pixel_display_draw_area (view->display,
                                     logo_x, logo_y,
                                     logo_width, logo_height);
}
开发者ID:magcius,项目名称:plymouth,代码行数:58,代码来源:plugin.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ ply_trace函数代码示例发布时间:2022-05-30
下一篇:
C++ plurality函数代码示例发布时间: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