~haggai-eran/nux/rtl-rebased

« back to all changes in this revision

Viewing changes to Nux/TextEntry.cpp

  • Committer: Jay Taoko
  • Date: 2011-10-21 22:06:35 UTC
  • mto: This revision was merged to the branch mainline in revision 509.
  • Revision ID: jay.taoko@canonical.com-20111021220635-1tdvncs47hdlfbz1
* Removed custom Nux types: t_u32, t_s32, t_bool, ...

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
  static const Color kDefaultBackgroundColor(1, 1, 1, 1.0f);
46
46
  static const Color kDefaultSelectionBackgroundColor(0.5, 0.5, 0.5, 1.0f);
47
47
  static const Color kDefaultSelectionTextColor(1, 1, 1, 1.0f);
48
 
  static const t_u64 kTripleClickTimeout = 500;
 
48
  static const unsigned long long kTripleClickTimeout = 500;
49
49
  static const std::string kDefaultFontName = "Ubuntu";
50
50
 
51
 
  static t_u64 GetCurrentTime()
 
51
  static unsigned long long GetCurrentTime()
52
52
  {
53
53
    GTimeVal tv;
54
54
    g_get_current_time(&tv);
55
 
    return static_cast<t_u64>(tv.tv_sec) * 1000 + tv.tv_usec / 1000;
 
55
    return static_cast<unsigned long long>(tv.tv_sec) * 1000 + tv.tv_usec / 1000;
56
56
  }
57
57
 
58
58
  static std::string CleanupLineBreaks(const char *source)
224
224
    int sel_start, sel_end;
225
225
    GetSelectionBounds(&sel_start, &sel_end);
226
226
 
227
 
    t_u64 current_time = GetCurrentTime();
 
227
    unsigned long long current_time = GetCurrentTime();
228
228
 
229
229
    if ((event_type == NUX_MOUSE_PRESSED) && (current_time - last_dblclick_time_ <= kTripleClickTimeout))
230
230
    {