]> Pileus Git - ~andy/gtk/blobdiff - gdk/quartz/gdkproperty-quartz.c
x11: Get rid of XSettingsSetting
[~andy/gtk] / gdk / quartz / gdkproperty-quartz.c
index 07fdbafcee18d782bc244b15e4be8cd79fbf9611..f6c738ef4efe2629520e17251b8757943b62f4a3 100644 (file)
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
+#include "config.h"
 
 #include "gdkproperty.h"
 
@@ -96,7 +94,10 @@ static const gchar xatoms_string[] =
   "CAP_HEIGHT\0"
   "WM_CLASS\0"
   "WM_TRANSIENT_FOR\0"
-;
+ /* Below here, these are our additions. Increment N_CUSTOM_PREDEFINED
+   * if you add any.
+   */
+  "CLIPBOARD\0"                        /* = 69 */;
 
 static const gint xatoms_offset[] = {
     0,   5,  13,  23,  27,  32,  39,  48,  57,  64,  76,  88, 
@@ -104,7 +105,7 @@ static const gint xatoms_offset[] = {
   222, 236, 249, 262, 278, 291, 305, 317, 324, 333, 340, 351, 
   360, 378, 391, 404, 412, 428, 442, 456, 466, 477, 487, 497, 
   511, 525, 537, 549, 568, 588, 605, 623, 636, 645, 656, 663, 
-  674, 685, 695, 702, 712, 724, 734, 745, 754
+  674, 685, 695, 702, 712, 724, 734, 745, 754, 771
 };
 
 #define N_CUSTOM_PREDEFINED 1
@@ -119,7 +120,7 @@ ensure_atom_tables (void)
 
   names_to_atoms = g_hash_table_new (g_str_hash, g_str_equal);
   atoms_to_names = g_ptr_array_sized_new (G_N_ELEMENTS (xatoms_offset));
-  
+
   for (i = 0; i < G_N_ELEMENTS (xatoms_offset); i++)
     {
       g_hash_table_insert(names_to_atoms, (gchar *)xatoms_string + xatoms_offset[i], GINT_TO_POINTER (i));
@@ -140,7 +141,7 @@ intern_atom_internal (const gchar *atom_name, gboolean allocate)
     return result;
   
   result = GINT_TO_POINTER (atoms_to_names->len);
-  name = allocate ? g_strdup (atom_name) : (gchar *)allocate;
+  name = allocate ? g_strdup (atom_name) : (gchar *)atom_name;
   g_hash_table_insert(names_to_atoms, name, result);
   g_ptr_array_add(atoms_to_names, name);
   
@@ -148,62 +149,56 @@ intern_atom_internal (const gchar *atom_name, gboolean allocate)
 }
 
 GdkAtom
-gdk_atom_intern (const gchar *atom_name,
-                                        gboolean     only_if_exists)
-{
-  return intern_atom_internal (atom_name, TRUE);
-}
-
-GdkAtom
-gdk_atom_intern_static_string (const gchar *atom_name)
+_gdk_quartz_display_manager_atom_intern (GdkDisplayManager *manager,
+                                         const gchar       *atom_name,
+                                         gboolean           copy_name)
 {
-  return intern_atom_internal (atom_name, FALSE);
+  return intern_atom_internal (atom_name, copy_name);
 }
 
-
 gchar *
-gdk_atom_name (GdkAtom atom)
+_gdk_quartz_display_manager_get_atom_name (GdkDisplayManager *manager,
+                                           GdkAtom            atom)
 {
-  if (!atoms_to_names)
-    return NULL;
-    
+  ensure_atom_tables ();
+
   if (GPOINTER_TO_INT (atom) >= atoms_to_names->len)
     return NULL;
-    
-  return g_ptr_array_index (atoms_to_names, GPOINTER_TO_INT (atom));
+
+  return g_strdup (g_ptr_array_index (atoms_to_names, GPOINTER_TO_INT (atom)));
 }
 
 void
-gdk_property_delete (GdkWindow *window,
-                    GdkAtom    property)
+_gdk_quartz_window_delete_property (GdkWindow *window,
+                                    GdkAtom    property)
 {
   /* FIXME: Implement */
 }
 
 gint
-gdk_property_get (GdkWindow   *window,
-                 GdkAtom      property,
-                 GdkAtom      type,
-                 gulong       offset,
-                 gulong       length,
-                 gint         pdelete,
-                 GdkAtom     *actual_property_type,
-                 gint        *actual_format_type,
-                 gint        *actual_length,
-                 guchar     **data)
+_gdk_quartz_window_get_property (GdkWindow   *window,
+                                 GdkAtom      property,
+                                 GdkAtom      type,
+                                 gulong       offset,
+                                 gulong       length,
+                                 gint         pdelete,
+                                 GdkAtom     *actual_property_type,
+                                 gint        *actual_format_type,
+                                 gint        *actual_length,
+                                 guchar     **data)
 {
   /* FIXME: Implement */
   return 0;
 }
 
 void
-gdk_property_change (GdkWindow   *window,
-                    GdkAtom      property,
-                    GdkAtom      type,
-                    gint         format,
-                    GdkPropMode  mode,
-                    const guchar *data,
-                    gint         nelements)
+_gdk_quartz_window_change_property (GdkWindow   *window,
+                                    GdkAtom      property,
+                                    GdkAtom      type,
+                                    gint         format,
+                                    GdkPropMode  mode,
+                                    const guchar *data,
+                                    gint         nelements)
 {
   /* FIXME: Implement */
 }