From 788cd4ed6accd929f3cb73c839613171f30ef923 Mon Sep 17 00:00:00 2001 From: Pavel Krivanek Date: Mon, 9 Mar 2020 14:58:55 +0100 Subject: [PATCH 1/3] - add imContextFilterKeypress: - place setSizeRequestWidth: where it should be (requred to be able to set the GtkEntry minimal size on fixed layouts) --- src/Mars-Gtk/GtkDrawingArea.class.st | 7 ------- src/Mars-Gtk/GtkEntry.class.st | 6 ++++++ src/Mars-Gtk/GtkWidget.class.st | 7 +++++++ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/Mars-Gtk/GtkDrawingArea.class.st b/src/Mars-Gtk/GtkDrawingArea.class.st index e3b9e01..067c0eb 100644 --- a/src/Mars-Gtk/GtkDrawingArea.class.st +++ b/src/Mars-Gtk/GtkDrawingArea.class.st @@ -154,10 +154,3 @@ GtkDrawingArea >> registerToAllEvents [ self events: GDK_ALL_EVENTS_MASK value ] - -{ #category : #private } -GtkDrawingArea >> setSizeRequestWidth: width height: height [ - - self - ffiCall: #(void gtk_widget_set_size_request #(self , gint width , gint height)) -] diff --git a/src/Mars-Gtk/GtkEntry.class.st b/src/Mars-Gtk/GtkEntry.class.st index 2969dcf..319e7e6 100644 --- a/src/Mars-Gtk/GtkEntry.class.st +++ b/src/Mars-Gtk/GtkEntry.class.st @@ -169,6 +169,12 @@ GtkEntry >> g_utf8_to_ucs4: aString [ ^ self ffiCall: #(gunichar g_utf8_get_char(String aString)) module: GLibLibrary ] +{ #category : #private } +GtkEntry >> imContextFilterKeypress: event [ + + ^ self ffiCall: #(gboolean gtk_entry_im_context_filter_keypress (self, GdkEventKey *event)) +] + { #category : #accessing } GtkEntry >> inputPurpose [ diff --git a/src/Mars-Gtk/GtkWidget.class.st b/src/Mars-Gtk/GtkWidget.class.st index e8b3bca..e3c267c 100644 --- a/src/Mars-Gtk/GtkWidget.class.st +++ b/src/Mars-Gtk/GtkWidget.class.st @@ -701,6 +701,13 @@ GtkWidget >> sensitive: sensitive [ self ffiCall: #(void gtk_widget_set_sensitive (self, gboolean sensitive)) ] +{ #category : #private } +GtkWidget >> setSizeRequestWidth: width height: height [ + + self + ffiCall: #(void gtk_widget_set_size_request #(self , gint width , gint height)) +] + { #category : #private } GtkWidget >> setTooltipText: text [ From c21470a963152caf84d94e57b933be864f3aaae1 Mon Sep 17 00:00:00 2001 From: Pavel Krivanek Date: Mon, 9 Mar 2020 16:28:04 +0100 Subject: [PATCH 2/3] imContextFilterKeypress: for GtkTextview --- src/Mars-Gtk/GtkTextView.class.st | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Mars-Gtk/GtkTextView.class.st b/src/Mars-Gtk/GtkTextView.class.st index 26f0c96..dd45732 100644 --- a/src/Mars-Gtk/GtkTextView.class.st +++ b/src/Mars-Gtk/GtkTextView.class.st @@ -81,6 +81,12 @@ GtkTextView >> getBuffer [ self ffiCall: #(GtkTextBuffer *gtk_text_view_get_buffer (self)) ] +{ #category : #accessing } +GtkTextView >> imContextFilterKeypress: event [ + + ^ self ffiCall: #(gboolean gtk_text_view_im_context_filter_keypress (self, GdkEventKey *event)) +] + { #category : #testing } GtkTextView >> isCursorVisible [ From 1b29035f493e75f1a7986ad72f7854689f8bc150 Mon Sep 17 00:00:00 2001 From: Pavel Krivanek Date: Tue, 10 Mar 2020 08:42:43 +0100 Subject: [PATCH 3/3] setOverlayPassThrougth:, events: --- src/Mars-Gtk/GtkOverlay.class.st | 6 ++++++ src/Mars-Gtk/GtkWidget.class.st | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/Mars-Gtk/GtkOverlay.class.st b/src/Mars-Gtk/GtkOverlay.class.st index 8092f7b..c1e7007 100644 --- a/src/Mars-Gtk/GtkOverlay.class.st +++ b/src/Mars-Gtk/GtkOverlay.class.st @@ -49,3 +49,9 @@ GtkOverlay >> basicAddOverlay: aWidget [ ^ self ffiCall: #(void gtk_overlay_add_overlay (self, GtkWidget *aWidget)) ] + +{ #category : #adding } +GtkOverlay >> setOverlayPassThrougth: boolean child: aChild [ + + ^ self ffiCall: #(void gtk_overlay_set_overlay_pass_through (self, GtkWidget *aChild, gboolean boolean)) +] diff --git a/src/Mars-Gtk/GtkWidget.class.st b/src/Mars-Gtk/GtkWidget.class.st index e3c267c..e9fd1d6 100644 --- a/src/Mars-Gtk/GtkWidget.class.st +++ b/src/Mars-Gtk/GtkWidget.class.st @@ -407,6 +407,12 @@ GtkWidget >> dragDestUnset [ ^ self ffiCall: #(void gtk_drag_dest_unset #(self)) ] +{ #category : #private } +GtkWidget >> events: events [ + + self ffiCall: #(void gtk_widget_set_events (self, gint events)) +] + { #category : #'private deferring' } GtkWidget >> executeDeferredActions [