~ci-train-bot/nux/nux-ubuntu-xenial-2841

« back to all changes in this revision

Viewing changes to Nux/GeisAdapter.cpp

  • Committer: CI Train Bot
  • Author(s): andrea.azzarone at canonical
  • Date: 2015-09-21 17:41:39 UTC
  • mfrom: (861.2.1 rm-bw-loop)
  • Revision ID: ci-train-bot@canonical.com-20150921174139-bqnn7l8urx1ohazp
Remove alternative select mainloop. Fixes: #1111216
Approved by: Eleni Maria Stea, PS Jenkins bot, Marco Trevisan (Treviño)

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <string.h>
24
24
#include "GeisAdapter.h"
25
25
 
26
 
#if (defined(NUX_OS_LINUX) || defined(NUX_USE_GLIB_LOOP_ON_WINDOWS)) && (!defined(NUX_DISABLE_GLIB_LOOP))
27
 
#define NUX_USE_GLIB_LOOP
28
 
#endif
29
 
 
30
26
#define GEIS_CLASS_UNREF(c) if (c) {geis_gesture_class_unref(c); c = nullptr;}
31
27
 
32
28
using namespace nux;
35
31
 
36
32
namespace
37
33
{
38
 
#ifdef NUX_USE_GLIB_LOOP
39
34
  struct GeisAdapterEventSource
40
35
  {
41
36
    GSource source;
81
76
    NULL,
82
77
    NULL
83
78
  };
84
 
#endif
85
79
}
86
80
 
87
81
GeisAdapter::GeisAdapter() :
112
106
  GEIS_CLASS_UNREF(class_touch_)
113
107
  geis_delete(geis_);
114
108
 
115
 
#ifdef NUX_USE_GLIB_LOOP
116
109
  g_source_remove_by_funcs_user_data(&geis_source_funcs, this);
117
 
#endif
118
110
}
119
111
 
120
 
#ifdef NUX_USE_GLIB_LOOP
121
112
void GeisAdapter::CreateGSource(GMainContext *context)
122
113
{
123
114
  GSource *source = g_source_new(&geis_source_funcs,
143
134
 
144
135
  g_source_attach(source, context);
145
136
}
146
 
#endif // NUX_USE_GLIB_LOOP
147
137
 
148
138
void GeisAdapter::ProcessGeisEvents()
149
139
{