您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wl_registry_bind函数代码示例

51自学网 2021-06-03 10:00:25
  C++
这篇教程C++ wl_registry_bind函数代码示例写得很实用,希望能帮到您。

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

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

示例1: registry_handle_global

static voidregistry_handle_global(void *data, struct wl_registry *registry,		       uint32_t id, const char *interface, uint32_t version){	struct display *d = data;	if (strcmp(interface, "wl_compositor") == 0) {		d->compositor =			wl_registry_bind(registry,					 id, &wl_compositor_interface, 1);	} else if (strcmp(interface, "xdg_shell") == 0) {		d->shell = wl_registry_bind(registry,					    id, &xdg_shell_interface, 1);		xdg_shell_use_unstable_version(d->shell, XDG_VERSION);		xdg_shell_add_listener(d->shell, &xdg_shell_listener, d);	} else if (strcmp(interface, "zwp_fullscreen_shell_v1") == 0) {		d->fshell = wl_registry_bind(registry,					     id, &zwp_fullscreen_shell_v1_interface, 1);	} else if (strcmp(interface, "wl_shm") == 0) {		d->shm = wl_registry_bind(registry,					  id, &wl_shm_interface, 1);		wl_shm_add_listener(d->shm, &shm_listener, d);	}	else if (strcmp(interface, "ivi_application") == 0) {		d->ivi_application =			wl_registry_bind(registry, id,					 &ivi_application_interface, 1);	}}
开发者ID:ErwanDouaille,项目名称:westonHack,代码行数:29,


示例2: wl_registry_bind

voidNativeStateWayland::registry_handle_global(void *data, struct wl_registry *registry,                                           uint32_t id, const char *interface,                                           uint32_t /*version*/){    NativeStateWayland *that = static_cast<NativeStateWayland *>(data);    if (strcmp(interface, "wl_compositor") == 0) {        that->display_->compositor =                static_cast<struct wl_compositor *>(                    wl_registry_bind(registry,                                     id, &wl_compositor_interface, 1));    } else if (strcmp(interface, "wl_shell") == 0) {        that->display_->shell =                static_cast<struct wl_shell *>(                    wl_registry_bind(registry,                                     id, &wl_shell_interface, 1));    } else if (strcmp(interface, "wl_output") == 0) {        struct my_output *my_output = new struct my_output();        memset(my_output, 0, sizeof(*my_output));        my_output->output =                static_cast<struct wl_output *>(                    wl_registry_bind(registry,                                     id, &wl_output_interface, 2));        that->display_->outputs.push_back(my_output);        wl_output_add_listener(my_output->output, &output_listener_, my_output);        wl_display_roundtrip(that->display_->display);    }}
开发者ID:Gnurou,项目名称:glmark2,代码行数:29,


示例3: registry_handle_global

static voidregistry_handle_global(void *data, struct wl_registry *registry,uint32_t name, const char *interface, uint32_t version){	if (strcmp(interface, "wl_compositor") == 0) {		GLWin.wl_compositor = (wl_compositor *)			wl_registry_bind(registry, name,			&wl_compositor_interface, 1);	}	else if (strcmp(interface, "wl_shell") == 0) {		GLWin.wl_shell = (wl_shell *)wl_registry_bind(registry, name,			&wl_shell_interface, 1);	}	else if (strcmp(interface, "wl_seat") == 0) {		GLWin.wl_seat = (wl_seat *)wl_registry_bind(registry, name,			&wl_seat_interface, 1);		wl_seat_add_listener(GLWin.wl_seat, &seat_listener, 0);	}	else if (strcmp(interface, "wl_shm") == 0) {		GLWin.wl_shm = (wl_shm *)wl_registry_bind(registry, name,			&wl_shm_interface, 1);		GLWin.wl_cursor_theme = (wl_cursor_theme *)wl_cursor_theme_load(nullptr, 32, GLWin.wl_shm);		GLWin.wl_cursor = (wl_cursor *)			wl_cursor_theme_get_cursor(GLWin.wl_cursor_theme, "left_ptr");	}}
开发者ID:djbarry004,项目名称:Ishiiruka,代码行数:26,


示例4: registry_handle_global

static voidregistry_handle_global(void *data, struct wl_registry *registry, uint32_t name,		       const char *interface, uint32_t version){	struct wayland_compositor *c = data;	if (strcmp(interface, "wl_compositor") == 0) {		c->parent.compositor =			wl_registry_bind(registry, name,					 &wl_compositor_interface, 1);	} else if (strcmp(interface, "wl_output") == 0) {		c->parent.output =			wl_registry_bind(registry, name,					 &wl_output_interface, 1);		wl_output_add_listener(c->parent.output, &output_listener, c);	} else if (strcmp(interface, "wl_shell") == 0) {		c->parent.shell =			wl_registry_bind(registry, name,					 &wl_shell_interface, 1);	} else if (strcmp(interface, "wl_seat") == 0) {		display_add_seat(c, name);	} else if (strcmp(interface, "wl_shm") == 0) {		c->parent.shm =			wl_registry_bind(registry, name, &wl_shm_interface, 1);	}}
开发者ID:anderco,项目名称:weston,代码行数:26,


示例5: registry_handle_global

/* Registry callbacks. */static void registry_handle_global(void *data, struct wl_registry *reg,      uint32_t id, const char *interface, uint32_t version){   struct wl_output *output   = NULL;   gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;   (void)version;   if (string_is_equal_fast(interface, "wl_compositor", 13))      wl->compositor = (struct wl_compositor*)wl_registry_bind(reg,            id, &wl_compositor_interface, 3);   else if (string_is_equal_fast(interface, "wl_output", 9))   {      output = (struct wl_output*)wl_registry_bind(reg,            id, &wl_output_interface, 2);      wl_output_add_listener(output, &output_listener, wl);      wl_display_roundtrip(wl->input.dpy);   }   else if (string_is_equal_fast(interface, "wl_shell", 8))      wl->shell = (struct wl_shell*)         wl_registry_bind(reg, id, &wl_shell_interface, 1);   else if (string_is_equal_fast(interface, "wl_shm", 6))      wl->shm = (struct wl_shm*)wl_registry_bind(reg, id, &wl_shm_interface, 1);   else if (string_is_equal_fast(interface, "wl_seat", 7))   {      wl->seat = (struct wl_seat*)wl_registry_bind(reg, id, &wl_seat_interface, 4);      wl_seat_add_listener(wl->seat, &seat_listener, wl);   }}
开发者ID:Alcaro,项目名称:RetroArch,代码行数:30,


示例6: registryHandleGlobal

static void registryHandleGlobal(void* data,                                 struct wl_registry* registry,                                 uint32_t name,                                 const char* interface,                                 uint32_t version){    if (strcmp(interface, "wl_compositor") == 0)    {        _glfw.wl.compositor =            wl_registry_bind(registry, name, &wl_compositor_interface, 1);    }    else if (strcmp(interface, "wl_shm") == 0)    {        _glfw.wl.shm =            wl_registry_bind(registry, name, &wl_shm_interface, 1);    }    else if (strcmp(interface, "wl_shell") == 0)    {        _glfw.wl.shell =            wl_registry_bind(registry, name, &wl_shell_interface, 1);    }    else if (strcmp(interface, "wl_output") == 0)    {        _glfwAddOutput(name, version);    }    else if (strcmp(interface, "wl_seat") == 0)    {        if (!_glfw.wl.seat)        {            _glfw.wl.seat =                wl_registry_bind(registry, name, &wl_seat_interface, 1);            wl_seat_add_listener(_glfw.wl.seat, &seatListener, NULL);        }    }}
开发者ID:Piotrek1910,项目名称:Painter,代码行数:35,


示例7: registry_handle_global

static voidregistry_handle_global(void *data, struct wl_registry *registry,		       uint32_t name, const char *interface, uint32_t version){	struct display *d = data;	if (strcmp(interface, "wl_compositor") == 0) {		d->compositor =			wl_registry_bind(registry, name,					 &wl_compositor_interface, 1);	} else if (strcmp(interface, "xdg_shell") == 0) {		d->shell = wl_registry_bind(registry, name,					    &xdg_shell_interface, 1);		xdg_shell_add_listener(d->shell, &xdg_shell_listener, d);		xdg_shell_use_unstable_version(d->shell, XDG_VERSION);	} else if (strcmp(interface, "wl_seat") == 0) {		d->seat = wl_registry_bind(registry, name,					   &wl_seat_interface, 1);		wl_seat_add_listener(d->seat, &seat_listener, d);	} else if (strcmp(interface, "wl_shm") == 0) {		d->shm = wl_registry_bind(registry, name,					  &wl_shm_interface, 1);		d->cursor_theme = wl_cursor_theme_load(NULL, 32, d->shm);		d->default_cursor =			wl_cursor_theme_get_cursor(d->cursor_theme, "left_ptr");	}}
开发者ID:rzr,项目名称:weston,代码行数:27,


示例8: display_handle_global

static voiddisplay_handle_global(void *data, struct wl_registry *registry, uint32_t id,                      const char *interface, uint32_t version){    SDL_VideoData *d = data;    if (strcmp(interface, "wl_compositor") == 0) {        d->compositor = wl_registry_bind(d->registry, id, &wl_compositor_interface, 1);    } else if (strcmp(interface, "wl_output") == 0) {        Wayland_add_display(d, id);    } else if (strcmp(interface, "wl_seat") == 0) {        Wayland_display_add_input(d, id);    } else if (strcmp(interface, "wl_shell") == 0) {        d->shell = wl_registry_bind(d->registry, id, &wl_shell_interface, 1);    } else if (strcmp(interface, "wl_shm") == 0) {        d->shm = wl_registry_bind(registry, id, &wl_shm_interface, 1);        d->cursor_theme = WAYLAND_wl_cursor_theme_load(NULL, 32, d->shm);#ifdef SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH    } else if (strcmp(interface, "qt_touch_extension") == 0) {        Wayland_touch_create(d, id);    } else if (strcmp(interface, "qt_surface_extension") == 0) {        d->surface_extension = wl_registry_bind(registry, id,                &qt_surface_extension_interface, 1);    } else if (strcmp(interface, "qt_windowmanager") == 0) {        d->windowmanager = wl_registry_bind(registry, id,                &qt_windowmanager_interface, 1);        qt_windowmanager_add_listener(d->windowmanager, &windowmanager_listener, d);#endif /* SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH */    }}
开发者ID:03050903,项目名称:Urho3D,代码行数:31,


示例9: registry_handle_global

static voidregistry_handle_global (void *data, struct wl_registry *registry,    uint32_t name, const char *interface, uint32_t version){  GstGLWindowWaylandEGL *window_egl = data;  struct display *d = &window_egl->display;  GST_TRACE_OBJECT (window_egl, "registry_handle_global with registry %p, "      "interface %s, version %u", registry, interface, version);  if (g_strcmp0 (interface, "wl_compositor") == 0) {    d->compositor =        wl_registry_bind (registry, name, &wl_compositor_interface, 1);  } else if (g_strcmp0 (interface, "wl_shell") == 0) {    d->shell = wl_registry_bind (registry, name, &wl_shell_interface, 1);  } else if (g_strcmp0 (interface, "wl_seat") == 0) {    d->seat = wl_registry_bind (registry, name, &wl_seat_interface, 1);    wl_seat_add_listener (d->seat, &seat_listener, window_egl);  } else if (g_strcmp0 (interface, "wl_shm") == 0) {    d->shm = wl_registry_bind (registry, name, &wl_shm_interface, 1);    d->cursor_theme = wl_cursor_theme_load (NULL, 32, d->shm);    d->default_cursor =        wl_cursor_theme_get_cursor (d->cursor_theme, "left_ptr");  }}
开发者ID:ego5710,项目名称:gst-plugins-bad,代码行数:25,


示例10: registry_handle_global

static void registry_handle_global(void* data, struct wl_registry* registry, uint32_t name, const char* interface, uint32_t version){    WLContextStruct* p_wlCtx = (WLContextStruct*)data;    int ans_strcmp = 0;    do    {        ans_strcmp = strcmp(interface, "wl_compositor");        if (0 == ans_strcmp)        {            p_wlCtx->wlCompositor = (struct wl_compositor*)wl_registry_bind(registry, name, &wl_compositor_interface, 1);            break;        }        ans_strcmp = strcmp(interface, "wl_shm");        if (0 == ans_strcmp)        {            p_wlCtx->wlShm = wl_registry_bind(registry, name, &wl_shm_interface, 1);            wl_shm_add_listener(p_wlCtx->wlShm, &shm_listenter, p_wlCtx);            break;        }        ans_strcmp = strcmp(interface, "serverinfo");        if (0 == ans_strcmp)        {            p_wlCtx->wlExtServerinfo = (struct serverinfo*)wl_registry_bind(registry, name, &serverinfo_interface, 1);            serverinfo_add_listener(p_wlCtx->wlExtServerinfo, &serverinfo_listener_list, data);            serverinfo_get_connection_id(p_wlCtx->wlExtServerinfo);        }    } while(0);}
开发者ID:Airtau,项目名称:genivi,代码行数:31,


示例11: wl_registry_bind

/*static*/void Client::bind_wfits(void *data, wl_registry *registry, uint32_t id,	const char *interface, uint32_t version){	Client *client = static_cast<Client*>(data);	if (std::string(interface) == "wfits_input") {		client->wfits_input_ = static_cast<wfits_input*>(			wl_registry_bind(				registry, id, &wfits_input_interface, version			)		);	}	else if (std::string(interface) == "wfits_query") {		client->wfits_query_ = static_cast<wfits_query*>(			wl_registry_bind(				registry, id, &wfits_query_interface, version			)		);	}	else if (std::string(interface) == "wfits_manip") {		client->wfits_manip_ = static_cast<wfits_manip*>(			wl_registry_bind(				registry, id, &wfits_manip_interface, version			)		);	}}
开发者ID:01org,项目名称:wayland-fits,代码行数:28,


示例12: registry_handle_global

static voidregistry_handle_global (void *data,    struct wl_registry *registry,    uint32_t name,    const char *interface,    uint32_t version){  struct desktop *d = data;  if (!strcmp (interface, "desktop_shell"))    {      d->shell = wl_registry_bind (registry, name,          &desktop_shell_interface, 3);      desktop_shell_add_listener (d->shell, &listener, d);    }  else if (!strcmp (interface, "wl_output"))    {      /* TODO: create multiple outputs */      d->output = wl_registry_bind (registry, name,          &wl_output_interface, 1);    }  else if (!strcmp (interface, "shell_helper"))    {      d->helper = wl_registry_bind (registry, name,          &shell_helper_interface, 1);    }}
开发者ID:Artox,项目名称:maynard,代码行数:27,


示例13: registry_add_object

// listenersstatic void registry_add_object (void *data, struct wl_registry *registry, uint32_t name, const char *interface, uint32_t version) {	if (!strcmp(interface,"wl_compositor")) {		compositor = wl_registry_bind (registry, name, &wl_compositor_interface, 0);	}	else if (!strcmp(interface,"wl_shell")) {		shell = wl_registry_bind (registry, name, &wl_shell_interface, 0);	}}
开发者ID:Happy-Ferret,项目名称:tutorials,代码行数:9,


示例14: if

void MockClient::handleGlobal(uint32_t id, const QByteArray &interface){    if (interface == "wl_compositor") {        compositor = static_cast<wl_compositor *>(wl_registry_bind(registry, id, &wl_compositor_interface, 1));    } else if (interface == "wl_output") {        output = static_cast<wl_output *>(wl_registry_bind(registry, id, &wl_output_interface, 1));        wl_output_add_listener(output, &outputListener, this);    } else if (interface == "wl_shm") {        shm = static_cast<wl_shm *>(wl_registry_bind(registry, id, &wl_shm_interface, 1));    }}
开发者ID:OuluPulu,项目名称:strqtwln,代码行数:11,


示例15: wl_registry_handle_global

static void wl_registry_handle_global(void* data, struct wl_registry* registry, uint32_t id, const char *interface, uint32_t version){	struct display* display = data;	if (strcmp(interface, "wl_compositor") == 0)		display->compositor = wl_registry_bind(registry, id, &wl_compositor_interface, 1);	else if (strcmp(interface, "wl_shell") == 0)		display->shell = wl_registry_bind(registry, id, &wl_shell_interface, 1);	else if (strcmp(interface, "wl_shm") == 0)		display->shm = wl_registry_bind(registry, id, &wl_shm_interface, 1);}
开发者ID:andrejza,项目名称:FreeRDP,代码行数:11,


示例16: global_registry_handler

static void global_registry_handler(void *data, struct wl_registry *registry,                                    uint32_t id, const char *interface,                                    uint32_t version){    printf("Got a registry event for %s id %d/n", interface, id);    if (strcmp(interface, "wl_compositor") == 0) {        compositor = (wl_compositor *) wl_registry_bind(registry, id, &wl_compositor_interface, 1);    } else if (strcmp(interface, "wl_shell") == 0) {        shell = (wl_shell *) wl_registry_bind(registry, id, &wl_shell_interface, 1);    }}
开发者ID:techhhuang,项目名称:bookmark,代码行数:12,


示例17: registry_handle_global

/* Registry callbacks. */static void registry_handle_global(void *data, struct wl_registry *reg,      uint32_t id, const char *interface, uint32_t version){   gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;   (void)version;   if (!strcmp(interface, "wl_compositor"))      wl->compositor = (struct wl_compositor*)wl_registry_bind(reg, id, &wl_compositor_interface, 1);   else if (!strcmp(interface, "wl_shell"))      wl->shell = (struct wl_shell*)wl_registry_bind(reg, id, &wl_shell_interface, 1);}
开发者ID:matthijsberk,项目名称:RetroArch,代码行数:13,


示例18: wl_global

static void wl_global (void *data,                       struct wl_registry *wl_registry,                       uint32_t name,                       const char *interface,                       uint32_t version){    struct WaylandEGLContext *wl = (struct WaylandEGLContext *) data;    if (!strcmp (interface, "wl_compositor"))        wl->compositor = (struct wl_compositor *) wl_registry_bind (wl_registry, name, &wl_compositor_interface, 3);    else if (!strcmp (interface, "wl_subcompositor"))        wl->subcompositor = (struct wl_subcompositor *) wl_registry_bind (wl_registry, name, &wl_subcompositor_interface, 1);}
开发者ID:ehmry,项目名称:snes9x,代码行数:13,


示例19: handle_global

static voidhandle_global(void *data, struct wl_registry *registry,	      uint32_t id, const char *interface, uint32_t version){	struct client *client = data;	struct input *input;	struct output *output;	struct test *test;	struct global *global;	global = xzalloc(sizeof *global);	global->name = id;	global->interface = strdup(interface);	assert(interface);	global->version = version;	wl_list_insert(client->global_list.prev, &global->link);	if (strcmp(interface, "wl_compositor") == 0) {		client->wl_compositor =			wl_registry_bind(registry, id,					 &wl_compositor_interface, 1);	} else if (strcmp(interface, "wl_seat") == 0) {		input = xzalloc(sizeof *input);		input->wl_seat =			wl_registry_bind(registry, id,					 &wl_seat_interface, 1);		wl_seat_add_listener(input->wl_seat, &seat_listener, input);		client->input = input;	} else if (strcmp(interface, "wl_shm") == 0) {		client->wl_shm =			wl_registry_bind(registry, id,					 &wl_shm_interface, 1);		wl_shm_add_listener(client->wl_shm, &shm_listener, client);	} else if (strcmp(interface, "wl_output") == 0) {		output = xzalloc(sizeof *output);		output->wl_output =			wl_registry_bind(registry, id,					 &wl_output_interface, 1);		wl_output_add_listener(output->wl_output,				       &output_listener, output);		client->output = output;	} else if (strcmp(interface, "wl_test") == 0) {		test = xzalloc(sizeof *test);		test->wl_test =			wl_registry_bind(registry, id,					 &wl_test_interface, 1);		wl_test_add_listener(test->wl_test, &test_listener, test);		client->test = test;	}}
开发者ID:markbt,项目名称:weston,代码行数:50,


示例20: displayHandleGlobal

static void displayHandleGlobal(void *_data, struct wl_registry *_registry,		                 	    uint32_t _id, const char *_interface, uint32_t _version) {	struct ContextData *d = (struct ContextData*) _data;	if (strcmp(_interface, "wl_compositor") == 0) {		d->compositor = (struct wl_compositor *) wl_registry_bind(_registry, _id, &wl_compositor_interface, 1);	} else if (strcmp(_interface, "wl_shell") == 0) {		d->shell = (struct wl_shell *) wl_registry_bind(_registry, _id, &wl_shell_interface, 1);	} else if (strcmp(_interface, "wl_shell_surface") == 0) {		d->shell_surface = (struct wl_shell_surface *) wl_registry_bind(_registry, _id, &wl_shell_surface_interface, 1);		wl_shell_surface_add_listener(d->shell_surface, &shellSurfaceListener, d);	} else if (strcmp(_interface, "wl_seat") == 0) {		d->seat = (struct wl_seat *) wl_registry_bind(_registry, _id, &wl_seat_interface, 1);		wl_seat_add_listener(d->seat, &seatListener, d);	}}
开发者ID:AndyLavr,项目名称:linux-asus-t100ta,代码行数:15,


示例21: wl_registry_bind

inline voidWaylandEventQueue::RegistryHandler(struct wl_registry *registry, uint32_t id,                                   const char *interface){  if (StringIsEqual(interface, "wl_compositor"))    compositor = (wl_compositor *)      wl_registry_bind(registry, id, &wl_compositor_interface, 1);  else if (StringIsEqual(interface, "wl_seat")) {    seat = (wl_seat *)wl_registry_bind(registry, id,                                         &wl_seat_interface, 1);    wl_seat_add_listener(seat, &seat_listener, this);  } else if (StringIsEqual(interface, "wl_shell"))    shell = (wl_shell *)wl_registry_bind(registry, id,                                         &wl_shell_interface, 1);}
开发者ID:kwtskran,项目名称:XCSoar,代码行数:15,


示例22: register_globals

//call wl_registry_add_listener on thisstatic voidregister_globals(void *data, struct wl_registry *registry,		 uint32_t id, const char *interface, uint32_t version){	struct registry *reg = (struct registry *)data;	if (strcmp(interface, wl_compositor_interface.name) == 0)		reg->compositor = (struct wl_compositor *)wl_registry_bind(registry, id, &wl_compositor_interface, version);	else if (strcmp(interface, wl_shm_interface.name) == 0)		reg->shm = (struct wl_shm *)wl_registry_bind(registry, id, &wl_shm_interface, version);	//register client specific code	if (reg->registre)		reg->registre(registry, id, interface, version);}
开发者ID:xeechou,项目名称:taiwins,代码行数:16,


示例23: im_module_create

static Ecore_IMF_Context *im_module_create(){   Ecore_IMF_Context *ctx = NULL;   WaylandIMContext *ctxd = NULL;   if (!text_input_manager)     {        Ecore_Wl_Global *global;        struct wl_registry *registry;        Eina_Inlist *globals;        if (!(registry = ecore_wl_registry_get()))          return NULL;        if (!(globals = ecore_wl_globals_get()))          return NULL;        EINA_INLIST_FOREACH(globals, global)          {             if (!strcmp(global->interface, "wl_text_input_manager"))               {                  text_input_manager =                     wl_registry_bind(registry, global->id,                                      &wl_text_input_manager_interface, 1);                  EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom,                                     "bound wl_text_input_manager interface");                  break;               }          }     }
开发者ID:maikodaraine,项目名称:EnlightenmentUbuntu,代码行数:31,


示例24: _glfwAddOutputWayland

void _glfwAddOutputWayland(uint32_t name, uint32_t version){    _GLFWmonitor *monitor;    struct wl_output *output;    if (version < 2)    {        _glfwInputError(GLFW_PLATFORM_ERROR,                        "Wayland: Unsupported output interface version");        return;    }    // The actual name of this output will be set in the geometry handler.    monitor = _glfwAllocMonitor(NULL, 0, 0);    output = wl_registry_bind(_glfw.wl.registry,                              name,                              &wl_output_interface,                              2);    if (!output)    {        _glfwFreeMonitor(monitor);        return;    }    monitor->wl.scale = 1;    monitor->wl.output = output;    monitor->wl.name = name;    wl_output_add_listener(output, &outputListener, monitor);}
开发者ID:Draghi,项目名称:glfw,代码行数:31,


示例25: registry_handle_global

static voidregistry_handle_global (void *data, struct wl_registry *registry,    uint32_t id, const char *interface, uint32_t version){  struct display *d = data;  if (strcmp (interface, "wl_compositor") == 0) {    d->compositor =        wl_registry_bind (registry, id, &wl_compositor_interface, 1);  } else if (strcmp (interface, "wl_shell") == 0) {    d->shell = wl_registry_bind (registry, id, &wl_shell_interface, 1);  } else if (strcmp (interface, "wl_shm") == 0) {    d->shm = wl_registry_bind (registry, id, &wl_shm_interface, 1);    wl_shm_add_listener (d->shm, &shm_listenter, d);  }}
开发者ID:collects,项目名称:gst-plugins-bad,代码行数:16,


示例26: wl_registry_bind

QT_USE_NAMESPACEQWaylandSurfaceExtension::QWaylandSurfaceExtension(QWaylandDisplay *display, uint32_t id){    m_surface_extension = static_cast<struct wl_surface_extension *>(                wl_registry_bind(display->wl_registry(), id, &wl_surface_extension_interface, 1));}
开发者ID:giucam,项目名称:qtwayland,代码行数:7,


示例27: registry_handle_global

static voidregistry_handle_global(    void *data, struct wl_registry *registry, uint32_t name,    const char *interface, uint32_t version){    struct cursor_viewer *viewer = data;    if (strcmp(interface, "wl_compositor") == 0)        viewer->compositor =            wl_registry_bind(registry, name, &wl_compositor_interface, 1);    else if (strcmp(interface, "wl_shell") == 0)        viewer->shell =            wl_registry_bind(registry, name, &wl_shell_interface, 1);    else if (strcmp(interface, "wl_shm") == 0)        viewer->shm =            wl_registry_bind(registry, name, &wl_shm_interface, 1);}
开发者ID:pfpacket,项目名称:wl_cursor_viewer,代码行数:16,


示例28: InitSeat

void nsRetrievalContextWayland::InitSeat(wl_registry *registry,                                         uint32_t id, uint32_t version,                                         void *data){  mSeat = (wl_seat*)wl_registry_bind(registry, id, &wl_seat_interface, 1);  wl_seat_add_listener(mSeat, &seat_listener, data);}
开发者ID:luke-chang,项目名称:gecko-1,代码行数:7,



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


C++ wl_resource_destroy函数代码示例
C++ wl_registry_add_listener函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。