You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/02/15 17:54:59 UTC

[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #1948: Simple linux notifications integration module

matthiasblaesing commented on a change in pull request #1948: Simple linux notifications integration module
URL: https://github.com/apache/netbeans/pull/1948#discussion_r379845832
 
 

 ##########
 File path: ide/notifications.linux/src/org/netbeans/modules/notifications/linux/jna/Libnotify.java
 ##########
 @@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.modules.notifications.linux.jna;
+
+import com.sun.jna.Library;
+import com.sun.jna.Pointer;
+
+/**
+ *
+ * @author Hector Espert
+ */
+public interface Libnotify extends Library {
+    
+    boolean notify_is_initted();
+    
+    boolean notify_init(String app_name);
+    
+    void notify_uninit();
+    
+    Pointer notify_notification_new(String summary, String body, String icon);
+    
+    boolean notify_notification_show(Pointer notification, Pointer error);
 
 Review comment:
   These are JNA library bindings. If you don't want to provide a function name mapper JNA requires the java method name to match the native method name.
   The whole jna-platform (bindings for several default libraries on various osses) is bound that way. While other styles might be more in line with the java naming conventions, keeping the native name helps finding documentation, so I strongly suggest to keep the binding like this.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists