summaryrefslogtreecommitdiff
path: root/gio/gwin32api-iterator.h
blob: d4df8a7b815cb716a9547fba1aaa221ce6fc47f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
typedef interface IIterator IIterator;
typedef interface IIterable IIterable;

/* IIterator */
typedef struct IIteratorVtbl {
  BEGIN_INTERFACE

  /*** IUnknown methods ***/
  HRESULT (STDMETHODCALLTYPE *QueryInterface)(
    IIterator *This,
    REFIID riid,
    void **ppvObject);

  ULONG (STDMETHODCALLTYPE *AddRef)(
    IIterator *This);

  ULONG (STDMETHODCALLTYPE *Release)(
    IIterator *This);

  /*** IInspectable methods ***/
  HRESULT (STDMETHODCALLTYPE *GetIids)(
    IIterator *This,
    UINT32 *count,
    IID **ids);

  HRESULT (STDMETHODCALLTYPE *GetRuntimeClassName)(
    IIterator *This,
    HSTRING *className);

  HRESULT (STDMETHODCALLTYPE *GetTrustLevel)(
    IIterator *This,
    TrustLevel *trustLevel);

  /*** IIterator methods ***/
  HRESULT (STDMETHODCALLTYPE *get_Current)(
    IIterator *This,
    IUnknown **current);

  HRESULT (STDMETHODCALLTYPE *get_HasCurrent)(
    IIterator *This,
    CHAR *hasCurrent);

  HRESULT (STDMETHODCALLTYPE *MoveNext)(
    IIterator *This,
    CHAR *hasCurrent);

  HRESULT (STDMETHODCALLTYPE *GetMany)(
    IIterator *This,
    UINT capacity,
    void *value,
    UINT *actual);

  END_INTERFACE
} IIteratorVtbl;

interface IIterator {
  CONST_VTBL IIteratorVtbl* lpVtbl;
};

/*** IUnknown methods ***/
#define IIterator_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IIterator_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IIterator_Release(This) (This)->lpVtbl->Release(This)
/*** IInspectable methods ***/
#define IIterator_GetIids(This,count,ids) (This)->lpVtbl->GetIids(This,count,ids)
#define IIterator_GetRuntimeClassName(This,name) (This)->lpVtbl->GetRuntimeClassName(This,name)
#define IIterator_GetTrustLevel(This,level) (This)->lpVtbl->GetTrustLevel(This,level)
/*** IIterator methods ***/
#define IIterator_get_Current(This,current) (This)->lpVtbl->get_Current(This,current)
#define IIterator_get_HasCurrent(This,hasCurrent) (This)->lpVtbl->get_HasCurrent(This,hasCurrent)
#define IIterator_MoveNext(This,hasCurrent) (This)->lpVtbl->MoveNext(This,hasCurrent)
#define IIterator_GetMany(This,capacity,value,actual) (This)->lpVtbl->GetMany(This,capacity,value,actual)

/* IIterable */
typedef struct IIterableVtbl {
  BEGIN_INTERFACE

  /*** IUnknown methods ***/
  HRESULT (STDMETHODCALLTYPE *QueryInterface)(
    IIterable *This,
    REFIID riid,
    void **ppvObject);

  ULONG (STDMETHODCALLTYPE *AddRef)(
    IIterable *This);

  ULONG (STDMETHODCALLTYPE *Release)(
    IIterable *This);

  /*** IInspectable methods ***/
  HRESULT (STDMETHODCALLTYPE *GetIids)(
    IIterable *This,
    UINT32 *count,
    IID **ids);

  HRESULT (STDMETHODCALLTYPE *GetRuntimeClassName)(
    IIterable *This,
    HSTRING *className);

  HRESULT (STDMETHODCALLTYPE *GetTrustLevel)(
    IIterable *This,
    TrustLevel *trustLevel);

  /*** IIterable methods ***/
  HRESULT (STDMETHODCALLTYPE *First)(
    IIterable *This,
    IIterator **first);

  END_INTERFACE
} IIterableVtbl;

interface IIterable {
  CONST_VTBL IIterableVtbl* lpVtbl;
};

/*** IUnknown methods ***/
#define IIterable_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
#define IIterable_AddRef(This) (This)->lpVtbl->AddRef(This)
#define IIterable_Release(This) (This)->lpVtbl->Release(This)
/*** IInspectable methods ***/
#define IIterable_GetIids(This,count,ids) (This)->lpVtbl->GetIids(This,count,ids)
#define IIterable_GetRuntimeClassName(This,name) (This)->lpVtbl->GetRuntimeClassName(This,name)
#define IIterable_GetTrustLevel(This,level) (This)->lpVtbl->GetTrustLevel(This,level)
/*** IIterable methods ***/
#define IIterable_First(This,retval) (This)->lpVtbl->First(This,retval)