diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2009-12-07 22:04:55 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2009-12-07 22:04:55 +0000 |
| commit | 5bc48808b6aed5469c3e62e1402e10c797a5d02a (patch) | |
| tree | e8e5909aab83b58dd498df789d113d05730b02ae /src | |
| parent | 43f16de4dea0ca3589fe2088f1aa9ca2edd1b354 (diff) | |
Removed typedef that simply renamed char* to Fl_String, as discussed in the mailing list.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6955 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_Input_.cxx | 2 | ||||
| -rw-r--r-- | src/Fl_Menu_add.cxx | 2 | ||||
| -rw-r--r-- | src/fl_shortcut.cxx | 30 | ||||
| -rw-r--r-- | src/fl_utf.c | 4 |
4 files changed, 19 insertions, 19 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 41881c3ca..67b9fe709 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -1247,7 +1247,7 @@ int Fl_Input_::linesPerPage() { \param [in] i index into the value field \return the character at index \p i */ -Fl_Char Fl_Input_::index(int i) const +unsigned int Fl_Input_::index(int i) const { int len = 0; return fl_utf8decode(value_+i, value_+size_, &len); diff --git a/src/Fl_Menu_add.cxx b/src/Fl_Menu_add.cxx index abea24dec..96f4a443c 100644 --- a/src/Fl_Menu_add.cxx +++ b/src/Fl_Menu_add.cxx @@ -235,7 +235,7 @@ int Fl_Menu_Item::add( ^ - Control \endverbatim Text shortcuts are converted to integer shortcut by calling - Fl_Shortcut fl_old_shortcut(const char*). + unsigned int fl_old_shortcut(const char*). \par callback The callback to invoke when this menu item is selected. diff --git a/src/fl_shortcut.cxx b/src/fl_shortcut.cxx index a189cfdba..1e07e9921 100644 --- a/src/fl_shortcut.cxx +++ b/src/fl_shortcut.cxx @@ -58,10 +58,10 @@ be confused with Fl_Widget::test_shortcut(). */ -int Fl::test_shortcut(Fl_Shortcut shortcut) { +int Fl::test_shortcut(unsigned int shortcut) { if (!shortcut) return 0; - Fl_Char v = shortcut & FL_KEY_MASK; + unsigned int v = shortcut & FL_KEY_MASK; if (fl_tolower(v)!=v) { shortcut |= FL_SHIFT; } @@ -74,13 +74,13 @@ int Fl::test_shortcut(Fl_Shortcut shortcut) { // these three must always be correct: if (mismatch&(FL_META|FL_ALT|FL_CTRL)) return 0; - Fl_Char key = shortcut & FL_KEY_MASK; + unsigned int key = shortcut & FL_KEY_MASK; // if shift is also correct, check for exactly equal keysyms: if (!(mismatch&(FL_SHIFT)) && key == Fl::event_key()) return 1; // try matching utf8, ignore shift: - Fl_Char firstChar = fl_utf8decode(Fl::event_text(), Fl::event_text()+Fl::event_length(), 0); + unsigned int firstChar = fl_utf8decode(Fl::event_text(), Fl::event_text()+Fl::event_length(), 0); if (key==firstChar) return 1; // kludge so that Ctrl+'_' works (as opposed to Ctrl+'^_'): @@ -174,7 +174,7 @@ static Keyname table[] = { \param [in] shortcut the integer value containing the ascii charcter or extended keystroke plus modifiers \return a pointer to a static buffer containing human readable text for the shortcut */ -const char* fl_shortcut_label(Fl_Shortcut shortcut) { +const char* fl_shortcut_label(unsigned int shortcut) { return fl_shortcut_label(shortcut, 0L); } @@ -184,15 +184,15 @@ const char* fl_shortcut_label(Fl_Shortcut shortcut) { \param [in] shortcut the integer value containing the ascii charcter or extended keystroke plus modifiers \param [in] eom if this pointer is set, it will receive a pointer to the end of the modifier text \return a pointer to a static buffer containing human readable text for the shortcut - \see fl_shortcut_label(Fl_Shortcut shortcut) + \see fl_shortcut_label(unsigned int shortcut) */ -const char* fl_shortcut_label(Fl_Shortcut shortcut, const char **eom) { +const char* fl_shortcut_label(unsigned int shortcut, const char **eom) { static char buf[20]; char *p = buf; if (eom) *eom = p; if (!shortcut) {*p = 0; return buf;} // fix upper case shortcuts - Fl_Char v = shortcut & FL_KEY_MASK; + unsigned int v = shortcut & FL_KEY_MASK; if (fl_tolower(v)!=v) { shortcut |= FL_SHIFT; } @@ -209,7 +209,7 @@ const char* fl_shortcut_label(Fl_Shortcut shortcut, const char **eom) { if (shortcut & FL_CTRL) {strcpy(p,"Ctrl+"); p += 5;} #endif // __APPLE__ if (eom) *eom = p; - Fl_Char key = shortcut & FL_KEY_MASK; + unsigned int key = shortcut & FL_KEY_MASK; #if defined(WIN32) || defined(__APPLE__) // if not X if (key >= FL_F && key <= FL_F_Last) { *p++ = 'F'; @@ -270,9 +270,9 @@ const char* fl_shortcut_label(Fl_Shortcut shortcut, const char **eom) { /** Emulation of XForms named shortcuts. */ -Fl_Shortcut fl_old_shortcut(const char* s) { +unsigned int fl_old_shortcut(const char* s) { if (!s || !*s) return 0; - Fl_Shortcut n = 0; + unsigned int n = 0; if (*s == '#') {n |= FL_ALT; s++;} if (*s == '+') {n |= FL_SHIFT; s++;} if (*s == '^') {n |= FL_CTRL; s++;} @@ -282,14 +282,14 @@ Fl_Shortcut fl_old_shortcut(const char* s) { // Tests for &x shortcuts in button labels: -Fl_Shortcut Fl_Widget::label_shortcut(const char *t) { +unsigned int Fl_Widget::label_shortcut(const char *t) { if (!t) return 0; for (;;) { if (*t==0) return 0; if (*t=='&') { - Fl_Shortcut s = fl_utf8decode(t+1, 0, 0); + unsigned int s = fl_utf8decode(t+1, 0, 0); if (s==0) return 0; - else if (s==(Fl_Char)'&') t++; + else if (s==(unsigned int)'&') t++; else return s; } t++; @@ -302,7 +302,7 @@ int Fl_Widget::test_shortcut(const char *t) { if (Fl::event_state(FL_ALT)==0) return 0; #endif if (!t) return 0; - Fl_Shortcut c = fl_utf8decode(Fl::event_text(), Fl::event_text()+Fl::event_length(), 0); + unsigned int c = fl_utf8decode(Fl::event_text(), Fl::event_text()+Fl::event_length(), 0); if (!c) return 0; if (c == label_shortcut(t)) return 1; diff --git a/src/fl_utf.c b/src/fl_utf.c index 3acf925ed..5e1537894 100644 --- a/src/fl_utf.c +++ b/src/fl_utf.c @@ -49,7 +49,7 @@ \c NULL, only the length of the utf-8 sequence is calculated \return length of the sequence in bytes */ - /* FL_EXPORT int fl_unichar_to_utf8(Fl_Char uc, char *text); */ + /* FL_EXPORT int fl_unichar_to_utf8(unsigned int uc, char *text); */ /** @} */ @@ -63,7 +63,7 @@ \param[in] uc Unicode character \return length of the sequence in bytes */ - /* FL_EXPORT int fl_utf8_size(Fl_Char uc); */ + /* FL_EXPORT int fl_utf8_size(unsigned int uc); */ /** @} */ #endif /* 0 */ |
