context.inc 4.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. type
  2. Ppw_context = ^Tpw_context;
  3. Ppw_context_events = ^Tpw_context_events;
  4. Ppw_core = ^Tpw_core;
  5. Ppw_export_type = ^Tpw_export_type;
  6. Ppw_global = ^Tpw_global;
  7. Ppw_impl_client = ^Tpw_impl_client;
  8. Ppw_proxy = ^Tpw_proxy;
  9. Tpw_context_events = record
  10. version: Tuint32_t;
  11. Destroy: procedure(Data: pointer); cdecl;
  12. Free: procedure(Data: pointer); cdecl;
  13. check_access: procedure(Data: pointer; client: Ppw_impl_client); cdecl;
  14. global_added: procedure(Data: pointer; global: Ppw_global); cdecl;
  15. global_removed: procedure(Data: pointer; global: Ppw_global); cdecl;
  16. end;
  17. Tpw_export_type = record
  18. link: Tspa_list;
  19. _type: PChar;
  20. func: function(core: Ppw_core; _type: PChar; props: Pspa_dict; object_: pointer; user_data_size: Tsize_t) : Ppw_proxy; cdecl;
  21. end;
  22. tpw_context_conf_section_for_eachcallback = function(Data: pointer; location: PChar; section: PChar; str: PChar; len: Tsize_t) : longint; cdecl;
  23. tpw_context_conf_section_match_rulescallback = function(Data: pointer; location: PChar; action: PChar; str: PChar; len: Tsize_t) : longint; cdecl;
  24. tpw_context_for_each_globalcallback = function(Data: pointer; global: Ppw_global) : longint; cdecl;
  25. function pw_context_new(main_loop: Ppw_loop; props: Ppw_properties; user_data_size: Tsize_t) : Ppw_context; cdecl; external libpipewirename Name 'pw_context_new';
  26. procedure pw_context_destroy(context: Ppw_context); cdecl; external libpipewirename Name 'pw_context_destroy';
  27. function pw_context_get_user_data(context: Ppw_context) : pointer; cdecl; external libpipewirename Name 'pw_context_get_user_data';
  28. procedure pw_context_add_listener(context: Ppw_context; listener: Pspa_hook; events: Ppw_context_events; Data: pointer); cdecl; external libpipewirename Name 'pw_context_add_listener';
  29. function pw_context_get_properties(context: Ppw_context) : Ppw_properties; cdecl; external libpipewirename Name 'pw_context_get_properties';
  30. function pw_context_update_properties(context: Ppw_context; dict: Pspa_dict) : longint; cdecl; external libpipewirename Name 'pw_context_update_properties';
  31. function pw_context_get_conf_section(context: Ppw_context; section: PChar) : PChar; cdecl; external libpipewirename Name 'pw_context_get_conf_section';
  32. function pw_context_parse_conf_section(context: Ppw_context; conf: Ppw_properties; section: PChar) : longint; cdecl; external libpipewirename Name 'pw_context_parse_conf_section';
  33. function pw_context_conf_update_props(context: Ppw_context; section: PChar; props: Ppw_properties) : longint; cdecl; external libpipewirename Name 'pw_context_conf_update_props';
  34. function pw_context_conf_section_for_each(context: Ppw_context; section: PChar; callback: tpw_context_conf_section_for_eachcallback; Data: pointer) : longint;
  35. cdecl; external libpipewirename Name 'pw_context_conf_section_for_each';
  36. function pw_context_conf_section_match_rules(context: Ppw_context; section: PChar; props: Pspa_dict; callback: tpw_context_conf_section_match_rulescallback;
  37. Data: pointer) : longint; cdecl; external libpipewirename Name 'pw_context_conf_section_match_rules';
  38. function pw_context_get_support(context: Ppw_context; n_support: Puint32_t) : Pspa_support; cdecl; external libpipewirename Name 'pw_context_get_support';
  39. function pw_context_get_main_loop(context: Ppw_context) : Ppw_loop; cdecl; external libpipewirename Name 'pw_context_get_main_loop';
  40. function pw_context_get_work_queue(context: Ppw_context) : Ppw_work_queue; cdecl; external libpipewirename Name 'pw_context_get_work_queue';
  41. function pw_context_for_each_global(context: Ppw_context; callback: tpw_context_for_each_globalcallback; Data: pointer) : longint; cdecl; external libpipewirename Name 'pw_context_for_each_global';
  42. function pw_context_find_global(context: Ppw_context; id: Tuint32_t) : Ppw_global; cdecl; external libpipewirename Name 'pw_context_find_global';
  43. function pw_context_add_spa_lib(context: Ppw_context; factory_regex: PChar; lib: PChar) : longint; cdecl; external libpipewirename Name 'pw_context_add_spa_lib';
  44. function pw_context_find_spa_lib(context: Ppw_context; factory_name: PChar) : PChar; cdecl; external libpipewirename Name 'pw_context_find_spa_lib';
  45. function pw_context_load_spa_handle(context: Ppw_context; factory_name: PChar; info: Pspa_dict) : Pspa_handle; cdecl; external libpipewirename Name 'pw_context_load_spa_handle';
  46. function pw_context_register_export_type(context: Ppw_context; _type: Ppw_export_type) : longint; cdecl; external libpipewirename Name 'pw_context_register_export_type';
  47. function pw_context_find_export_type(context: Ppw_context; _type: PChar) : Ppw_export_type; cdecl; external libpipewirename Name 'pw_context_find_export_type';
  48. function pw_context_set_object(context: Ppw_context; _type: PChar; Value: pointer) : longint; cdecl; external libpipewirename Name 'pw_context_set_object';
  49. function pw_context_get_object(context: Ppw_context; _type: PChar) : pointer; cdecl; external libpipewirename Name 'pw_context_get_object';