Gtk3 CSS classes for Custom Widgets - Help!

2018-02-17 Thread Randall Sawyer
I am designing a desktop tool in C Gtk+3 (v. 3.20.8). I have devised a custom widget which is intended to appear and react to user input as if it were a button (without the overhead of inheriting GtkButton). Thus, in my ..._widget_init() function, I use gtk_widget_get_style_context() and

Re: Branch or Patch?

2016-03-21 Thread Randall Sawyer
On 03/21/2016 07:42 PM, Randall Sawyer wrote: On 03/21/2016 07:29 PM, Randall Sawyer wrote: I am ready in all earnestness to submit the proposal for the conclusion of new UTF-8-length-oriented functions 'g_utf_unilen()' and Oops - again - for my conflation between intended motivation

Re: Branch or Patch?

2016-03-21 Thread Randall Sawyer
On 03/21/2016 07:29 PM, Randall Sawyer wrote: I am ready in all earnestness to submit the proposal for the conclusion of new UTF-8-length-oriented functions 'g_utf_unilen()' and 'g_pointer_to_offset_sized()' - declared in "gunicode.h" and defined in "gutf8.c" [https://mai

Branch or Patch?

2016-03-21 Thread Randall Sawyer
I am ready in all earnestness to submit the proposal for the conclusion of new UTF-8-length-oriented functions 'g_utf_unilen()' and 'g_pointer_to_offset_sized()' - declared in "gunicode.h" and defined in "gutf8.c" [https://mail.gnome.org/archives/gtk-devel-list/2016-March/msg00042.html] I

GUString: Boxed Type Proposal

2016-03-21 Thread Randall Sawyer
Hi! I keep my word: https://mail.gnome.org/archives/gtk-devel-list/2016-March/msg00034.html I have come to a conclusion: https://mail.gnome.org/archives/gtk-devel-list/2016-March/msg00042.html I have something to say about that:

Re: G_UTF8String: Boxed Type Proposal

2016-03-21 Thread Randall Sawyer
Frankly, the use of the term "character" when referring to a "UTF-8 encoded Unicode code point" was for me a source of confusion when I leapt to the conclusion of the unmet need of a UTF-8-length-aware wrapped string type - be it called "G_UTF8String" or "GUString". I recommend that all Glib

Re: G_UTF8String: Boxed Type Proposal

2016-03-21 Thread Randall Sawyer
ortunately, both have been fixed for many years now. behdad On Mon, Mar 21, 2016 at 6:32 AM, Matthias Clasen <matthias.cla...@gmail.com <mailto:matthias.cla...@gmail.com>> wrote: On Fri, Mar 18, 2016 at 9:57 AM, Randall Sawyer <srandallsaw...@hushmail.me <mailt

Re: G_UTF8String: Boxed Type Proposal

2016-03-19 Thread Randall Sawyer
On 03/19/2016 04:09 PM, Christian Hergert wrote: It's possible you are focusing on implementation before measuring the problem. DRY alone is not a sufficient argument. "DRY" is not a term I know - or at least in the way you are using it here. One topic I'm interested in covering at the

G_UTF8String: Boxed Type Proposal

2016-03-19 Thread Randall Sawyer
I have a question at the end of this! Please answer if you think it will help. The following is the result of my efforts to develop widgets derived from GtkEntry and GtkEntryBuffer. Specifically, I want to have the ability to easily develop entries which validate their content and which may

Re: G_UTF8String: Boxed Type Proposal

2016-03-19 Thread Randall Sawyer
On 03/19/2016 02:57 PM, Emmanuele Bassi wrote: Hi; On 19 March 2016 at 18:03, Randall Sawyer <srandallsaw...@hushmail.me> wrote: The concision of "GUString" over "G_UTF8String" reflects the concision of my thoughts over what they were at the beginning of this thr

Re: G_UTF8String: Boxed Type Proposal

2016-03-19 Thread Randall Sawyer
On 03/19/2016 01:38 PM, Christian Hergert wrote: On 03/19/2016 06:57 AM, Randall Sawyer wrote: Some object classes - such as GtkEntryBuffer - store this value and update it as text is inserted or deleted. That is efficient. The fact that developers need to write equivalent code for each

Re: G_UTF8String: Boxed Type Proposal

2016-03-19 Thread Randall Sawyer
On 03/19/2016 03:41 AM, Errol van de l'Isle wrote: Just to add my two cents worth as a user of glibmm. Glib::usting uses g_utf8_pointer_to_offset() to obtain the length of the string in characters in the method Glib::ustring::length. The method Glib::ustring::bytes returns the length in bytes;

Re: G_UTF8String: Boxed Type Proposal

2016-03-19 Thread Randall Sawyer
On 03/17/2016 09:30 AM, Matthias Clasen wrote: Hi Randall, thanks for contributing! Pleased to be of service! Looking forward to learning how folks work together in this community. I believe that you haven't found such a proposal because most people don't see much use in a separate boxed

Re: G_UTF8String: Boxed Type Proposal

2016-03-18 Thread Randall Sawyer
On 03/18/2016 10:10 AM, Florian Müllner wrote: On Fri, Mar 18, 2016 at 2:57 PM Randall Sawyer <srandallsaw...@hushmail.me <mailto:srandallsaw...@hushmail.me>> wrote: how about the following modifications? Change "gstring.h": ... struct _GString

Re: G_UTF8String: Boxed Type Proposal

2016-03-18 Thread Randall Sawyer
On 03/17/2016 02:26 PM, Jasper St. Pierre wrote: I'll also ask what "character" means in this case, even though I know glib also has the same confusion. Are you talking about the number of Unicode code points in the string, or the number of grapheme clusters, as defined by Unicode TR29 [0]? The

Re: G_UTF8String: Boxed Type Proposal

2016-03-18 Thread Randall Sawyer
On 03/17/2016 07:23 PM, Matthias Clasen wrote: Sure, code point works too. Anyway, enough with the ontology, we're not a standards body I still don't think that we need a utf8-string datatype. I have questions, then. Here are excerpts from the current master files: "gstring.h" ... struct

Re: G_UTF8String: Boxed Type Proposal

2016-03-18 Thread Randall Sawyer
On 03/17/2016 10:39 AM, Randall Sawyer wrote: On 03/17/2016 09:30 AM, Matthias Clasen wrote: I believe that you haven't found such a proposal because most people don't see much use in a separate boxed type for utf8 strings. Every string we pass around in GLib and GTK+, and every char