com gtk/php-gtk: GtkSocket/GtkPlug stuff.: ext/gtk+/gtk.overrides

[email protected] (David Soria Parra)
Newsgroups php.gtk.cvs
Message-ID <[email protected]>
Commit:    593d436cda584eb8ca0320a5149fb9ace09a9bf4
Author:    Andrei Zmievski <[email protected]>         Mon, 24 Apr 2006 06:29:35 +0000
Parents:   6b28e042b1ee1af0349881f8a6fc50878dae0307
Branches:  master

Link:       http://git.php.net/?p=gtk/php-gtk.git;a=commitdiff;h=593d436cda584eb8ca0320a5149fb9ace09a9bf4

Log:
GtkSocket/GtkPlug stuff.

Changed paths:
  M  ext/gtk+/gtk.overrides


Diff:
593d436cda584eb8ca0320a5149fb9ace09a9bf4
diff --git a/ext/gtk+/gtk.overrides b/ext/gtk+/gtk.overrides
index dce9eee..948b87d 100644
--- a/ext/gtk+/gtk.overrides
+++ b/ext/gtk+/gtk.overrides
@@ -29,10 +29,6 @@ ignore-glob
     gtk_timeout_add_*
     gtk_toggle_button_new_*
 %%
-ignore-win32-glob
-    gtk_plug_*
-    gtk_socket_*
-%%
 ignore
     gtk_button_new_with_label
     gtk_button_new_with_mnemonic
@@ -51,6 +47,9 @@ ignore
     gtk_list_item_new_with_label
     gtk_menu_item_new_with_label
     gtk_menu_item_new_with_mnemonic
+    gtk_plug_construct
+    gtk_plug_construct_for_display
+    gtk_plug_new_for_display
     gtk_radio_menu_item_new_with_label
     gtk_radio_menu_item_new_with_mnemonic
     gtk_true
@@ -2399,6 +2398,35 @@ PHP_METHOD
 
 %% }}}
 
+%% {{{ GtkPlug
+
+%%
+override gtk_plug_new
+PHP_METHOD
+{
+    gulong socket_id;
+    zval *display = NULL;
+    GObject *wrapped_obj = NULL;
+
+    if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "i|O", &socket_id, &display))
+        return;
+
+    wrapped_obj = g_object_new(phpg_gtype_from_zval(this_ptr), NULL);
+
+    if (display) {
+        gtk_plug_construct_for_display(GTK_PLUG(PHPG_GOBJECT(this_ptr)),
+                                       GDK_DISPLAY(PHPG_GOBJECT(display)), socket_id);
+    } else {
+        gtk_plug_construct(GTK_PLUG(PHPG_GOBJECT(this_ptr)), socket_id);
+    }
+
+    if (!wrapped_obj) {
+        PHPG_THROW_CONSTRUCT_EXCEPTION(GtkPlug);
+    }
+}
+
+%% }}}
+
 %% {{{ GtkProgressBar
 
 %%
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.