pgGetContext, PG_WE_DELETE?

Daniele Pizzoni <[email protected]>
Newsgroups gmane.comp.video.picogui.devel
Message-ID <1044457537.17839.35.camel@anfibio>
I noted that there is no pgGetContext in api_c but it is (apparently)
implemented in cli_python and in pgserver (PGREQ_GETCONTEXT).

So I implemented it, if you need it there is an attached patch.

A question: I didn't find a way to receive an event when a widget is
deleted. Is this a design choice, just a feature waiting to be
implemented or am I missing something?

Bye
Dan
-- 
Daniele Pizzoni --- Ascensit Linux Solutions
email: <[email protected]> - <[email protected]>
GetContext.patch (text/x-patch, 1.1 KB)
diff -ur cli_c/include/picogui/client_c.h cli_c.new/include/picogui/client_c.h
--- cli_c/include/picogui/client_c.h	2003-02-05 15:44:09.000000000 +0100
+++ cli_c.new/include/picogui/client_c.h	2003-02-05 15:35:54.000000000 +0100
@@ -1477,10 +1477,18 @@
 /*!
  * \brief Set the context ID used when creating new handles
  *
- * \sa pgDeleteHandleContext, pgEnterContext, pgLeaveContext
+ * \sa pgDeleteHandleContext, pgEnterContext, pgLeaveContext, pgGetContext
  */
 void pgSetContext(int id);
 
+
+/*!
+ * \brief Get the current context ID
+ *
+ * \sa pgDeleteHandleContext, pgEnterContext, pgLeaveContext, pgSetContext
+ */
+int pgGetContext(void);
+
 //! \}
 
 //! \}
diff -ur cli_c/src/api.c cli_c.new/src/api.c
--- cli_c/src/api.c	2003-02-05 15:44:10.000000000 +0100
+++ cli_c.new/src/api.c	2003-02-05 15:36:53.000000000 +0100
@@ -52,6 +52,12 @@
   return _pg_return.e.retdata;
 }
 
+int pgGetContext(void) {
+  _pg_add_request(PGREQ_GETCONTEXT,NULL,0);
+  pgFlushRequests();
+  return _pg_return.e.retdata;
+}
+
 void pgLeaveContext(void) {
   _pg_add_request(PGREQ_RMCONTEXT,NULL,0);
 }
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.