Import GDK Key Symbols

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Import GDK Key Symbols

Gwenaël Casaccio
Hi,

GDK Key symbols (GDK_KEY_A, ...) are not imported, here is a simple
patch that import them.

Gwen


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Import-GDK-Key-Symbols.patch (111K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Import GDK Key Symbols

Holger Freyther
On Thu, Aug 15, 2013 at 08:51:22PM +0200, Gwenaël Casaccio wrote:
> Hi,
>
> GDK Key symbols (GDK_KEY_A, ...) are not imported, here is a simple
> patch that import them.

Applied, waiting for travis-ci.


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Import GDK Key Symbols

Holger Freyther
On Fri, Aug 16, 2013 at 07:16:01PM +0200, Holger Hans Peter Freyther wrote:

> Applied, waiting for travis-ci.

it passed on travis but my personal jenkins showed a failure. It is because
in Debian6.0 the symbols are still called GDK_VoidSymbol. Only in 2010 the
KEY_ was put into the name[1].

a.) We require a new enough Gtk (Debian6.0 will only be maintained for something
like 7 more months)
b.) We use the gdkkeysyms-compat.h and the old names?

comments?
        holger


[1] https://git.gnome.org/browse/gtk+/commit/gdk/gdkkeysyms.h?id=913cdf3be750a1e74c09b20edf55a57f9a919fcc

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Import GDK Key Symbols

Gwenaël Casaccio
On 18/08/2013 11:28, Holger Hans Peter Freyther wrote:

> On Fri, Aug 16, 2013 at 07:16:01PM +0200, Holger Hans Peter Freyther wrote:
>
>> Applied, waiting for travis-ci.
> it passed on travis but my personal jenkins showed a failure. It is because
> in Debian6.0 the symbols are still called GDK_VoidSymbol. Only in 2010 the
> KEY_ was put into the name[1].
>
> a.) We require a new enough Gtk (Debian6.0 will only be maintained for something
> like 7 more months)
> b.) We use the gdkkeysyms-compat.h and the old names?
>
> comments?
> holger
>
>
> [1] https://git.gnome.org/browse/gtk+/commit/gdk/gdkkeysyms.h?id=913cdf3be750a1e74c09b20edf55a57f9a919fcc

I'll use gdkkeysyms-compat.h

Gwen


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Import GDK Key Symbols

Gwenaël Casaccio
In reply to this post by Holger Freyther
On 18/08/2013 11:28, Holger Hans Peter Freyther wrote:

> On Fri, Aug 16, 2013 at 07:16:01PM +0200, Holger Hans Peter Freyther wrote:
>
>> Applied, waiting for travis-ci.
> it passed on travis but my personal jenkins showed a failure. It is because
> in Debian6.0 the symbols are still called GDK_VoidSymbol. Only in 2010 the
> KEY_ was put into the name[1].
>
> a.) We require a new enough Gtk (Debian6.0 will only be maintained for something
> like 7 more months)
> b.) We use the gdkkeysyms-compat.h and the old names?
>
> comments?
> holger
>
>
> [1] https://git.gnome.org/browse/gtk+/commit/gdk/gdkkeysyms.h?id=913cdf3be750a1e74c09b20edf55a57f9a919fcc
Here is the new one with the gdkkeysyms-compat header

Gwen


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Import-GDK-Key-Symbols.patch (103K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Import GDK Key Symbols

Holger Freyther
On Sun, Aug 18, 2013 at 04:54:32PM +0200, Gwenaël Casaccio wrote:

> Here is the new one with the gdkkeysyms-compat header

thanks, I had already applied/pushed your change. I wonder if you
could already create the symbol as Key something to be future proof. :}

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Import GDK Key Symbols

Gwenaël Casaccio
On 18/08/2013 17:38, Holger Hans Peter Freyther wrote:
> On Sun, Aug 18, 2013 at 04:54:32PM +0200, Gwenaël Casaccio wrote:
>
>> Here is the new one with the gdkkeysyms-compat header
> thanks, I had already applied/pushed your change. I wonder if you
> could already create the symbol as Key something to be future proof. :}
So here is the patch :)


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

0001-Import-GDK-old-Key-Symbols.patch (213K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Import GDK Key Symbols

Holger Freyther
On Sun, Aug 18, 2013 at 10:17:16PM +0200, Gwenaël Casaccio wrote:


> So here is the patch :)

hi,

it alsmost builds... we will need to add defines for older versions
of GDK as some key symbols got introduced later... The first failure
is this:

 enums.c: In function 'main':
enums.c:4270: error: 'GDK_TouchpadToggle' undeclared (first use in this function)
enums.c:4270: error: (Each undeclared identifier is reported only once
enums.c:4270: error: for each function it appears in.)

but luckily these appear to be all defines so we can generate code
like this?

#ifdef GDK_TouchpadToggle
.... code
#endif


holger

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Import GDK Key Symbols

Holger Freyther
On Sat, Aug 24, 2013 at 07:47:44AM +0200, Holger Hans Peter Freyther wrote:

> but luckily these appear to be all defines so we can generate code
> like this?
>
> #ifdef GDK_TouchpadToggle
> .... code
> #endif

I wrote this piece of awk:

+function print_numeric_define(c_name)
+{
+  selector = smalltalkize(tolower(c_name))
+  return "#ifdef " c_name "\n  printf(\"\\n" selector " ^%d!\", (int) " c_name ");\n#endif"
+}
+

and will commit a patch for this over the weekend (unless there are
objections to it).

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk