You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

list16.h 1.3 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /**
  2. * xrdp: A Remote Desktop Protocol server.
  3. *
  4. * Copyright (C) Jay Sorg 2004-2014
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. *
  18. * simple list
  19. */
  20. #if !defined(LIST16_H)
  21. #define LIST16_H
  22. #include "arch.h"
  23. /* list */
  24. struct list16
  25. {
  26. tui16* items;
  27. int count;
  28. int max_count;
  29. tui16 mitems[4];
  30. };
  31. struct list16*
  32. list16_create(void);
  33. void
  34. list16_delete(struct list16* self);
  35. void
  36. list16_init(struct list16* self);
  37. void
  38. list16_deinit(struct list16* self);
  39. void
  40. list16_add_item(struct list16* self, tui16 item);
  41. tui16
  42. list16_get_item(struct list16* self, int index);
  43. void
  44. list16_clear(struct list16* self);
  45. int
  46. list16_index_of(struct list16* self, tui16 item);
  47. void
  48. list16_remove_item(struct list16* self, int index);
  49. void
  50. list16_insert_item(struct list16* self, int index, tui16 item);
  51. #endif