Skip to content

Commit

Permalink
rename to match
Browse files Browse the repository at this point in the history
  • Loading branch information
mgood7123 committed Jul 8, 2022
1 parent e6d8a86 commit 7003f97
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3100,7 +3100,7 @@ skiasharp_build("SkiaSharp") {
"src/xamarin/SkiaKeeper.c",
"src/xamarin/SkCompatPaint.cpp",
"src/xamarin/SkManagedIDChangeListener.cpp",
"src/xamarin/SkManagedIDChangeListener_List.cpp",
"src/xamarin/SkManagedIDChangeListenerList.cpp",
"src/xamarin/SkManagedDrawable.cpp",
"src/xamarin/SkManagedAllocator.cpp",
"src/xamarin/SkManagedPixelRef.cpp",
Expand Down
14 changes: 7 additions & 7 deletions include/xamarin/SkManagedIDChangeListenerList.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@
* found in the LICENSE file.
*/

#ifndef SkManagedIDChangeListener_List_h
#define SkManagedIDChangeListener_List_h
#ifndef SkManagedIDChangeListenerList_h
#define SkManagedIDChangeListenerList_h

#include "include/private/SkIDChangeListener.h"
#include "include/core/SkTypes.h"

class SK_API SkManagedIDChangeListener_List;
class SK_API SkManagedIDChangeListenerList;

// delegate declarations

// managed Allocator
class SkManagedIDChangeListener_List : public SkIDChangeListener::List {
class SkManagedIDChangeListenerList : public SkIDChangeListener::List {
public:
SkManagedIDChangeListener_List(void* context);
SkManagedIDChangeListenerList(void* context);

~SkManagedIDChangeListener_List();
~SkManagedIDChangeListenerList();

typedef void (*DestroyProc)(SkManagedIDChangeListener_List* d, void* context);
typedef void (*DestroyProc)(SkManagedIDChangeListenerList* d, void* context);

struct Procs {
DestroyProc fDestroy = nullptr;
Expand Down
10 changes: 5 additions & 5 deletions src/xamarin/SkManagedIDChangeListenerList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
* found in the LICENSE file.
*/

#include "include/xamarin/SkManagedIDChangeListener_List.h"
#include "include/xamarin/SkManagedIDChangeListenerList.h"

SkManagedIDChangeListener_List::Procs SkManagedIDChangeListener_List::fProcs;
SkManagedIDChangeListenerList::Procs SkManagedIDChangeListenerList::fProcs;

void SkManagedIDChangeListener_List::setProcs(SkManagedIDChangeListener_List::Procs procs) {
void SkManagedIDChangeListenerList::setProcs(SkManagedIDChangeListenerList::Procs procs) {
fProcs = procs;
}

SkManagedIDChangeListener_List::SkManagedIDChangeListener_List(void* context) {
SkManagedIDChangeListenerList::SkManagedIDChangeListenerList(void* context) {
fContext = context;
}

SkManagedIDChangeListener_List::~SkManagedIDChangeListener_List() {
SkManagedIDChangeListenerList::~SkManagedIDChangeListenerList() {
if (fProcs.fDestroy) {
fProcs.fDestroy(this, fContext);
}
Expand Down
28 changes: 14 additions & 14 deletions src/xamarin/sk_managedidchangelistenerlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,58 @@
#include "include/xamarin/SkManagedIDChangeListener.h"

#include "include/xamarin/sk_managedidchangelistenerlist.h"
#include "include/xamarin/SkManagedIDChangeListener_List.h"
#include "include/xamarin/SkManagedIDChangeListenerList.h"

#include "src/c/sk_types_priv.h"

static inline SkManagedIDChangeListener* AsSkManagedIDChangeListener(sk_idchangelistener_t* d) {
return reinterpret_cast<SkManagedIDChangeListener*>(d);
}
static inline SkManagedIDChangeListener_List* AsSkManagedIDChangeListener_List(sk_idchangelistenerlist_t* d) {
return reinterpret_cast<SkManagedIDChangeListener_List*>(d);
static inline SkManagedIDChangeListenerList* AsSkManagedIDChangeListenerList(sk_idchangelistenerlist_t* d) {
return reinterpret_cast<SkManagedIDChangeListenerList*>(d);
}
static inline sk_idchangelistenerlist_t* ToSkManagedIDChangeListener_List(SkManagedIDChangeListener_List* d) {
static inline sk_idchangelistenerlist_t* ToSkManagedIDChangeListenerList(SkManagedIDChangeListenerList* d) {
return reinterpret_cast<sk_idchangelistenerlist_t*>(d);
}

static sk_idchangelistenerlist_procs_t gProcs;

void destroy_List(SkManagedIDChangeListener_List* d, void* context) {
void destroy_List(SkManagedIDChangeListenerList* d, void* context) {
if (gProcs.fDestroy) {
gProcs.fDestroy(ToSkManagedIDChangeListener_List(d), context);
gProcs.fDestroy(ToSkManagedIDChangeListenerList(d), context);
}
}

sk_idchangelistenerlist_t* sk_managedidchangelistenerlist_new(void* context) {
return ToSkManagedIDChangeListener_List(new SkManagedIDChangeListener_List(context));
return ToSkManagedIDChangeListenerList(new SkManagedIDChangeListenerList(context));
}

void sk_managedidchangelistenerlist_delete(sk_idchangelistenerlist_t* d) {
delete AsSkManagedIDChangeListener_List(d);
delete AsSkManagedIDChangeListenerList(d);
}

void sk_managedidchangelistenerlist_add(sk_idchangelistenerlist_t* d, sk_idchangelistener_t* listener, bool single_threaded) {
AsSkManagedIDChangeListener_List(d)->add(sk_sp(AsSkManagedIDChangeListener(listener)),
AsSkManagedIDChangeListenerList(d)->add(sk_sp(AsSkManagedIDChangeListener(listener)),
single_threaded);
}

int32_t sk_managedidchangelistenerlist_count(sk_idchangelistenerlist_t* d) {
return AsSkManagedIDChangeListener_List(d)->count();
return AsSkManagedIDChangeListenerList(d)->count();
}

void sk_managedidchangelistenerlist_changed(sk_idchangelistenerlist_t* d, bool single_threaded) {
AsSkManagedIDChangeListener_List(d)->changed(single_threaded);
AsSkManagedIDChangeListenerList(d)->changed(single_threaded);
}

void sk_managedidchangelistenerlist_reset(sk_idchangelistenerlist_t* d, bool single_threaded) {
AsSkManagedIDChangeListener_List(d)->reset(single_threaded);
AsSkManagedIDChangeListenerList(d)->reset(single_threaded);
}

void sk_managedidchangelistenerlist_set_procs(sk_idchangelistenerlist_procs_t procs) {
gProcs = procs;

SkManagedIDChangeListener_List::Procs p;
SkManagedIDChangeListenerList::Procs p;
p.fDestroy = destroy_List;

SkManagedIDChangeListener_List::setProcs(p);
SkManagedIDChangeListenerList::setProcs(p);
}

0 comments on commit 7003f97

Please sign in to comment.