2017-05-22 7 views
0

이, 내가 "wl_compositor_interface는"헤더 파일에서 두 변수 구조체 태그로 사용되는 것을 발견 이전 질문에서 can struct type itself be passed to function as parameter in c?, 나는 어떤 파일에 변수가 정의되어 찾을 수없는

에서 제기 질문입니다 "wayland-server-protocol.h".

struct wl_compositor_interface { 
     void (*create_surface)(struct wl_client *client, 
           struct wl_resource *resource, 
           uint32_t id); 
     void (*create_region)(struct wl_client *client, 
           struct wl_resource *resource, 
           uint32_t id); 
}; 


extern const struct wl_interface wl_compositor_interface; 

그러나, 헤더 파일은 변수가 정의 어디서 찾을 수없는 extern const struct wl_interface wl_compositor_interface;로 변수를 선언했다. 유사하게, 패턴 "WL _ *** _ 인터페이스를 모든 변수는 헤더 파일에 선언하지만 정의가 없습니다. 사람이 정의를 찾기 위해 나를 도울 수 있습니까? WAYLAND 소스가 여기 wayland github

이다 나는도, 문서 보았다 WL _ *** _ 인터페이스

답변

0

에 대한 아무런 설명이 없었다 이것은이 struct wl_interface wl_compositor_interface 때문에 - 당신이 세계적인 wl_compositor에 바인딩 할 때 사용한다는 것을 -., 생성 된 프로토콜 코드에 일반적으로 $SRC/protocol/wayland-protocol.c

struct wl_compositor_interface은이다 함수를 등록하기 위해 컴포 지터가 사용하는 구조체 다시 클라이언트로부터 요청을받을 것입니다 (클라이언트가 본 컴포지트 글로벌을 나타내는 자체 wl_resource 구조체).